mount(1M)
NAME
mount, umount − mount and unmount file system
SYNOPSIS
/etc/mount [fsname directory [-frv] [-s|-u] [-o options] [-t type]]
/etc/mount -a [-fv] [-s|-u]
/etc/mount [-p] [-l|-L] [-s|-u]
/etc/umount [-v] [-s] fsname
/etc/umount [-v] [-s] directory
/etc/umount -a [-v] [-s] [-h host]] [-t type]]
DESCRIPTION
mount announces to the system that a removable file system is to be attached to the file tree at directory. directory must already exist, and becomes the name of the root of the newly mounted file system. directory must be given as an absolute path name and cannot be a context-dependent file (see cdf(4)). fsname must be either the name of a special file or of the form host:path. If fsname is of the form host:path, the file system type is assumed to be nfs (see -t option below).
These commands maintain a table of mounted devices in /etc/mnttab. If invoked with no arguments, mount prints the table.
umount announces to the system that the removable file system fsname previously mounted on directory directory is to be unmounted. Either the file system name or the directory where the file system is mounted can be specified.
In the HP Clustered Environment, only NFS and HFS file systems can be mounted and unmounted from client nodes. See Networking Features below.
Options (mount)
mount recognizes the following options. Options are position-independent and can occur in any order.
-a Attempt to mount all file systems described in /etc/checklist. All optional fields in /etc/checklist must be included and supported. If type is specified, all file systems in /etc/checklist with that type are mounted. File systems are not necessarily mounted in the order listed in /etc/checklist.
-f Force the file system to be mounted, even if the file system clean flag indicates that the file system should have fsck run on it before mounting (see fsck(1M)).
-p Print the list of mounted file systems in a format suitable for use in /etc/checklist.
-l In the HP Clustered environment, prints only HFS and CDFS file systems mounted on the local cnode ( NFS mounts are not displayed).
-L In the HP Clustered environment, prints only file systems which may be unmounted from the local cnode. (Includes file systems mounted on the local node and cluster-wide NFS mounts).
-r Mount the specified file system as read-only. This option implies -o ro. Physically write-protected file systems must be mounted in this way or errors occur when access times are updated, whether or not any explicit write is attempted.
-u Force an update of /etc/mnttab from the kernel mount table.
-s Do not update the /etc/mnttab file with kernel mount information. Use of this option is provided for special cases of backward compatilibity only and is strongly discouraged. This option may be removed in a future release.
-t type Specify a file system type. Acceptable types are hfs, cdfs, and nfs (see checklist(4)). If -a is not used, the single file system specified is mounted as that type.
-v Verbose mode. Write a message to the standard output indicating which file system is being mounted.
-o options Specify a list of comma-separated options from the list below. Some options are valid for any file system type, while others apply only to a specific type.
The following options are valid on all file systems:
defaults Use all default options. When used, this must be the only option specified.
rw Read-write (default).
ro Read-only.
suid Set-user- ID execution allowed (default).
nosuid Set-user- ID execution not allowed.
The following options are valid only on hfs type file systems:
quota Disk quotas enabled (valid only for rw type file systems).
noquota Disk quotas disabled (default).
Mounting with the quota option also enables quotas for the file system, unlike some other systems which require the additional invocation of the quotaon command after the file system has been mounted (see quotaon(1M)). Running quotaon does no harm, but is not necessary.
Options (umount)
umount recognizes the following options. Options are position-independent and can occur in any order.
-a Unmount all locally mounted and NFS mounted file systems described in /etc/mnttab.
-s Do not update the /etc/mnttab file with kernel mount information. Use of this option is provided for special cases of backward compatilibity only and is strongly discouraged. This option may be removed in a future release.
-h host Unmount only those file systems listed in /etc/mnttab that are remote-mounted from host.
-t type Unmount only file systems mounted with the given type.
-v Verbose mode. Write a message to the standard output indicating which file system is being unmounted.
NETWORKING FEATURES
NFS
The following options are specific to nfs file systems:
acregmin=n Hold cached attributes for at least n seconds after file modification.
acregmax=n Hold cached attributes for no more than n seconds after file modification.
acdirmin=n Hold cached attributes for at least n seconds after directory update.
acdirmax=n Hold cached attributes for no more than n seconds after directory update.
actimeo=n Set min and max times for regular files and directories to n seconds.
bg If the first mount attempt fails, retry in the background.
devs Allow access to local devices (default).
nodevs Deny access to local devices.
fg Retry in foreground (default).
hard Once the file system is mounted, retry subsequent NFS requests until server responds (default).
intr Permit interrupts for hard mounts (default).
nocto Suppress fresh attributes when opening a file.
noac Suppress attribute and name (lookup) caching.
nointr Ignore interrupts for hard mounts.
port=n Set server UCP port number to n (default is the port customarily used for NFS servers).
retrans=n Set number of NFS retransmissions to n (default = 4).
retry=n Set number of mount failure retries to n (default = 1).
rsize=n Set read buffer size to n bytes (default set by kernel).
timeo=n Set NFS timeout to n tenths of a second (default = 7).
wsize=n Set write buffer size to n bytes (default set by kernel).
soft Once the file system is mounted, return error if server does not respond.
Regular defaults are:
acregmin=3, acregmax=60, acdirmin=30, acdirmax=60.
actimeo has no default; it sets acregmin, acregmax, acdirmin, and acdirmax to the value specified.
The bg option causes mount to run in the background if the server’s mount daemon does not respond. mount attempts each request retry=n times before giving up. Once the file system is mounted, each NFS request made in the kernel waits timeo=n tenths of a second for a response. If no response arrives, the timeout is multiplied by 2 and the request is retransmitted. When retrans=n retransmissions have been sent with no reply, a soft mounted file system returns an error on the request and a hard mounted file system retries the request. By default, the retry requests for a hard mounted file system can be interrupted. If the nointr option is specified, retry requests for a hard mounted file system are not interruptable which means that retry requests continue until successful. File systems that are mounted rw (read-write) should use the hard option. The number of bytes in a read or write request can be set with the rsize and wsize options. The devs option allows access to devices attached to the NFS client via device files located on the mounted NFS file system. The nodevs option denies access to devices attached to the NFS client by causing attempts to read or write to NFS device files to return an error.
File Attributes
The attribute cache retains file attributes on the client. Attributes for a file are assigned a time to be flushed. If the file is modified before the flush time, the flush time is extended by the time since the last modification (under the assumption that files that changed recently are likely to change soon). There is a minimum and maximum flush time extension for regular files and for directories. Setting actimeo=n extends flush time by n seconds for both regular files and directories.
NFS Mounts in HP Clustered Environment:
If an NFS mount is made from the server node or any of the client nodes, the NFS file system is accessible from all nodes. If the mount is made from a client node and the client node is rebooted, the mount continues to function normally for all remaining nodes, and will function for the rebooted client without remounting the NFS file system.
DIAGNOSTICS
Attempting to mount a currently mounted non-nfs volume under another name results in an error.
umount complains if the special file is not mounted or if it is busy. The file system is busy if it contains an open file or some user’s working directory.
Cascaded distributed mounts (mounts whose mount point resides on another client node’s locally mounted disk) are not supported.
EXAMPLES
Mount a local disk:
mount /dev/dsk/c0d0s4 /usr
NFS:
Mount a remote file system:
mount serv:/usr/src /usr/src -t nfs
Same as above:
mount serv:/usr/src /usr/src
Same as above but with a soft mount; the file system is mounted read-only:
mount serv:/usr/src /usr/src -o soft,ro
WARNINGS
A directory or file must be exported by exportfs before it is NFS mounted (see exportfs(1M)).
Some degree of validation is done on the file system. However, it is generally unwise to mount file systems that are defective, corrupt, or of unknown origin.
Mounting CD-ROM media on a cnode that is not the cluster server is not supported.
AUTHOR
mount was developed by HP, AT&T, the University of California, Berkeley, and Sun Microsystems.
FILES
/etc/checklist file system table
/etc/mnttab mount table
SEE ALSO
fsclean(1M), quotaon(1M), mount(2), checklist(4), mnttab(4), quota(5).
Hewlett-Packard Company — HP-UX Release 9.0: August 1992