MNT(C) UNIX System V
Name
mnt, umnt - mount a filesystem
Syntax
/usr/bin/mnt [ -urant ] [ directory ]
/usr/bin/umnt directory
Description
mnt allows users other than the super-user to access the
functionality of the mount(ADM) command to mount selected
filesystems. The super-user can define how and when a
filesystem mount is permitted via special entries in the
/etc/default/filesys file.
The filesystem requirements are the same as defined for
mount(ADM).
umnt removes the mountable filesystem previously mounted in
directory .
mnt is invoked from the /etc/rc scripts with the -r, the -n
and possibly the -a flag to mount filesystems when the
system comes up multiuser. The -a flag is used when the
system has autobooted. None of these flags should be
specified during normal command line use.
The -n flag directs the system to mount all filesystems
defined as fstyp ``NFS'' with rcmount set to ``yes'' in the
/etc/default/filesys file. Filesystems of this type should
have bdev defined as follows:
bdev= hostname:pathname
The cdev entry is not necessary if the filesystem is of type
``NFS''. rcfsck should be set to ``no''. As stated
previously, fstyp must be ``NFS'' and rcmount must be set to
``yes''.
The -t flag displays the contents of /etc/default/filesys.
The -u flag forces mnt to behave like umnt.
Options
The following options can be defined in the
/etc/default/filesys entry for a filesystem:
bdev=/dev/device Name of block device associated with the
filesystem.
cdev=/dev/device Name of character (raw) device
associated with the filesystem.
mountdir=/directory The directory the filesystem is to be
mounted on.
desc=name A string describing the filesystem.
passwd=string An optional password prompted for at
mount request time. Cannot be a simple
string; must be in the format of
/etc/passwd. (See Notes.)
fsck=yes, no, dirty, prompt
If yes/no, tells explicitly whether or
not to run fsck. If dirty, fsck is run
only if the filesystem requires
cleaning. If prompt, the user is
prompted for a choice. If no entry is
given, the default value is dirty.
fsckflags=flags Any flags to be passed to fsck.
rcfsck=yes, no, dirty, prompt
Similar to fsck entry, but only applies
when the -r flag is passed.
maxcleans=n The number of times to repeat cleaning
of a dirty filesystem before giving up.
If undefined, default is 4.
mount=yes, no, prompt
If yes or no, users are allowed or
disallowed to mount the filesystem,
respectively. If prompt, the user
specifies whether the filesystem should
be mounted.
rcmount=yes, no, prompt
If yes, the filesystem is mounted by
/etc/rc2 when the system comes up
multiuser. If no, the filesystem is
never mounted by /etc/rc2. With prompt,
a query is displayed at boot time to
mount the filesystem.
mountflags=flags Any flags to be passed to mount.
prep=yes, no, prompt
Indicates whether any prepcmd entry
should always be executed, never
executed, or executed as specified by
user.
prepcmd=command An arbitrary shell command to be invoked
immediately following password check and
prior to running fsck.
init=yes, no, prompt
Indicates whether an initcmd entry
should always be executed, never be
executed, or executed as specified by
user.
initcmd=command An optional, arbitrary shell command to
be invoked immediately following a
successful mount.
fstyp=type Defines the filesystem type. Available
types are NFS, S51K, XENIX, and DOS.
nfsopts=opts Defines NFS options for filesystems of
type NFS.
Any entries containing spaces, tabs, or newlines must be
contained in double quotes (").
The only mandatory entries in /etc/default/filesys are bdev
and mountdir. The prepcmd and initcmd options can be used
to execute another command before or after mounting the
filesystem. For example, initcmd could be defined to send
mail to root whenever a given filesystem is mounted.
When invoked without arguments, mnt attempts to mount all
filesystems that have the entries mount=yes or mount=prompt.
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 rcmount=yes \
fsckflags=-y desc="The User Filesystem"
bdev=/dev/x cdev=/dev/rx mountdir=/u rcmount=no \
mount=yes fsckflags=-y desc="The Extra Filesystem"
Of the examples above, only /x is mountable by the user.
Files
/etc/default/filesys
Filesystem data
See Also
mount(ADM), default(F)
Diagnostics
mnt will fail 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.
Notes
The NFS options are only valid if NFS is installed; refer to
your NFS documentation for mount options that are specific
to NFS.
Some degree of validation is done on the filesystem, however
it is generally unwise to mount corrupt filesystems.
In order to create a password for a filesystem, the system
administrator must run the passwd(C) command using the -f
option.
Value Added
mnt is an extension of AT&T System V provided by the Santa
Cruz Operation.
(printed 2/15/90) MNT(C)