Unmounts a previously mounted file system, directory, or file.
{ unmount | umount } [ -f ] [ -a ] | [ all | allr | Device | Directory | File | FileSystem | -n Node | -t Type ]
Another name for the umount command is the unmount command. Either name can be used. You can use the System Management Interface Tool (SMIT) to run this command. To use SMIT, enter:
smit umount
The umount command unmounts a previously mounted device, directory, file, or file system. Processing on the file system, directory, or file completes and it is unmounted. Members of the system group and users operating with root user authority can issue any umount command. Only users with root authority or are members of the system group can unmount a directory or file.
Note: SMIT will not unmount the /usr/lpp/info/$LANG directory, the directory on which SMIT helps are located. Typically, this is the CD-ROM.
To unmount local mounts you can specify the device, directory, file, or file system on which it is mounted.
If the file system being unmounted is a JFS2 snapshot, the umount command will unmount the snapshot, though the snapshot will still be active. The snapshot command must be used to delete the snapshot.
If the file system being unmounted is a snapped file system with mounted snapshots, the umount command displays a warning that there are mounted snapshots and exits without unmounting the file system. The snapshots must be unmounted first.
Item | Description |
---|---|
-a | Unmounts all mounted file systems. |
all | Unmounts all mounted file systems. |
allr | Unmounts all remotely mounted file systems. Note: For remote mounts, specify the device, directory, file, or file system parameters. If you specify the allr flag, the umount command unmounts all remote mounts. |
-f | For remote mounted file systems, the –f flag forces
an unmount to free a client when the server is down and server path
names cannot be resolved, or when a file system must be unmounted
while it is still in use. Note: For remote file systems, using
this flag causes all file operations on the file system except close() and unmap() to
fail. Any file data that has been written by an application but has
not yet transferred to the server will be lost. A forced unmount of
an NFS version 4 file system can cause open file state for other file
systems mounted from the same server to be lost as well.
For
local JFS2 file systems, the –f flag forces an unmount when
a file system must be unmounted while it is still in use.
Note: You
can use the -f flag only in JFS2 file systems, not in other
journaled file systems. The following restrictions are applied on
a forced unmount of a JFS2 file system:
|
-n Node | Specifies the node holding the mounted directory you want to unmount. The umount -n Node command unmounts all remote mounts made from the Node parameter. |
-t Type | Unmounts all stanzas in the /etc/filesystems file that contain the type=Type flag and are mounted. The Type parameter is a string value, such as the remote value that specifies the name of the group. |
Note: You cannot use the umount command on a device in use. A device is in use if any file is open for any reason or if a user's current directory is on that device.
umount -n nodeA
umount -t test
This unmounts all files or directories that have a stanza in the /etc/filesystems file that contains the type=test attribute.Item | Description |
---|---|
/etc/filesystems | Lists the known file systems and defines their characteristics. |