All rights reserved.
Redistribution and use in source and binary forms are permitted
provided that the above copyright notice and this paragraph are
duplicated in all such forms and that any documentation,
advertising materials, and other materials related to such
distribution and use acknowledge that the software was developed
by the University of California, Berkeley. The name of the
University may not be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@(#)mount.8 6.14 (Berkeley) 06/22/90
mount [ -frwu ] special | node
mount [ -frwu ] [ -t nfs | ufs | external_type ] [ -o options ] special node
umount [ -af ] [ -t nfs | ufs | external_type ]
umount [ -f ] special | node
The optional argument -t can be used to indicate the file system type. The type ufs is the default. If the type is not one of the internally known types, mount will attempt to execute a program in /sbin/mount_XXX where XXX is replaced by the type name. The standard mount options (see below) are parsed and passed to external program via the -F option as a decimal number. Any additional options specific to the program can be passed as a comma separated list; these options are distinguished by starting with a - (dash). Those options that take a value are specified using the syntax -option=value. For example, the mount command:
mount -t mfs -o nosuid,-N,-s=4000 /dev/dk0b /tmp
causes mount to attempt to execute:
/sbin/mount_mfs -F 8 -N -s 4000 /dev/dk0b /tmp
Options are specified by a -o argument followed by a comma separated string of options. The following options apply to any file system that is being mounted:
The -u flag indicates that the status of an already mounted file system should be changed. Any of the options above may be changed; also a file system can be changed from read-only to read-write. The set of options is determined by first extracting the options for the file system from the fstab table, then applying any options specified by the -o argument, and finally applying the -r or -w option.
The following list can be used to override the defaults for an nfs mount:
Umount announces to the system that the removable file system node or whatever removable file system was previously mounted on device special should be removed. If the -f option is specified for umount , the file system is forcibly unmounted. Active special devices continue to work, but all other files return errors if further accesses are attempted. The root file system cannot be forcibly unmounted.
If the -a option is present for either mount or umount, all of the file systems described in fstab are mounted or unmounted. The optional argument -t can be used to indicate that the actions should only be taken on filesystems of the specified type. More than one type may be specified in a comma separated list. The list of filesystem types can be prefixed with ``no'' to specify the filesystem types on which no action should be taken. For example, the mount command:
mount -a -t nonfs,mfs
mounts all filesystems except those of type NFS and MFS.
The system maintains a list of currently mounted file systems. If invoked without an argument, mount prints the list. The optional argument -t can be used to indicate that only filesystems of the specified type should be listed. More than one type may be specified in a comma separated list. The list of filesystem types can be prefixed with ``no'' to indicate the types of filesystems to be excluded from the listing.
Physically write-protected and magnetic tape file systems must be mounted read-only or errors will occur when access times are updated, whether or not any explicit write is attempted.
Mounting a root directory on a non-directory makes some apparently good path names invalid.