Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ umount(8) — NEXTSTEP 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mount(2)

unmount(2)

fstab(5)

mountd(8C)

nfsd(8C)

netinfo(5)

MOUNT(8)  —  UNIX Programmer’s Manual

NAME

mount, umount − mount and dismount filesystems

SYNOPSIS

/usr/etc/mount [ −p ]
/usr/etc/mount −a[fv] [ −t type ]
/usr/etc/mount [ −frv ] [ −t type ] [ −o options ] fsname dir
/usr/etc/mount [ −vf ] [ −o options ] fsname | dir

/usr/etc/umount [ −t type ] [ −h host ]
/usr/etc/umount −a[v]
/usr/etc/umount [ −v ] fsname | dir

DESCRIPTION

mount announces to the system that a filesystem fsname is to be attached to the file tree at the directory dir. The directory dir may or may not already exist.  If dir already exists, its contents are hidden until the filesystem is unmounted, and dir becomes the name of the newly mounted root.  If fsname is of the form host:path the filesystem type is assumed to be nfs.

umount announces to the system that the filesystem fsname previously mounted on directory dir should be removed.  Either the filesystem name or the mounted-on directory may be used. 

mount and umount maintain a table of mounted filesystems in /etc/mtab, described in mtab(5). mount can read entries from the filesystem table, which may come from one of two places. If NetInfo is running, it comes from netinfo(5).  Otherwise, the entries are stored in /etc/fstab(5).  Note that boot time mounts of type "4.3" filesystems always occur before NetInfo is running, and so must be stored in /etc/fstab to be seen by the system.  If invoked without an argument, mount displays the table.  If invoked with only one of fsname or dir mount searches the filesystem table for an entry whose dir or fsname field matches the given argument.  For example, if this line is in /etc/fstab:

/dev/xy0g /usr 4.3 rw 1 1

then the commands mount /usr and mount /dev/xy0g are short for mount /dev/xy0g /usr

MOUNT OPTIONS

−p Print the list of mounted filesystems in a format suitable for use in /etc/fstab. 

−a Attempt to mount all the filesystems described in the filesystem table.  (In this case, fsname and dir are taken from thefilesystemtable) If a type is specified all of the filesystems in the filesystem table with that type are mounted.  Filesystems are not necessarily mounted in the order listed in the table. 

−f Fake a new /etc/mtab entry, but do not actually mount any filesystems. 

−v Verbose — mount displays a message indicating the filesystem being mounted. 

−t The next argument is the filesystem type.  The accepted types are: 4.3, and nfs; see fstab(5) for a description of these filesystem types.

−r Mount the specified filesystem read-only.  This is short for:

mount −o ro fsname dir

Physically write-protected and magnetic tape filesystems must be mounted read-only, or errors occur when access times are updated, whether or not any explicit write is attempted. 

−o Specify options , a list of comma seperated words from the list below.  Some options are valid for all filesystem types, while others apply to a specific type only. 

options valid on all file systems (the default is rw,suid if the filesystem is mounted by root and rw,nosuid if the filesystem is not mounted by root):

rwread/write. 

roread-only. 

suidset-uid execution allowed (only works if root mounts the filesystem). 

nosuidset-uid execution not allowed. 

noautodo not mount this file system automatically (mount -a). 

options specific to 4.3 file systems (the default is noquota). 

quotausage limits enforced. 

noquotausage limits not enforced. 

options specific to nfs (NFS) file systems.  The defaults are:      fg,mnttimeo=20,retry=1,timeo=7,retrans=3,port=NFS_PORT,hard The defaults for rsize and wsize set by the kernel. 

bgif the first mount attempt fails, retry in the background. 

fgretry in foreground. 

mnttimeo=n
set mount timeout to n seconds. 

retry=nset number times to retry mount to n. 

rsize=nset read buffer size to n bytes. 

wsize=nset write buffer size to n bytes. 

timeo=nset NFS timeout to n tenths of a second. 

retrans=n
set number of NFS retransmissions to n. 

port=nset server IP port number to n. 

softreturn error if server doesn’t respond. 

hardretry request until server responds. 

intrallow keyboard interrupts on hard mounts. 

netPerform a "network" mount.  This option allows one to create a uniform view of the network from all machines.  Typically, the mount point specified is "/Net".  A mount of the form "mount -o net MACHINE:PATH /Net" translates to "mount MACHINE:PATH /Net/MACHINE/PATH".  If the mount is performed on the machine serving the file system, then no actual mount occurs.  Instead, a symbolic link is created from "/Net/MACHINE" to "/". 

The bg option causes mount to run in the background if the server’s mountd(8) does not respond. mount attempts each request retry=n times before giving up.  Once the filesystem is mounted, each NFS request made in the kernel waits timeo=n tenths of a second for a response.  If no response arrives, the time-out is multiplied by 2 and the request is retransmitted.  When retrans=n retransmissions have been sent with no reply a soft mounted filesystem returns an error on the request and a hard mounted filesystem prints a message and retries the request.  Filesystems 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 filesystem.  The number of bytes in a read or write request can be set with the rsize and wsize options. 

UMOUNT OPTIONS

−h host
Unmount all filesystems listed in /etc/mtab that are remote-mounted from host. 

−a Attempt to unmount all the filesystems currently mounted (listed in /etc/mtab). In this case, fsname is taken from /etc/mtab. 

−v Verbose — umount displays a message indicating the filesystem being unmounted. 

EXAMPLES

mount /dev/xy0g /usr            mount a local disk
mount −ft 4.3 /dev/nd0 /       fake an entry for nd root
mount −at 4.3                  mount all 4.3 filesystems
mount −t nfs serv:/usr/src /usr/srcmount remote filesystem
mount serv:/usr/src /usr/src    same as above
mount −o hard serv:/usr/src /usr/srcsame as above but hard mount
mount −p > /etc/fstab          save current mount state

FILES

/etc/mtabtable of mounted filesystems
/etc/fstabtable of filesystems mounted at boot

SEE ALSO

mount(2), unmount(2), fstab(5), mountd(8C), nfsd(8C), netinfo(5)

BUGS

Mounting filesystems full of garbage crashes the system. 

If the directory on which a filesystem is to be mounted is a symbolic link, the filesystem is mounted on the directory to which the symbolic link refers, rather than being mounted on top of the symbolic link itself. 

7th Edition  —  Jan 5, 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026