mount(8) — Maintenance
OSF — Environment_Note_Added
NAME
mount, umount − Mount and unmount file systems
SYNOPSIS
mount [−adfrwuv]
mount [−dfrwuv] device | node
mount [−afrwuv] [−t nfs | ufs | s5fs | ffs | mfs] [ [−o options] [ device ] [ node ]
umount [−aAfF] [−t nfs | ufs | s5fs | ffs | mfs]
umount [−fF] [−t nfs | ufs | s5fs | ffs | mfs] device | node
umount −h host
DESCRIPTION
The mount command mounts the specified file systems, attaching device to the directory hierarchy at node. With no arguments, mount displays the kernel’s table of mounted file systems.
The mount command announces to the system that a removable file system is present on device. For ufs and s5fs file system types, device must be a block special file. For the nfs file system type, device is a remote file system and can be specified in two forms: rhost:path and path@rhost. For the ffs file system type, device may be any file.
The file system on device is attached to the local mount point node. The node must exist; for ufs, nfs, and s5fs file system types, node must be a directory. Its path name becomes the path name to the root of the newly mounted file system. For the ffs file system type, node may be any file.
If either device or node is not provided, the appropriate information is taken from the fstab file.
The system maintains a list of currently mounted file systems. If you invoke the mount command without options, it prints the list.
The umount command unmounts file systems. It announces to the system that the removable file system node or whatever removable file system was previously mounted on device device should be removed.
FLAGS: mount
−aMounts all file systems listed in /etc/fstab. When other flags are specified, mounts all file systems that meet the other criteria.
−dMounts a ufs file system even if it has not been unmounted cleanly or checked by fsck for consistency.
−fPerforms the actions of the mount without actually mounting any file systems. Use with the −v flag to determine what mount is trying to do.
−o optionMounts the file system with the specified options. Options entered on the command line override options listed in /etc/fstab.
−rMounts the file system as read-only.
−t typeMount the file system type indicated by the type argument. Valid types are ufs, nfs, s5fs, ffs, and mfs.
−u optionChanges the options for a mounted file system.
−vDisplays a verbose description of mount’s actions.
−wMounts the file system as read-write.
FLAGS: umount
−aUnmounts all file systems listed in /etc/fstab.
−AUnmounts all file systems in the kernel’s internal table of mounted file systems.
−fForcibly unmounts a file system, even if it is busy. Any active special files continue to work; the special files are dissociated from the file system itself, so access times are no longer updated. Attempts to access all other files return errors.
−FPerforms the actions of the unmount without actually unmounting any file systems. Use with the −v flag to determine what umount is trying to do.
−h hostUnmounts all nfs file systems that are listed in /etc/fstab and have been mounted from host. Use with −A to unmount all file systems in the kernel’s internal mount table.
−t typeUnmounts file systems of the specified type. Use with −a to unmount file systems listed in /etc/fstab. Use with −A to unmount file systems listed in the kernel’s internal mount table.
−vDisplays a verbose description of umount’s actions.
OPTIONS
Options are specified as a comma-separated string of option names. Some options take a value; the syntax for these is option=value. When a file system is mounted, the options are determined by first reading any options listed in /etc/fstab, then applying options specified with −o on the command line, then applying the −r or −w command-line flag.
Some options apply to any file system type; some options apply only to one.
General Options
By default, file systems are mounted so that binaries can be executed, set-UID and set-GID bits are honored, special files are interpreted, and I/O is asynchronous. The options that apply to all file systems can be set with −o to override the defaults. They can be modified with −u to change the options for a mounted file system without unmounting it.
noexecDoes not allow execution of any binaries on the mounted file system. This option is useful for a server that has file systems containing binaries for architectures other than its own.
nosuidDoes not allow set-UID or set-GID bits to take effect.
nodevDoes not interpret character or block special files on the file system. This option is useful for a server that has file systems containing special files for architectures other than its own.
synchronous
All I/O to the file system should be done synchronously.
The mount command also recognizes the exec, suid, dev, and asynchronous options. These options can be used with −o on the command line to override an option in /etc/fstab. They cannot be used with −u to change the state of a mounted file system.
Options: nfs File System Type
The following options apply to the nfs file system type:
hardI/O system calls will retry until the server responds (default).
softI/O system calls will fail and return an error after retrans request retransmissions.
spongyUses soft semantics for the stat, lookup, fsstat, readlink, and readdir file system operations and hard semantics for the others. This option is meant to be similar to hard, except that processes will not be hung forever when they trip over mount points to dead servers.
bgIf the first mount request times out, retries in background. By default, mount runs in the foreground; the bg option allows mount to continue trying to mount remote file systems without hanging.
nointrI/O system calls cannot be interrupted.
noconnDoes not connect the socket. This option is generally used with the UDP transport protocol when the server sends replies from sockets other than the nfs server socket.
rsize=#Sets read size to # bytes. The default read size is 8192 bytes. The minimum read size is 512 bytes; the maximum is 8192 bytes. The read size can be set to values between the minimum and maximum.
wsize=#Sets write size to # bytes. The default write size is 8192 bytes. The minimum write size is 512 bytes; the maximum is 8192 bytes. The write size can be set to values between the minimum and maximum.
retry=#Sets retry count to #. The default retry count is 10000
retrans=#Sets retransmission count for nfs rpc’s to #. The default retransmission count is 10.
timeo=#Sets initial nfs timeout to # in 0.1-second intervals. The default initial timeout is 1 second.
attrtimeo=#
Sets the attribute cache timeout value to # seconds. The default is 5 seconds.
transport=type[:net_address]
Specifies the underlying transport protocol. The default is UDP. The valid types are tcp, udp, udg, pip, spp, ssp, and idp. For most transport protocols, the address of the server does not need to be specified here. The format of the address depends on the protocol.
tcpA shorter form of transport=tcp.
udpA shorter form of transport=udp.
share=#Determines how many connections are made to a single server. The appropriate value depends on the underlying transport, the number of file systems being mounted from a server, and the NFS implementation on the server. The acceptable values are:
0Each mounted file system has its own connection.
1The default. All mounts from a given server share a connection.
>1mount opens the specified number of connections for one file system. This option can be helpful is the server is single-threaded.
The hard, soft, and spongy options are mutually exclusive. The mount command also recognizes the fg (foreground), conn, and intr options. These options specify the defaults.
Options: ffs File System Type
The following option applies only to the ffs file system type.
cloneThe file-on-file mount is to be a clone mount, in which operatings such as chown() or chmod() have no effect upon the resulting mounted file. This option is valid only for character device files.
EXAMPLES: mount
1.The following example mounts the device /dev/rx2a on the node /usr/local/bin:
mount /dev/rx2a /usr/local/bin
2.The following example mounts all nfs file systems listed in fstab and takes device, node and options from the file:
mount −a −t nfs
3.The following example shows how to test a mount command without actually mounting the file system:
mount −fv users@server2 /users
The example also shows one way of specifying a remote file system for device:
4.The following example unsets the nosuid option for the file system that is already mounted on the node /arch1/bin:
mount −u nosuid /srch1/bin
5.The following example mounts an nfs file system with some options:
mount −o soft,bg,retry=15 server2:/usr/local/man /usr/man
You do not need to specify −t nfs. If device contains a colon or an ampersand, mount assumes an nfs file system type.
EXAMPLES: umount
1.The following example unmounts all nfs file systems that are listed in /etc/fstab:
umount −a −t nfs
2.The following example unmounts all file systems in the kernel’s internal table of mounted file systems:
umount −A
3.The following example unmount all nfs file systems that have
been mounted from the host server3:
umount −A −h server3
NOTES
File systems on physically write-protected disks must be mounted read-only or errors will occur when access times are updated. This holds whether or not an explicit write is attempted.
The root file system cannot be unmounted.
ufs file systems can be mounted with quotas enabled, but the appropriate options must be specified in /etc/fstab. They cannot be entered on the mount command line.
The umount accepts the −f flag and passes it to the appropriate file system. File systems that do not support forcible unmounts return EINVAL.
Mounting corrupted file systems will crash the system.
FILES
/etc/fstabSpecifies the file system table
ENVIRONMENT NOTES
This section describes system features that are not generic to OSF/1 but that are provided in this OSF/1 implementation.
ULTRIX Compatibility
FLAGS
mount Flags
The following options are specific to cdfs (CDFS) file systems.
defpermIgnores these permissions bits, if present, and defaults all file and directory permissions to the value 0666, with a zero UID (owned by root). Files and directories recorded on an ISO 9660 formatted file system may or may not have permission bits. This is a default option since the permissions on most of the existing ISO 9660 formatted CD-ROM’s do not map into the UID scheme that is used.
nodefpermUses the on-disk permission bits, if present. If a file or directory is not recorded with permissions bits, the 0666 default is used.
noversionStrips off the ’;#’ extension off the version string, if a file recorded on an ISO 9660 formatted file system contains a version string. Use this option if you are mounting a CD-ROM containing MS-DOS applications.
The defaults are ro, defperm.
The following options affect how quickly you see updates to a file or directory that has been modified by another host. Increasing these values will give you slightly better performance. Decreasing these values decreases the time it takes for you to see modifications made on another host. If you are the only person modifying files under this mount point, increase these values.
acdirmin=Vn
Hold cached directory attributes for at least n seconds.
acdirmax=Vn
Hold cached directory attributes for no more than n seconds. The maximum value is 3600.
acregmin=Vn
Hold cached file attributes for at least n seconds.
acregmax=Vn
Hold cached file attributes for no more than n seconds. The maximum value is 3600.
actimeo=Vn
Set all four attributes’ cache timeout values to n.
noacDo not set attribute caching. This is equivalent to actimeo=0.
noctoDo not get a fresh attribute when opening a file.
The defaults are acdirmin=30, acdirmax=60, acregmin=3, acregmax=60.
-t typeSpecifies the file system type. Additional type is:
•cdfs
DESCRIPTION
The mount command also allows you to mount an ISO 9660 or High Sierra (HSG) formatted file system onto a directory.
EXAMPLES
1.To mount an ISO 9660 or HSG formatted file system on the block device /dev/rz3c onto the local directory /cdfs with the file version strings stripped off, enter:
mount -t cdfs -o noversion /dev/rz3c /cdfs
NOTES
If mounting of an ISO 9660 or HSG volume fails with
cdfs_mount: Operation Not Supported
refer to the cdfs(4) reference page for information on the correct system configuration options to set before using CDFS.
Digital Extensions
SYNOPSIS
mount [-l] [-d] [-f] [-u] [-w]
FLAGS
-lDisplays the value of all file system options.
-dMounts a CDrom UFS file system.
-fPerforms a "fake" mount and does not actually mount the file system.
-uChanges the mount status of a read-only file system to read-write.
-wForces a file system to be mounted read-write, regardless of its description in the /etc/fstab file.
SYNOPSIS
umount [-f]
FLAGS
-fPerforms a fast unmount that causes only remote file systems to be unmounted without notifying the server.
RELATED INFORMATION
Calls: mount(2), fattach(3), fdetach(3)
Files: fstab(4)