home *** CD-ROM | disk | FTP | other *** search
-
-
- MOUNT(8) UNIX Programmer's Manual MOUNT(8)
-
- NAME
- mount, umount - mount and dismount filesystems
-
- SYNOPSIS
- /usr/etc/mount [ -p ]
- /usr/etc/mount -a [ vd [ f | n ]] [ -t type ]
- /usr/etc/mount [ -rvd [ f | n ]] [ -t type ] [ -o options ]
- fsname dir
- /usr/etc/mount [ -vd [ f | n ]] [ -o options ] fsname | dir
-
- /usr/etc/umount [ -t type ] [ -h host ]
- /usr/etc/umount -a[v]
- /usr/etc/umount [ -v ] fsname | dir
-
- DESCRIPTION
- The mount command attaches a filesystem fsname to the file
- tree at the directory dir. The directory dir may or may not
- already exist. If dir already exists, its contents are hid-
- den 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.
-
- The umount command detaches the filesystem fsname previously
- mounted on directory dir. Either the filesystem name or the
- mounted-on directory may be used.
-
- The mount and umount commands maintain a table of mounted
- filesystems in /etc/mtab, described in mtab(5). The mount
- command mounts entries onto the filesystem from data it
- finds in 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 from
- /etc/mtab. 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/sd1a /usr 4.3 rw 1 1
-
- then the commands mount /usr and mount /dev/sd1a are short
- for mount /dev/sd1a /usr
-
- MOUNT OPTIONS
- -p Print the list of mounted filesystems in a format suit-
- able 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 the filesystem table.) 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.
-
- -n Mount the filesystems without updating /etc/mtab.
- (This can be useful for recovering from an overly full
- disk.)
-
- -v Verbose - mount displays a message indicating the
- filesystem being mounted.
-
- -d Don't check if NFS mount appears to be mounting a
- directory on top of itself. Otherwise, mount ignores
- such requests. Since the NFS daemon on a machine might
- not have the same filesystem root as the mount process,
- this option may be necessary in a chroot'ed environ-
- ment.
-
- -t The next argument is the filesystem type. The accepted
- types are 4.3, nfs, dos, macintosh, nucfs (NetWare UNIX
- Client file system), and cfs (CD-ROM file system). 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 filesys-
- tems 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.
-
- The following is a list of 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):
-
- rw read/write.
-
- ro read-only.
-
- suid set-uid execution allowed (cannot be specified;
- default if root mounts the filesystem).
-
- nosuid set-uid execution not allowed.
-
- noauto do not mount this file system automatically
- (mount -a).
-
- remountchange the mount options on this file system
- without unmounting it first.
-
- 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.
-
- bg if the first mount attempt fails, retry in the
- background.
-
- fg retry 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=n set server IP port number to n.
-
- soft return error if server doesn't respond. Do not
- use this option with the rw option.
-
- hard retry request until server responds.
-
- intr allow keyboard interrupts on hard mounts.
-
- net Tell the NFS automounter to recognize this as a
- "network" mount. The mount command will ignore
- these entries and allow the autonfsmount(8) to
- take care of them. 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
- "/".
-
- acregmin=n
- set minimum time interval (in seconds) for file
- entry caching
-
- acregmax=n
- set maximum time interval (in seconds) for file
- entry caching
-
- acdirmin=n
- set minimum time interval for directory entry
- caching
-
- acdirmax=n
- set maximum time interval for directory entry
- caching
-
- noac set no file attribute caching
-
- 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 filesys-
- tem. The number of bytes in a read or write request
- can be set with the rsize and wsize options.
-
- The attribute caching options can be used to defeat or
- modify client-side caching of attributes relating to objects
- accessed via NFS from a server. Changing these options can
- have a severe impact on the client-side performance of an
- NFS filesystem. A typical scenario where changing the
- parameters is beneficial is a multi-workstation development
- environment, where multiple clients are performing
- read/write file access to a common source file set.
-
- 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/sd1a /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/src mount remote filesystem
- mount serv:/usr/src /usr/src same as above
- mount -o hard serv:/usr/src /usr/src same as above but hard mount
- mount -p > /etc/fstab save current mount state
-
- FILES
- /etc/mtab table of mounted filesystems
- /etc/fstab table 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.
-
-