MOUNT(8) BSD MOUNT(8)
NAME
mount, umount - mount and unmount file system
SYNOPSIS
/etc/mount [-ravfp] [-t type] [-o [nfsoption|cdfsoption]]
/etc/umount [-av] [-root] [fsys | dir]
DESCRIPTION
The mount command mounts removable and remote file systems.
The umount command unmounts removable and remote file systems.
When mounting a removable file system located on a diskette, cartridge
tape, or magtape, specify the device name for dev and a pre-existing
directory pathname for dir.
When mounting a remote file system (that is, one located on another
host), specify the remote host and file system in the form host:fsname
for fsys and a non-existent directory for dir if it is a single level
mount. (The mount command creates a gateway object named dir.) Use an
existing directory for dir if the file system is to be mounted
hierarchically.
Note: You must have the nfs optional product installed in order to mount
remote file systems.
The mount and umount commands maintain a table of mounted file systems in
/etc/mtab. If you execute the mount command without arguments, it prints
the table. If you specify only one argument, the command searches
/etc/fstab for an entry with the same argument; if the entry exists, the
command then uses it to mount the file system.
OPTIONS
The command options can be one or more of the following items separated
by a space:
-a With /etc/mount, try to mount all file systems listed in the
file /etc/fstab. (This file contains entries added manually by
user.)
With /etc/umount, try to unmount all file systems listed in
/etc/mtab. (This file contains an entry for every remote file
system currently mounted by the local host.)
-f Fake a new /etc/mtab entry without mounting the file system
(nfs only).
-t type Accept the following argument as the file system type; the
recognized types are 4.3 for removable file systems, nfs for
remote file systems (nfs only), and cdfs for CDROM devices.
-o options
Accept the following arguments, separated by commas, as
options. The defaults are fg, retry=1, timeo=3, and hard. All
of these options, except -vd, are nfs-only.
bg Retry in background if server host's mountd(8c)
doesn't respond.
fg Retry in foreground.
hard Retransmit until server responds.
mtimeo=n Set the mount timeout to n tenths of a second.
port=n Set NFS port number n.
retrans=n Set the number of NFS transmission retries (that
is, the number of attempts NFS will make to access
files in a mounted file system) to n. There is no
ceiling on the number. When used with the soft
option, the default is 4.
retry=n Set number of mount retries to n.
ro Allow read only.
root Mount in the global root directory.
rsize=n Set the read request buffer size to n bytes.
rw Allow read/write.
soft Report an error if server fails to respond.
timeo=n Set the NFS transmission timeout to n tenths of a
second. When attempting to access the mounted file
system, NFS waits the specified amount of time for
response; if there is no response, NFS multiplies n
by 2 and retransmits the request. There is a 60
second ceiling on the timeout.
wsize=n Set the write request buffer size to n bytes.
vd=n Specify the volume descriptor of a CDROM device.
Default value is zero, which indicates the Primary
Volume Descriptor. This option is valid only in
conjunction with the -t cdfs option.
-p List the mounted file systems in the same format as entries in
/etc/fstab (nfs only).
-r Mount the file system as read-only.
-root Unmount the file system in the global root directory.
-v Display a message when mounting the file system.
FILES
/etc/mtab mount table
/etc/fstab file system table
BUGS
Note that physically write-protected file systems, as well as those on
magnetic tape, must be mounted read-only. If not, errors develop even if
no explicit write is attempted.
Mounting a removable file system that contains unreadable or otherwise
invalid data can have unpredictable consequences.
SEE ALSO
mount(2), fstab(5), mtab(5), mkdisk(8)