MOUNT(8) —
NAME
mount, umount − mount and dismount filesystems (includes NFS extensions)
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
Mount announces to the system that a filesystem fsname is to be attached to the file tree at the directory dir. The directory dir must already exist. It becomes the name of the newly mounted root. The contents of dir are hidden until the filesystem is unmounted. If fsname is of the form host:path, the filesystem type is assumed to be nfs. If fsname is of the form host,host, the filesystem type is assumed to be afs. If fsname is of the form dev−#, the filesystem type is assumed to be dfs.
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). 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/hd0g /usr ufs rw 1 1
then the commands mount /usr and mount /dev/hd0g are shorthand for mount /dev/hd0g /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 /etc/fstab. (In this case, fsname and dir are taken from /etc/fstab.) If a type is specified all of the filesystems in /etc/fstab with that type is mounted. Filesystems are not necessarily mounted in the order listed in /etc/fstab.
−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: ufs, afs, dfs, and nfs; see fstab(5) for a description of these filesystem types.
−r Mount the specified filesystem read-only. This is a shorthand 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-separated 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):
rwread/write.
roread-only.
suidset-uid execution allowed.
nosuidset-uid execution not allowed.
noautodo not mount this file system automatically (mount -a).
options specific to ufs file systems (the default is noquota).
quotausage limits enforced.
noquotausage limits not enforced.
Options specific to afs file systems (the default is cache=/usr/venuscache, cache_reserve=1024, max_cache_size=30720):
cachelocation of the cache directory.
cache_reserve
amount of space in kilobytes to reserve in calculating the cache size.
cache%percent of free space to use in cache.
cache_size
specifies an absolute cache size in kilobytes. Overrides cache_reserve and cache%.
max_cache_size
specifies the absolute maximum cache size in kilobytes.
notimeprevents afs from trying to keep your workstation’s time in sync with the afs server’s time.
cache_files
overrides the calculated number of files to keep in the vice cache. This is normally cache_size/12. It must be between 500 and 3200.
Only one afs filesystem may be mounted at a time. See fs(8) for information on how to access other afs file systems. Free space in the cache is determined by taking the space currently used in the cache and adding it to the available space in the file system the cache resides in. There must be at least 2 megabytes free.
Options specified to dfs file systems (default is user=root,group=wheel).
userdefault user for the owner of all dos files in this file system.
groupdefault group for the group of all dos files in this file system.
change_user
allows the default user to be changed with chown(1). NOTE: This will affect the way all files look in the file system.
change_group
allows the default user to be changed with chgrp(1). NOTE: This will affect the way all files look in the file system.
change_all
shorthand for change_user, change_group.
upperdisplay dos files as uppercase.
noexecute
don’t allow execute permission on dos files.
user_only
dos files are only accessible to the default user.
group_only
dos files are only accessible to the default group.
If user_only, group_only is specified, the dos files are accessible to the default user and the default group.
options specific to nfs (NFS) file systems (the defaults are: fg,retry=10000,timeo=7,retrans=4,port=NFS_PORT,soft with defaults for rsize and wsize set by the kernel):
bgif the first mount attempt fails, retry in the background.
fgretry in foreground.
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.
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. The default number is 2048, but it is possible to experiment with larger sized (3072, 4096) up to 4096. If the larger size works, it will improve performance. However, it might not work on a local network interface. Use soft mount when trying to find a suitable size.
UMOUNT OPTIONS
−h host
Unmount all filesystems listed in /etc/mtab that are nfs 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/hd0g /usr mount a local disk
mount −at ufs mount all ufs 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), umount(2), fstab(5), mntent(5), mtab(5), mountd(8C), nfsd(8C)
BUGS
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.
PRPQs 5799-WZQ/5799-PFF: IBM/4.3 — December 1988