1 MOUNT(1M)                    Maintenance Commands                    MOUNT(1M)
   2 
   3 
   4 
   5 NAME
   6        mount, umount - mount or unmount file systems and remote resources
   7 
   8 SYNOPSIS
   9        mount [-p | -v]
  10 
  11 
  12        mount [-F FSType] [generic_options] [-o specific_options]
  13             [-O] special | mount_point
  14 
  15 
  16        mount [-F FSType] [generic_options] [-o specific_options]
  17             [-O] special mount_point
  18 
  19 
  20        mount -a [-F FSType] [-V] [current_options]
  21             [-o specific_options] [mount_point]...
  22 
  23 
  24        umount [-f] [-V] [-o specific_options] special | mount_point
  25 
  26 
  27        umount -a [-f] [-V] [-o specific_options] [mount_point]...
  28 
  29 
  30 DESCRIPTION
  31        mount attaches a file system to the file system hierarchy at the
  32        mount_point, which is the pathname of a directory. If mount_point has
  33        any contents prior to the mount operation, these are hidden until the
  34        file system is unmounted.
  35 
  36 
  37        umount unmounts a currently mounted file system, which may be specified
  38        either as a mount_point or as special, the device on which the file
  39        system resides.
  40 
  41 
  42        The table of currently mounted file systems can be found by examining
  43        the mounted file system information file. This is provided by a file
  44        system that is usually mounted on /etc/mnttab. The mounted file system
  45        information is described in mnttab(4). Mounting a file system adds an
  46        entry to the mount table; a umount removes an entry from the table.
  47 
  48 
  49        When invoked with both the special and mount_point arguments and the -F
  50        option, mount validates all arguments except for special and invokes
  51        the appropriate FSType-specific mount module. If invoked with no
  52        arguments, mount lists all the mounted file systems recorded in the
  53        mount table, /etc/mnttab. If invoked with a partial argument list (with
  54        only one of special or mount_point, or with both special or mount_point
  55        specified but not FSType), mount will search /etc/vfstab for an entry
  56        that will supply the missing arguments. If no entry is found, and the
  57        special argument starts with /, the default local file system type
  58        specified in /etc/default/fs will be used. Otherwise the default remote
  59        file system type will be used. The default remote file system type is
  60        determined by the first entry in the /etc/dfs/fstypes file. After
  61        filling in missing arguments, mount will invoke the FSType-specific
  62        mount module.
  63 
  64 
  65        For file system types that support it, a file can be mounted directly
  66        as a file system by specifying the full path to the file as the special
  67        argument.  In such a case, the nosuid option is enforced. If specific
  68        file system support for such loopback file mounts is not present, you
  69        can still use lofiadm(1M) to mount a file system image. In this case,
  70        no special options are enforced.
  71 
  72 
  73        Only a user with sufficient privilege (at least PRIV_SYS_MOUNT) can
  74        mount or unmount file systems using mount and umount. However, any user
  75        can use mount to list mounted file systems and resources.
  76 
  77 OPTIONS
  78        -F FSType
  79            Used to specify the FSType on which to operate. The FSType must be
  80            specified or must be determinable from /etc/vfstab, or by
  81            consulting /etc/default/fs or /etc/dfs/fstypes.
  82 
  83 
  84        -a [ mount_points. . . ]
  85            Perform mount or umount operations in parallel, when possible.
  86 
  87            If mount points are not specified, mount will mount all file
  88            systems whose /etc/vfstab "mount at boot" field is yes. If mount
  89            points are specified, then /etc/vfstab "mount at boot" field will
  90            be ignored.
  91 
  92            If mount points are specified, umount will only umount those mount
  93            points. If none is specified, then umount will attempt to unmount
  94            all file systems in /etc/mnttab, with the exception of certain
  95            system required file systems: /, /usr, /var, /var/adm, /var/run,
  96            /proc, /dev/fd and /tmp.
  97 
  98 
  99        -f
 100            Forcibly unmount a file system.
 101 
 102            Without this option, umount does not allow a file system to be
 103            unmounted if a file on the file system is busy. Using this option
 104            can cause data loss for open files; programs which access files
 105            after the file system has been unmounted will get an error (EIO).
 106 
 107 
 108        -p
 109            Print the list of mounted file systems in the /etc/vfstab format.
 110            Must be the only option specified. See BUGS.
 111 
 112 
 113        -v
 114            Print the list of mounted file systems in verbose format. Must be
 115            the only option specified.
 116 
 117 
 118        -V
 119            Echo the complete command line, but do not execute the command.
 120            umount generates a command line by using the options and arguments
 121            provided by the user and adding to them information derived from
 122            /etc/mnttab. This option should be used to verify and validate the
 123            command line.
 124 
 125 
 126        generic_options
 127            Options that are commonly supported by most FSType-specific command
 128            modules. The following options are available:
 129 
 130            -m
 131                Mount the file system without making an entry in /etc/mnttab.
 132 
 133 
 134            -g
 135                Globally mount the file system. On a clustered system, this
 136                globally mounts the file system on all nodes of the cluster. On
 137                a non-clustered system this has no effect.
 138 
 139 
 140            -o
 141                Specify FSType-specific options in a comma separated (without
 142                spaces) list of suboptions and keyword-attribute pairs for
 143                interpretation by the FSType-specific module of the command.
 144                (See mount_ufs(1M).) When you use -o with a file system that has
 145                an entry in /etc/vfstab, any mount options entered for that
 146                file system in /etc/vfstab are ignored.
 147 
 148                The following options are supported:
 149 
 150                devices | nodevices
 151                    Allow or disallow the opening of device-special files. The
 152                    default is devices.
 153 
 154                    If you use nosuid in conjunction with devices, the behavior
 155                    is equivalent to that of nosuid.
 156 
 157 
 158                exec | noexec
 159                    Allow or disallow executing programs in the file system.
 160                    Allow or disallow mmap(2) with PROT_EXEC for files within
 161                    the file system. The default is exec.
 162 
 163 
 164                loop
 165                    Ignored for compatibility.
 166 
 167 
 168                nbmand | nonbmand
 169                    Allow or disallow non-blocking mandatory locking semantics
 170                    on this file system.  Non-blocking mandatory locking is
 171                    disallowed by default.
 172 
 173                    If the file system is mounted with the nbmand option, then
 174                    applications can use the fcntl(2) interface to place non-
 175                    blocking mandatory locks on files and the system enforces
 176                    those semantics. If you enable this option, it can cause
 177                    standards conformant applications to see unexpected errors.
 178 
 179                    To avoid the possibility of obtaining mandatory locks on
 180                    system files, do not use the nbmand option with the
 181                    following file systems:
 182 
 183                      /
 184                      /usr
 185                      /etc
 186                      /var
 187                      /proc
 188                      /dev
 189                      /devices
 190                      /system/contract
 191                      /system/object
 192                      /etc/mnttab
 193                      /etc/dfs/sharetab
 194 
 195 
 196                    Do not use the remount option to change the nbmand
 197                    disposition of the file system. The nbmand option is
 198                    mutually exclusive of the global option. See -g.
 199 
 200 
 201                ro | rw
 202                    Specify read-only or read-write. The default is rw.
 203 
 204 
 205                setuid | nosetuid
 206                    Allow or disallow setuid or setgid execution. The default
 207                    is setuid.
 208 
 209                    If you specify setuid in conjunction with nosuid, the
 210                    behavior is the same as nosuid.
 211 
 212                    nosuid is equivalent to nosetuid and nodevices. When suid
 213                    or nosuid is combined with setuid or nosetuid and devices
 214                    or nodevices, the most restrictive options take effect.
 215 
 216                    This option is highly recommended whenever the file system
 217                    is shared by way of NFS with the root= option. Without it,
 218                    NFS clients could add setuid programs to the server or
 219                    create devices that could open security holes.
 220 
 221 
 222                suid | nosuid
 223                    Allow or disallow setuid or setgid execution. The default
 224                    is suid. This option also allows or disallows opening any
 225                    device-special entries that appear within the filesystem.
 226 
 227                    nosuid is equivalent to nosetuid and nodevices. When suid
 228                    or nosuid is combined with setuid or nosetuid and devices
 229                    or nodevices, the most restrictive options take effect.
 230 
 231                    This option is highly recommended whenever the file system
 232                    is shared using NFS with the root=option, because, without
 233                    it, NFS clients could add setuid programs to the server, or
 234                    create devices that could open security holes.
 235 
 236 
 237 
 238            -O
 239                Overlay mount. Allow the file system to be mounted over an
 240                existing mount point, making the underlying file system
 241                inaccessible. If a mount is attempted on a pre-existing mount
 242                point without setting this flag, the mount will fail, producing
 243                the error "device busy".
 244 
 245 
 246            -r
 247                Mount the file system read-only.
 248 
 249 
 250 
 251 EXAMPLES
 252        Example 1 Mounting and Unmounting a DVD Image Directly
 253 
 254 
 255        The following commands mount and unmount a DVD image.
 256 
 257 
 258          # mount -F hsfs /images/solaris.iso /mnt/solaris-image
 259          # umount /mnt/solaris-image
 260 
 261 
 262 
 263 USAGE
 264        See largefile(5) for the description of the behavior of mount and
 265        umount when encountering files greater than or equal to 2 Gbyte ( 2^31
 266        bytes).
 267 
 268 FILES
 269        /etc/mnttab
 270            Table of mounted file systems.
 271 
 272 
 273        /etc/default/fs
 274            Default local file system type. Default values can be set for the
 275            following flags in /etc/default/fs. For example: LOCAL=ufs
 276 
 277            LOCAL:
 278                The default partition for a command if no FSType is specified.
 279 
 280 
 281 
 282        /etc/vfstab
 283            List of default parameters for each file system.
 284 
 285 
 286 SEE ALSO
 287        lofiadm(1M), mount_hsfs(1M), mount_nfs(1M), mount_pcfs(1M),
 288        mount_smbfs(1M), mount_tmpfs(1M), mount_udfs(1M), mount_ufs(1M),
 289        mountall(1M), umountall(1M), fcntl(2), mmap(2), mnttab(4), vfstab(4),
 290        attributes(5), largefile(5), privileges(5), lofs(7FS), pcfs(7FS)
 291 
 292 NOTES
 293        If the directory on which a file system is to be mounted is a symbolic
 294        link, the file system is mounted on the directory to which the symbolic
 295        link refers, rather than on top of the symbolic link itself.
 296 
 297 
 298 
 299                                September 8, 2015                     MOUNT(1M)