====== Notes for the Solaris 10 System Administration Exam (CX-310-200 & -202) ====== I'm preparing myself for the two exams to achieve the [[http://www.sun.com/training/certification/solaris/scsa.xml|Sun Certified System Administrator (SCSA)]] certification. This are my notes taken while studying the preparation books. ===== Managing File Systems ===== ==== List Devices ==== To list the system's devices, you can use the following commands: * ''dmesg'' * ''format'' * ''prtconf'' * ''sysdef'' ==== Reconfigure Devices ==== To reconfigure the devices, you can perform any of these actions: - ''touch /reconfigure'' and reboot the system - From OK promt, bott the system with ''-r'' option (''boot -r'') - ''reboot -- -r'' - Run ''devfsadm'' * Limit to class of devices: ''devfsadm -c ''//class//, e.g. ''devfsadm -c disk'' * Limit a driver: ''devfsadm -i ''//driver//, e.g. ''devfsadm -i sd'' ==== Device Names ==== * physical device path: ''"/pci@0/pci@0/pci@1/pci@0/pci@2/network@0" 0 "e1000g"'' * logical device name: ''e1000g0'' * logical device path: ''/dev/e1000g0'' (symlink to physical device path) * driver: ''e1000g'' * driver instance: 0 ==== Device Config Files ==== === /etc/path_to_inst === The file ''[[solaris:etc:path_to_inst|/etc/path_to_inst]]'' maps physical device paths to driver name and driver instance number. Example: "/pci@0/pci@0/pci@1/pci@0/pci@2/network@0" 0 "e1000g" === /etc/name_to_major === Maps driver name to major device number. Example: e1000g 51 ==== Save and Restore the VTOC ==== * Print VTOC: prtvtoc * Write VTOC: fmthard -s * Directly transfer VTOC from one disk to another: prtvtoc | fmthard -s - ==== Inodes ==== * Find all hard links of a given inode: find -mount -inum -ls * For example, to find all filesystem entries in the root filesystem for inode 4711, use this: find / -mount -inum 4711 -ls ==== Block Sizes ==== * The //physical block size// is 512 Bytes. * The //logical block size// is 4 KiB(([[http://en.wikipedia.org/wiki/Byte#Unit_multiples|Kibibyte (KiB)]])) or 8 KiB. On sun4u only 8 KiB is supported. 8 KiB is default and recommended. * The //fragment size// is the logical block size divided by 1, 2, 4 or 8. So, it can be between 512 Bytes and 8 KiB. The default fragment size is 1 KiB. ==== Filesystem Creation and Administration ==== === newsfs === FIXME: add newfs options * List alternate superblocks: newfs -Nv === fstyp === * The command ''[[solaris:fstyp|fstyp]]'' list filesystems propeties, e.g. alternate superblocks: fstyp -v === fsck === * Repair primary superblock with backup superblock: fsck -o b= * For example, to write the backup superblock 4711 to the primary superblock of device ''c0t0d0s0'': fsck -o b=4711 /dev/rdsk/c0t0d0s0 ==== Label Filesystem ==== * The filesystem name is the mountpoint of the filesystem. E.g. the name "var" stands for the mountpoint ''/var''. * The volume represents the physical volume name. * Write a filesystem label: labelit -F * Read a file label: labelit * Example: Write the name "home" and the volume "vol1" to disk ''c0t0d0s0'': labelif -F ufs /dev/rdsk/c0t0d0s0 home vol1 * Labeled filesystems can be copied with ''volcopy'' {{tag>solaris solaris10 admin sysadmin exam certification device cli}}