(1) Hard disk and file resource hard drives and CD-ROM devices use block device interfaces. The hard disk device file is stored in the / dev directory. The character device file is stored in the RDSK subdirectory, and the block device file exists in the DSK subdirectory. 1. Logic The convention / dev / [r] DSK / CWTXDYSZ example of the hard disk device: / dev / dsk / c0t3d0s0 CN: Controller Number controller number, identifies the logical order of the added to the system by the hard disk. C0 represents the first hard disk control The device, the C1 represents the second hard disk controller, the class push. TN: TARGET NUMBER target number is the address in the controller, usually the target number can be found on the back of the peripheral device. DN: Disk Number hard drive, representative in the target The logical unit number of the device on the device. D0 represents the first hard disk, D1 represents the second hard disk, and push it according to the secondary class. For the embedded SCSI controller, the hard disk drive number is always 0. Sn: slice or portition NUMER tablet or partition number, Identify the partition of the hard disk. 2. DMESG Command Dmesg Command Use the instance name and physical name to identify the device. DMESG command also displays the system diagnostic information, the operating system version number, the size of the physical memory, and other information. Example: below The output information is extracted from the output information of the previous DMESG example, identifies a hard disk device connected to the system. For each hard disk device, output three line information, respectively, respectively: the instance name of the hard disk. Hard disk physical device name Hard disk market name and hard disk profile information. The logical device name of the hard disk is a symbolic connection to the physical device name of the hard disk. The instance name of the hard disk is the abbreviation of the kernel of the physical device. Solaris command does not use this to represent the hard disk. 3 . SHOWREV Command (2) Hard Disk Partitions Use the character device files and block device files in the device directory to access the hard disk. However, the hard disk is not directly accessed by the user, and it is accessed by the partition, and the partition is under the device directory The device file is indicated. "Slices" is another statement of "partition". Partition is a convenient way to manage data. Important system files and programs can exist a partition, and the user generated by another partition It maintains different types of data in different partitions. This allows system administrators to flexibly utilize data or use different backup mechanisms. Because user data changes every day, the system administrator should back up every day. And important system Data is not currently changed, and there is no need to make backup. The hard disk partition provided by Sun can be up to 8, with 1-7 ID. Partition 2 represents the entire hard disk. Partition 5 Represents the / opt file system, this file system is used Soft stores those who have not provided together with the operating system Part. Partition 6 is / usr partition, this file system contains files that can only run on certain types of systems (such as sparc execables) and some files that can be run on all system types (such as online manuals in / usr / share directory). The file system of partition 7 is called / export / home. This is a hookpoint that hooks the user's home directory. Hard disk partitions Access by logical device files in / dev directory. Such as / dev / dsk / C0T0D0S0 represents a first partition on the first hard disk. 1.Format utility format is a hard disk maintenance tool, is used by system administrators, complete the following tasks: Reforming the hard disk. Change the partition size. repair and analyze hard disk fan Area.
Part Identification Partition No. 0-7. TAG Displays Partition Tags, partition tags to identify the purpose used by the partition (root, usr, home, switching area). FLAG displays partition flags to identify access. Cylinders shows start and Termination Cylinder. Size displays partition size in mbytes or gbytes. Block block identifies the size of the partition, the number of heads, and the number of sectors. 2.NewFS Create a file system command format: Newfs Raw -Device example: newfs / dev / rdsk / c0t1d0s0 3.FSCK repair file system command format: fsck Raw-Device example: fsck / dev / rdsk / c0t1d0s0 (3) Mount file resource 1.mount file system Mount local or remote The file resource is connected to the root file level, which looks like a single file system. This connection action is called "hook", using the mount command to complete the file resource to the root file level directory is called the hook. Before calling the mount command, the mount must exist. Command format: mount file_name mount_point No option The mount command displays the currently hidden file resource. Example: # mount / dev / dsk / c0t3d0s0 / export / home monitoring file system 2 DF Displays the hard disk space DF -K command occupied by the file system Press kbytes to display the total amount of available hard disk spaces and the used hard disk space. The meaning of each domain is: Filesystem is mounted by the file system. Kbytes Press KBYTE calculated files System size. Used Number (KBytes). Avail available (kbytes). Capacity has been used. MOUNTED ON mount point. Note: About 10% of hard disk space is preserved for file system, in DF -K command There is no reflection in the output. 3.umount takes off the file resource from the local system, the super user can use the umount command. Command format: # umount mount_point If there is activity in the mounted file resource directory, then The file resources are not taken. In the picking of the previous CD to / directory is a good habit, do not distinguish between the file system required for the system to run properly. (4) Automatic mount file resources / etc / vfstab File system boot time reading / etc / vfst The AB file is automatically mount file resource. This file contains registration of local and remote file resources. The meaning of each domain: Device-to-Mount identifies NFS servers and file systems, or histed local file systems. Device-To -fsck identifies a local original device for performing FSCK. Mount Point Mount Path. FS-TYPE file system type, usually UFS for local file system, NFS for remote file system. Fsck-pass this domain is FSCK passes the order of file system checking, and the number of weights indicates that the parallel is checked. Mount-at-boot determines if the file system is automatically hooked when the system boot. Mount-Options defines the hook option, such as read / write access. domain - indicated no option. / Dev / [r] DSK / CWTXDYSZ is used for local UFS file systems .W, s, y, and z represent controller, target, device, and slice. Once the system is established, manually in stand-alone system The / etc / vfstab file is added to the remote file resource registration. (5) NFS resource Sun's NFS distributed file system allows machines to share their resources on the network. NFS file system allows machine sharing local file system and directory.