mount command
Purpose
Makes a file system available for use.
Syntax
mount [[[Node:]Directory] Directory]
mount -cd Device Directory
mount -nfsvers version [[[Node:]Directory] Directory]
Description
The mount command instructs the operating system to make a file system available for use at a specified location (the mount point). The mount command mounts a file system that is expressed as a directory by using the Node:Directory parameter on the directory specified by the Directory parameter. After the mount command has finished, the directory that is specified becomes the root directory of the newly mounted file system.
- The node (if the mount is remote)
- The object mounted
- The mount point
- The virtual-file-system type
- The time mounted
- Any mount options
The /mnt directory can be used as a local mount point, or you can create a directory by using the mkdir command. Any directories that are created with the mkdir command must be a sub-directory of your home directory.
Flags
Flag name | Description |
---|---|
-cd | Specifies the cd device name on which to mount. |
-nfsvers | Starts Network File System (NFS) version 4 mounts on the Virtual I/O Server (VIOS). |
Exit Status
Examples
- To list the mounted file systems, enter:
This command produces output similar to the following:mount
For each file system, the mount command lists the node name, the device name, the name under which it is mounted, the virtual-file-system type, the date and time it was mounted, and its options.node mounted mounted over vfs date options ----- ------------------- ------------ ------ ------------ --------------- /dev/hd4 / jfs2 Mar 10 15:27 rw,log=/dev/hd8 /dev/hd2 /usr jfs2 Mar 10 15:27 rw,log=/dev/hd8 /dev/hd9var /var jfs2 Mar 10 15:28 rw,log=/dev/hd8 /dev/hd3 /tmp jfs2 Mar 10 15:28 rw,log=/dev/hd8 /dev/hd1 /home jfs2 Mar 10 15:28 rw,log=/dev/hd8 /proc /proc procfs Mar 10 15:28 rw /ahafs /aha ahafs Mar 10 15:28 rw vios4 /home/padmin/tstvf4 /mnt nfs3 Apr 06 16:47 vers=3 vios4 /home/padmin/tstvf4 /mnt nfs4 Apr 06 16:48 vers=4
- To mount the remote directory on to a local directory, enter:
This command mounts the /test directory that is located on testsys3 onto the local /mnt directory.mount testsys3:/test /mnt
- To mount the NFSv4 on a local directory, enter:
mount –nfsvers 4 testsys3:/test /mnt