MOUNT(8) COMMAND REFERENCE MOUNT(8) NAME mount, umount - mount and dismount file systems SYNOPSIS /etc/mount [ -p ] /etc/mount -a[fv] [ -t type ] /etc/mount [ -frv ] [ -t type ] [ -o options ] fsname dir /etc/mount [ -vf ] [ -o options ] fsname | dir /etc/umount [ -t type ] [ -h host ] /etc/umount -a[v] /etc/umount [ -v ] DESCRIPTION The mount command announces to the system that a file system fsname is to be attached to the file tree at the directory dir (the directory must already exist because it becomes the name of the newly-mounted root). The contents of dir are hidden until the file system is unmounted. If fsname is of the form host:path the file system type is assumed to be NFS. The umount command announces to the system that the file system fsname previously mounted on directory dir should be removed; either the file system name or the mounted-on directory may be used. Both mount and umount maintain a table of mounted file systems in /etc/mtab, described in mtab(5). If invoked without an argument, mount displays the table; if invoked with only one of fsname or dir mount searches the file /etc/fstab (see fstab(5)) for an entry whose dir or fsname field matches the given argument. For example, if this line is in /etc/fstab /dev/ds00a/usr 4.2 rw 1 1 then the commands mount /usr and mount /dev/ds00a are shorthand for mount /dev/ds00a /usr. OPTIONS mount Options -p Print the list of mounted file systems in a format suitable for use in /etc/fstab. -a Attempt to mount all file systems described in /etc/fstab. (In this case, fsname and dir are taken from /etc/fstab.) If a type is specified, all file systems in /etc/fstab with that type are mounted. File systems are not necessarily mounted in the order listed in /etc/fstab. Printed 4/6/89 1
MOUNT(8) COMMAND REFERENCE MOUNT(8) -f Fake a new /etc/mtab entry, but do not mount any file systems. -v Display a message in verbose mode indicating the file system being mounted. -t The next argument is the file system type. The accepted types are 4.2 and nfs. See fstab(5) for a description of these file system types. -r The specified file system is mounted read-only; this is a shorthand for mount -o ro fsname dir Physically write-protected and magnetic tape file systems must be mounted read-only, or errors occur when access times are updated, even if an explicit write is attempted. -o Specify options, a list of comma-separated words from the following list; some options are valid for all file system types, while others apply to a specific type only. These options are valid on all file systems (the default is rw,suid). rw read/write ro read-only suid set-uid execution allowed nosuid set-uid execution not allowed noauto do not mount this file system automatically (mount -a) These options are specific to 4.2 file systems; the default is noquota. quota usage limits enforced noquota usage limits not enforced These options are specific to NFS file systems; the defaults are fg,retry=1,timeo=7,retrans=3,port=NFSPORT,hard. bg if the first mount attempt fails, retry in the background Printed 4/6/89 2
MOUNT(8) COMMAND REFERENCE MOUNT(8) fg retry in foreground retry=n set number of times to retry mount to n rsize=n set read buffer size to n bytes; defaults set by the kernel wsize=n set write buffer size to n bytes; defaults set by the kernel timeo=n set NFS timeout to n tenths of a second retrans=n set number of NFS retransmissions to n port=n set server IP port number to n soft return error if server doesn't respond hard retry request until server responds intr allow keyboard interrupts on hard mounts The bg option causes mount to run in the background if the server's mountd(8c) 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 prints a message and retries the request. File systems that are mounted rw (read-write) should use the hard option. The intr option allows keyboard interrupts to kill a process that is hung waiting for a response on a hard mounted file system. The number of bytes in a read or write request can be set with the rsize and wsize options. umount Options -h host All file systems listed in /etc/mtab that are remote-mounted from host are unmounted. -a Attempt to unmount all file systems currently mounted (listed in /etc/mtab). In this case, fsname is taken from /etc/mtab. -v Display a message in verbose mode indicating the file system being unmounted. Printed 4/6/89 3
MOUNT(8) COMMAND REFERENCE MOUNT(8) EXAMPLES Mount a local disk: mount /dev/xy0g /usr Fake an entry for nd root: mount -ft 4.2 /dev/nd0 / Mount all 4.2 file systems: mount -at 4.2 Mount remote file system: mount -t nfs serv:/usr/src /usr/src Mount remote file system: mount serv:/usr/src /usr/src Hard mount a remote file system: mount -o hard serv:/usr/src /usr/src Save current mount state: mount -p > /etc/fstab FILES /etc/mtab table of mounted file systems /etc/fstab table of file systems mounted at boot CAVEATS You MUST specify -o wsize=2048 when mounting a remote file system because writes to file systems with files greater than 8Kb are unreliable. Mounting file systems full of garbage crashes the system. No more than one ND client should mount an ND disk partition as "read-write" or the file system may become corrupted. If the directory on which a file system is to be mounted is symbolically linked, the file system is mounted on the directory to which the symbolic link refers, rather than being mounted on top of the symbolic link itself. The permissions of a mounted file system and the mount point for that file system must be the same. Differences in permissions can result in Permission denied errors. Printed 4/6/89 4
MOUNT(8) COMMAND REFERENCE MOUNT(8) SEE ALSO mount(2), unmount(2), fstab(5), mountd(8c), nfsd(8). Printed 4/6/89 5
%%index%% na:264,99; sy:363,1478; de:1841,2195; op:4036,848;5220,3255;8811,3714; ex:12861,578; fi:13439,196; ca:13635,1264; se:15235,253; %%index%%000000000161