DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

mnt(C)


mnt, umnt -- mount/unmount filesystems

Syntax

mnt [ -atu ] [ -r | -n | -f fstyp ] [ directory ]

umnt [ -n | -f fstyp ] directory

Description

The mnt command is called by mountall(ADM) to mount local filesystems at boot time when the system goes to multiuser mode. The filesystems to be mounted are defined by entries in the filesys(F) file (/etc/default/filesys). This file lists all mountable filesystems and the directories at which they may be mounted. mountall only mounts local filesystem entries in filesys that specify rcmount=yes. Each filesys entry can also specify how a filesystem is to be checked using fsck(ADM).

root can use mnt to mount or unmount an individual filesystem or all filesystems of a given type. The filesystem(s) must have entries in filesys.

Users other than root can mount or unmount a filesystem if its filesys entry gives them permission (mount=yes) by entering the commands mnt directory and umnt directory. Once a filesystem has been mounted, they can manipulate it as part of the main filesystem, under the directory mount point.

umnt unmounts the mountable filesystem previously mounted as directory. umnt is equivalent to mnt used with the -u option.

The filesystem requirements are the same as those defined in the ``Warning'' and ``Limitations'' sections on the mount(ADM) manual page.

mnt takes the following options:


-a
Mounts the filesystems in /etc/default/filesys that specify rcmount=yes if the system has automatically rebooted. For each filesystem in filesys that has set rcmount=prompt, mnt will not mount the filesystem if a response is not entered within ten seconds of the prompt being displayed.

If mountall is invoked with this option, it passes it on to mnt. mnt, in turn, passes -a to fsck.

Only root can use this option.


-f fstyp
Mounts all remote filesystems of type fstyp in filesys that specify rcmount=yes. This option is usually used with remote filesystem types (NFS or NUCFS) after NFS or NUCFS services have been started.

Only root can use this option.


-n
Mounts all remote NFS filesystems defined in filesys that specify rcmount=yes. This option is equivalent to -f NFS.

Only root can use this option.


-r
Indicates to mnt that the rcmount and rcfsck entries in filesys(F) should be used instead of those for mount and fsck. mountall calls mnt with this option at system startup.

Only root can use this option.


-t
Displays the contents of /etc/default/filesys in a readable format.

-u
Forces mnt to behave like umnt.

Diagnostics

mnt fails if the filesystem to be mounted is currently mounted under another name.

Busy filesystems cannot be unmounted with umnt. A filesystem is busy if it contains an open file or if a user's present working directory resides within the filesystem.

Examples

The following is a sample /etc/default/filesys file:
   bdev=/dev/root  cdev=/dev/rroot  mountdir=/ \
   	desc="The Root Filesystem" \
   	rcmount=no \
   	mount=no
   bdev=/dev/u  cdev=/dev/ru  mountdir=/u \
   	desc="The User Filesystem" \
   	rcmount=yes \
   	fsckflags=-y
   bdev=/dev/x  cdev=/dev/rx  mountdir=/x \
   	desc="The Extra Filesystem" \
   	rcmount=no \
   	fsckflags=-y \
   	mount=yes
Of these examples, only /x is mountable by anyone other than root (mount=yes).

An example of a filesys entry for a filesystem mounted using NFS:

   bdev=nfs_svr:/u1  mountdir=/u1  fstyp=NFS \
   	fsck=no  rcfsck=no \
   	mount=yes  rcmount=no \
   	mntopts="hard,intr"
An example of a filesys entry for a filesystem mounted using NUCFS:
   bdev=nw_svr:u2  mountdir=/u2  fstyp=NUCFS \
   	fsck=no  rcfsck=no \
   	mount=yes  rcmount=no \
   	mntopts=""

Limitations

Only root may use the options -a, -f, -n, and -r. These options are intended to be invoked from a shell script such as those in the directory /etc/rc2.d.

The -r option cannot be used with either the -f or the -n option.

An NFS filesystem may only be mounted if NFS services are installed and running on the system.

An NUCFS filesystem may only be mounted if NUC services are installed and running on the system.

Files


/usr/bin/mnt
full pathname of mnt

/usr/bin/umnt
full pathname of umnt

/etc/default/filesys
defines mountable filesystems, mount options, and mount points

/etc/default/mnt
lists all remote filesystems known to the system

See also

filesys(F), mount(ADM), mountall(ADM), rc2(ADM)

Standards conformance

mnt is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003