|Skip Navigation Links|
|Exit Print View|
|System Administration Guide: Devices and File Systems Oracle Solaris 10 8/11 Information Library|
ZFS file systems are mounted and unmounted automatically. You can make a legacy UFS file system available by mounting it, which attaches the file system to the system directory tree at the specified mount point. The root (/) file system is always mounted.
The following table provides guidelines on mounting file systems based on how you use them.
You can mount removable media that contains a file system by inserting the media into the drive and running the volcheck command, if necessary. For more information on mounting removable media, see Chapter 1, Managing Removable Media (Overview).
$ mount [ -v ]
The -v displays the list of mounted file systems in verbose mode.
Example 17-1 Determining Which File Systems Are Mounted
This example shows how to use the mount command to display information about the file systems that are currently mounted.
$ mount / on rpool/ROOT/zfsBE read/write/setuid/devices/rstchown/dev=40d0002 on Wed ... /devices on /devices read/write/setuid/devices/rstchown/dev=9500000 on Wed ... /dev on /dev read/write/setuid/devices/rstchown/dev=9580000 on Wed Jun ... /system/contract on ctfs read/write/setuid/devices/rstchown/dev=95c0001 ... /proc on proc read/write/setuid/devices/rstchown/dev=9540000 on Wed Jun ... /etc/mnttab on mnttab read/write/setuid/devices/rstchown/dev=9600001 on Wed ... /system/volatile on swap read/write/setuid/devices/rstchown/xattr/dev=9640001 ... /system/object on objfs read/write/setuid/devices/rstchown/dev=9680001 on Wed ... /etc/dfs/sharetab on sharefs read/write/setuid/devices/rstchown/dev=96c0001 on ... /dev/fd on fd read/write/setuid/devices/rstchown/dev=97c0001 on Wed Jun 8 ... /tmp on swap read/write/setuid/devices/rstchown/xattr/dev=9640002 on Wed Jun ... /export on rpool/export read/write/setuid/devices/rstchown/nonbmand/exec/xattr/ /export/home on rpool/export/home read/write/setuid/devices/rstchown /rpool on rpool read/write/setuid/devices/rstchown/nonbmand/exec/ /home/rimmer on pluto:/export/home/rimmer remote/read/write/setuid/xattr/...
This example shows how to use the zfs mount command to display information about ZFS file systems that are currently mounted.
$ zfs mount rpool/ROOT/zfsBE / rpool/export /export rpool/export/home /export/home rpool /rpool
The unmounting of a UFS file system removes it from the file system mount point, and deletes the entry from the /etc/mnttab file. Some file system administration tasks cannot be performed on mounted file systems. You should unmount a UFS file system when the following occurs:
The file system is no longer needed or has been replaced by a file system that contains more current software.
You need to check and repair the file system by using the fsck command. For more information about the fsck command, see Chapter 20, Checking UFS File System Consistency (Tasks).
Note - File systems are automatically unmounted as part of the system shutdown procedure.
In an emergency situation, you can use the umount -f option to forcibly unmount a busy file system. This practice is not recommended under normal circumstances because the unmounting of a file system with open files could cause a loss of data. This option is only available for UFS and NFS file systems.
An entry in the /etc/vfstab file has seven fields, which are described in the following table.
Table 17-1 Field Descriptions for the /etc/vfstab File
Note - You must have an entry in each field in the /etc/vfstab file. If there is no value for a field, be sure to specify a dash (-). Otherwise, the system might not boot successfully. Similarly, white space should not be used as a field value.
The prerequisites for unmounting file systems include the following:
You must be superuser or assume an equivalent role.
You cannot unmount a file system that is busy. A file system is considered busy if a user is accessing a directory in the file system, if a program has a file open in that file system, or if the file system is being shared. You can make a file system available for unmounting by doing the following:
Changing to a directory in a different file system.
Logging out of the system.
Using the fuser command to list all processes that are accessing the file system and to stop them, if necessary. For more details, see How to Stop All Processes Accessing a File System.
Notify users if you need to unmount a file system that they are using.
Unsharing the file system. For information about unsharing a file system, see unshare(1M).
To verify that you unmounted a file system or a number of file systems, examine the output from the mount command.
$ mount | grep unmounted-file-system