Previous Table of Contents Next


Creation of an Entry in the File System Table

Follow these steps to create an entry in the file system table:

1.  Become superuser.
2.  Edit the /etc /vfstab file using an editor such as vi.
3.  Add the entry, separating each field with white space (a space or a Tab). If a field has no entry, enter a hyphen (-).
4.  Save the changes.
5.  Check to be sure the mount point directory is present. If it's not, create it by changing to the directory where you want to create the mount point, typing mkdir directory-name, and pressing Return.
6.  Type mount mount-point and press Return. The entry is mounted.

This example mounts the disk slice /dev/dsk /c0t3d0s7 as a ufs file system attached to the mount point directory /files1 with the default mount options (read /write). It specifies the raw character device /dev/rdsk /c0t3d0s7 as the device to fsck. The fsck pass value of 2 means that the file system will be checked, but not sequentially:

#device         device         mount         FS   fsck   mount   mount
#to mount       to fsck        point         type pass   at boot options
#
/dev/dsk/cØt3dØs7 /dev/rdsk/cØt3dØs7 /files1 ufs  2      yes     -

This example mounts the directory /export /man from the system oak as an NFS file system on mount point /usr/man. You do not specify a device to fsck or a fsck pass for NFS file systems. In this example, mount options are ro (read-only) and soft. For greater reliability, for read/write NFS file systems, specify the hard mount option (rw,hard):

#device         device         mount         FS   fsck   mount   mount
#to mount       to fsck        point         type pass   at boot options
oak:/export/man   -            /usr/man      nfs  -      yes    ro,soft

This example mounts a CD-ROM drive on a mount point named / hsfiles. CD-ROM files typically are read-only, so you specify ro for the mount options. Specify no for mount at boot because you are most likely to mount and unmount a CD-ROM from the command line or by using volume management. Because the hsfs is read-only, specify no device to fsck and no fsck pass number:

#device         device         mount         FS   fsck   mount   mount
#to mount       to fsck        point         type pass   at boot options
/dev/dsk/cØt6dØs2 -            /hsfiles      hsfs -      no     ro

This example mounts the diskette drive on a mount point named /pcfiles. Specify no for mount at boot because you are most likely to mount and unmount a diskette from the command line or by using volume management. Specify no to fsck or fsck pass, because the pcfs file system does not support fsck.

#device         device         mount         FS   fsck   mount   mount
#to mount       to fsck        point         type pass   at boot options
/dev/diskette   -              /pcfiles      pcfs -      no     rw

This example mounts the root file system on a loopback mount point named /etc / newroot. Specify yes for automount, no device to fsck, and no fsck pass number. Loopback file systems must always be mounted after the file systems used to make up the loopback file system. Be sure that the loopback entry is the last entry in the /etc /vfstab file so that it follows the entries that it depends on:

#device         device         mount         FS   fsck   mount   mount
#to mount       to fsck        point         type pass   at boot options
/               -              /tmp/newroot  lofs -      yes    -

File System Administrative Commands

This section lists the file system administrative commands and describes the syntax.

Most file system administrative commands have a generic and a file system-specific component. Use the generic commands, which use the file system-specific component. Table 4-3 lists the generic file system administrative commands, which are located in the /usr/sbin directory. Most of these commands also have file system-specific counterparts.

Table 4-3 Generic File System Administrative Commands

Command Description
clri(1M) Clears inodes.
df(1M) Reports the number of free disk blocks and files.
ff(1M) Lists file names and statistics for a file system.
fsck(1M) Checks the integrity of a file system and repairs any damage found.
fsdb(1M) File system debugger.
fstyp(1M) Determines the file system type.
labelit(1M) Lists or provides labels for file systems when copied to tape (for use by the volcopy command only).
mkfs(1M) Makes a new file system.
mount(1M) Mounts file systems and remote resources.
mountall(1M) Mounts all file systems specified in a file system table.
ncheck(1M) Generates a list of path names with their i-numbers.
umount(1M) Unmounts file systems and remote resources.
umountall(1M) Unmounts all file systems specified in a file system table.
volcopy(1M) Makes an image copy of a file system.


CAUTION! Do not use the file system-specific commands directly. If you specify an operation on a file system that does not support it, the generic command displays this error message: command: Operation not applicable for FSType type.


Previous Table of Contents Next