File:  [DragonFly] / src / sbin / mount / mount.8
Revision 1.3: download - view: text, annotated - select for diffs
Fri Feb 6 22:11:48 2004 UTC (10 years, 6 months ago) by joerg
Branches: MAIN
CVS tags: HEAD, DragonFly_Stable, DragonFly_Snap29Sep2004, DragonFly_Snap13Sep2004, DragonFly_RELEASE_1_4_Slip, DragonFly_RELEASE_1_4, DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2, DragonFly_1_0_REL, DragonFly_1_0_RC1, DragonFly_1_0A_REL
Allows option to be specified on the command line when mount with -a.

Patch submitted by Chis Pressey <cpressey@catseye.mine.nu>, backported
from FreeBSD.

    1: .\" Copyright (c) 1980, 1989, 1991, 1993
    2: .\"	The Regents of the University of California.  All rights reserved.
    3: .\"
    4: .\" Redistribution and use in source and binary forms, with or without
    5: .\" modification, are permitted provided that the following conditions
    6: .\" are met:
    7: .\" 1. Redistributions of source code must retain the above copyright
    8: .\"    notice, this list of conditions and the following disclaimer.
    9: .\" 2. Redistributions in binary form must reproduce the above copyright
   10: .\"    notice, this list of conditions and the following disclaimer in the
   11: .\"    documentation and/or other materials provided with the distribution.
   12: .\" 3. All advertising materials mentioning features or use of this software
   13: .\"    must display the following acknowledgement:
   14: .\"	This product includes software developed by the University of
   15: .\"	California, Berkeley and its contributors.
   16: .\" 4. Neither the name of the University nor the names of its contributors
   17: .\"    may be used to endorse or promote products derived from this software
   18: .\"    without specific prior written permission.
   19: .\"
   20: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   21: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   22: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   23: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   24: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   25: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   26: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   27: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   28: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   29: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   30: .\" SUCH DAMAGE.
   31: .\"
   32: .\"     @(#)mount.8	8.8 (Berkeley) 6/16/94
   33: .\" $FreeBSD: src/sbin/mount/mount.8,v 1.31.2.12 2003/02/23 21:17:42 trhodes Exp $
   34: .\" $DragonFly: src/sbin/mount/mount.8,v 1.3 2004/02/06 22:11:48 joerg Exp $
   35: .\"
   36: .Dd June 16, 1994
   37: .Dt MOUNT 8
   38: .Os
   39: .Sh NAME
   40: .Nm mount
   41: .Nd mount file systems
   42: .Sh SYNOPSIS
   43: .Nm
   44: .Op Fl adfpruvw
   45: .Op Fl o Ar options
   46: .Op Fl t Ar ufs | external_type
   47: .Nm
   48: .Op Fl dfpruvw
   49: .Ar special | node
   50: .Nm
   51: .Op Fl dfpruvw
   52: .Op Fl o Ar options
   53: .Op Fl t Ar ufs | external_type
   54: .Ar special node
   55: .Sh DESCRIPTION
   56: The
   57: .Nm
   58: utility calls the
   59: .Xr mount 2
   60: system call to prepare and graft a
   61: .Ar "special device"
   62: or the remote node (rhost:path) on to the file system tree at the point
   63: .Ar node .
   64: If either
   65: .Ar special
   66: or
   67: .Ar node
   68: are not provided, the appropriate information is taken from the
   69: .Xr fstab 5
   70: file.
   71: .Pp
   72: The system maintains a list of currently mounted file systems.
   73: If no arguments are given to
   74: .Nm ,
   75: this list is printed.
   76: .Pp
   77: The options are as follows:
   78: .Bl -tag -width indent
   79: .It Fl a
   80: All the filesystems described in
   81: .Xr fstab 5
   82: are mounted.
   83: Exceptions are those marked as
   84: .Dq noauto ,
   85: excluded by the
   86: .Fl t
   87: flag (see below), or if they are already mounted (except the
   88: root filesystem which is always remounted to preserve
   89: traditional single user mode behavior).
   90: .It Fl d
   91: Causes everything to be done except for the actual system call.
   92: This option is useful in conjunction with the
   93: .Fl v
   94: flag to
   95: determine what the
   96: .Nm
   97: command is trying to do.
   98: .It Fl f
   99: Forces the revocation of write access when trying to downgrade
  100: a filesystem mount status from read-write to read-only.
  101: Also
  102: forces the R/W mount of an unclean filesystem (dangerous; use with
  103: caution).
  104: .It Fl o
  105: Options are specified with a
  106: .Fl o
  107: flag followed by a comma separated string of options.
  108: In case of conflicting options being specified, the rightmost option
  109: takes effect.
  110: The following options are available:
  111: .Bl -tag -width indent
  112: .It Cm async
  113: All
  114: .Tn I/O
  115: to the file system should be done asynchronously.
  116: This is a
  117: .Em dangerous
  118: flag to set,
  119: and should not be used unless you are prepared to recreate the file
  120: system should your system crash.
  121: .It Cm current
  122: When used with the
  123: .Fl u
  124: flag, this is the same as specifying the options currently in effect for
  125: the mounted filesystem.
  126: .It Cm force
  127: The same as
  128: .Fl f ;
  129: forces the revocation of write access when trying to downgrade
  130: a filesystem mount status from read-write to read-only.
  131: Also
  132: forces the R/W mount of an unclean filesystem (dangerous; use with caution).
  133: .It Cm fstab
  134: When used with the
  135: .Fl u
  136: flag, this is the same as specifying all the options listed in the
  137: .Xr fstab 5
  138: file for the filesystem.
  139: .It Cm noasync
  140: Metadata I/O should be done synchronously, while data I/O should be done
  141: asynchronously.
  142: This is the default.
  143: .It Cm noatime
  144: Do not update the file access time when reading from a file.
  145: This option
  146: is useful on filesystems where there are large numbers of files and
  147: performance is more critical than updating the file access time (which is
  148: rarely ever important).
  149: This option is currently only supported on local filesystems.
  150: .It Cm noauto
  151: This filesystem should be skipped when
  152: .Nm
  153: is run with the
  154: .Fl a
  155: flag.
  156: .It Cm noclusterr
  157: Disable read clustering.
  158: .It Cm noclusterw
  159: Disable write clustering.
  160: .It Cm nodev
  161: Do not interpret character or block special devices on the file system.
  162: This option is useful for a server that has file systems containing
  163: special devices for architectures other than its own.
  164: This option is set automatically when the user does not have super-user
  165: privileges.
  166: .It Cm noexec
  167: Do not allow execution of any binaries on the mounted file system.
  168: This option is useful for a server that has file systems containing
  169: binaries for architectures other than its own.
  170: .It Cm nosuid
  171: Do not allow set-user-identifier or set-group-identifier bits to take effect.
  172: Note: this option is worthless if a public available suid or sgid
  173: wrapper like
  174: .Xr suidperl 1
  175: is installed on your system.
  176: It is set automatically when the user does not have super-user privileges.
  177: .It Cm nosymfollow
  178: Do not follow symlinks
  179: on the mounted file system.
  180: .It Cm rdonly
  181: The same as
  182: .Fl r ;
  183: mount the file system read-only (even the super-user may not write it).
  184: .It Cm sync
  185: All
  186: .Tn I/O
  187: to the file system should be done synchronously.
  188: .It Cm suiddir
  189: A directory on the mounted filesystem will respond to the SUID bit
  190: being set, by setting the owner of any new files to be the same
  191: as the owner of the directory.
  192: New directories will inherit the bit from their parents.
  193: Execute bits are removed from
  194: the file, and it will not be given to root.
  195: .Pp
  196: This feature is designed for use on fileservers serving PC users via
  197: ftp, SAMBA, or netatalk.
  198: It provides security holes for shell users and as
  199: such should not be used on shell machines, especially on home directories.
  200: This option requires the SUIDDIR
  201: option in the kernel to work.
  202: Only UFS filesystems support this option.
  203: See
  204: .Xr chmod 2
  205: for more information.
  206: .It Cm update
  207: The same as
  208: .Fl u ;
  209: indicate that the status of an already mounted file system should be changed.
  210: .It Cm union
  211: Causes the namespace at the mount point to appear as the union
  212: of the mounted filesystem root and the existing directory.
  213: Lookups will be done in the mounted filesystem first.
  214: If those operations fail due to a non-existent file the underlying
  215: directory is then accessed.
  216: All creates are done in the mounted filesystem.
  217: .El
  218: .Pp
  219: Any additional options specific to a filesystem type that is not
  220: one of the internally known types (see the
  221: .Fl t
  222: option) may be passed as a comma separated list; these options are
  223: distinguished by a leading
  224: .Dq \&-
  225: (dash).
  226: Options that take a value are specified using the syntax -option=value.
  227: For example, the
  228: .Nm
  229: command:
  230: .Bd -literal -offset indent
  231: mount -t mfs -o nosuid,-N,-s=4000 /dev/dk0b /tmp
  232: .Ed
  233: .Pp
  234: causes
  235: .Nm
  236: to execute the equivalent of:
  237: .Bd -literal -offset indent
  238: /sbin/mount_mfs -o nosuid -N -s 4000 /dev/dk0b /tmp
  239: .Ed
  240: .Pp
  241: Additional options specific to filesystem types
  242: which are not internally known
  243: (see the description of the
  244: .Fl t
  245: option below)
  246: may be described in the manual pages for the associated
  247: .Pa /sbin/mount_ Ns Sy XXX
  248: utilities.
  249: .It Fl p
  250: Print mount information in
  251: .Xr fstab 5
  252: format.
  253: Implies also the
  254: .Fl v
  255: option.
  256: .It Fl r
  257: The file system is to be mounted read-only.
  258: Mount the file system read-only (even the super-user may not write it).
  259: The same as the
  260: .Cm rdonly
  261: argument to the
  262: .Fl o
  263: option.
  264: .It Fl t Ar ufs | external_type
  265: The argument following the
  266: .Fl t
  267: is used to indicate the file system type.
  268: The type
  269: .Ar ufs
  270: is the default.
  271: The
  272: .Fl t
  273: option can be used
  274: to indicate that the actions should only be taken on
  275: filesystems of the specified type.
  276: More than one type may be specified in a comma separated list.
  277: The list of filesystem types can be prefixed with
  278: .Dq no
  279: to specify the filesystem types for which action should
  280: .Em not
  281: be taken.
  282: For example, the
  283: .Nm
  284: command:
  285: .Bd -literal -offset indent
  286: mount -a -t nonfs,mfs
  287: .Ed
  288: .Pp
  289: mounts all filesystems except those of type
  290: .Tn NFS
  291: and
  292: .Tn MFS .
  293: .Pp
  294: If the type is not one of the internally known types,
  295: .Nm
  296: will attempt to execute a program in
  297: .Pa /sbin/mount_ Ns Sy XXX
  298: where
  299: .Sy XXX
  300: is replaced by the type name.
  301: For example, nfs filesystems are mounted by the program
  302: .Pa /sbin/mount_nfs .
  303: .Pp
  304: Most filesystems will be dynamically loaded by their
  305: .Nm
  306: programs
  307: if not already present in the kernel, using the
  308: .Xr vfsload 3
  309: subroutine.
  310: Because this mechanism requires writable temporary space,
  311: the filesystem type containing
  312: .Pa /tmp
  313: must be compiled into the kernel, and the filesystems containing
  314: .Pa /tmp
  315: and
  316: .Pa /usr/bin/ld
  317: must be listed in
  318: .Pa /etc/fstab
  319: before any filesystems which might be dynamically loaded.
  320: .It Fl u
  321: The
  322: .Fl u
  323: flag indicates that the status of an already mounted file
  324: system should be changed.
  325: Any of the options discussed above (the
  326: .Fl o
  327: option)
  328: may be changed;
  329: also a file system can be changed from read-only to read-write
  330: or vice versa.
  331: An attempt to change from read-write to read-only will fail if any
  332: files on the filesystem are currently open for writing unless the
  333: .Fl f
  334: flag is also specified.
  335: The set of options is determined by applying the options specified
  336: in the argument to
  337: .Fl o
  338: and finally applying the
  339: .Fl r
  340: or
  341: .Fl w
  342: option.
  343: .It Fl v
  344: Verbose mode.
  345: .It Fl w
  346: The file system object is to be read and write.
  347: .El
  348: .Sh DIAGNOSTICS
  349: Various, most of them are self-explanatory.
  350: .Pp
  351: .Dl XXXXX filesystem is not available
  352: .Pp
  353: The kernel does not support the respective filesystem type.
  354: Note that
  355: support for a particular filesystem might be provided either on a static
  356: (kernel compile-time), or dynamic basis (loaded as a kernel module by
  357: .Xr kldload 8 ) .
  358: Normally,
  359: .Nm
  360: or its subprocesses attempt to dynamically load a filesystem module if
  361: it has not been configured statically, using
  362: .Xr vfsload 3 .
  363: In this case, the above error message can also mean that you did not
  364: have permission to load the module.
  365: .Sh FILES
  366: .Bl -tag -width /etc/fstab -compact
  367: .It Pa /etc/fstab
  368: file system table
  369: .El
  370: .Sh SEE ALSO
  371: .Xr mount 2 ,
  372: .Xr vfsload 3 ,
  373: .Xr fstab 5 ,
  374: .Xr kldload 8 ,
  375: .Xr mount_cd9660 8 ,
  376: .Xr mount_ext2fs 8 ,
  377: .Xr mount_fdesc 8 ,
  378: .Xr mount_linprocfs 8 ,
  379: .Xr mount_mfs 8 ,
  380: .Xr mount_msdos 8 ,
  381: .Xr mount_nfs 8 ,
  382: .Xr mount_ntfs 8 ,
  383: .Xr mount_null 8 ,
  384: .Xr mount_nwfs 8 ,
  385: .Xr mount_portal 8 ,
  386: .Xr mount_procfs 8 ,
  387: .Xr mount_smbfs 8 ,
  388: .Xr mount_std 8 ,
  389: .Xr mount_umap 8 ,
  390: .Xr mount_union 8 ,
  391: .Xr sysctl 8 ,
  392: .Xr umount 8
  393: .Sh BUGS
  394: It is possible for a corrupted file system to cause a crash.
  395: .Sh CAVEATS
  396: After a successful
  397: .Nm ,
  398: the permissions on the original mount point determine if
  399: .Pa ..\&
  400: is accessible from the mounted file system.
  401: The minimum permissions for
  402: the mount point for traversal across the mount point in both
  403: directions to be possible for all users is 0111 (execute for all).
  404: .Sh HISTORY
  405: A
  406: .Nm
  407: utility appeared in
  408: .At v1 .