1mount(1M)               System Administration Commands               mount(1M)
2
3
4

NAME

6       mount, umount - mount or unmount file systems and remote resources
7

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

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  argu‐
52       ments,  mount  lists all the mounted file systems recorded in the mount
53       table, /etc/mnttab. If invoked with a partial argument list (with  only
54       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 fill‐
61       ing in missing arguments, mount will invoke the  FSType-specific  mount
62       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

OPTIONS

78       -F FSType
79
80           Used to specify the FSType on which to operate. The FSType must  be
81           specified  or must be determinable from /etc/vfstab, or by consult‐
82           ing /etc/default/fs or /etc/dfs/fstypes.
83
84
85       -a [ mount_points. . . ]
86
87           Perform mount or umount operations in parallel, when possible.
88
89           If mount points are not specified, mount will mount all  file  sys‐
90           tems  whose  /etc/vfstab  "mount  at  boot"  field is yes. If mount
91           points are specified, then /etc/vfstab "mount at boot"  field  will
92           be ignored.
93
94           If  mount points are specified, umount will only umount those mount
95           points. If none is specified, then umount will attempt  to  unmount
96           all file systems in /etc/mnttab, with the exception of certain sys‐
97           tem required file  systems:  /,  /usr,  /var,  /var/adm,  /var/run,
98           /proc, /dev/fd and /tmp.
99
100
101       -f
102
103           Forcibly unmount a file system.
104
105           Without  this  option,  umount  does  not allow a file system to be
106           unmounted if a file on the file system is busy. Using  this  option
107           can  cause  data  loss  for open files; programs which access files
108           after the file system has been unmounted will get an error (EIO).
109
110
111       -p
112
113           Print the list of mounted file systems in the  /etc/vfstab  format.
114           Must be the only option specified. See BUGS.
115
116
117       -v
118
119           Print  the  list of mounted file systems in verbose format. Must be
120           the only option specified.
121
122
123       -V
124
125           Echo the complete command line, but do  not  execute  the  command.
126           umount  generates a command line by using the options and arguments
127           provided by the user and adding to them  information  derived  from
128           /etc/mnttab.  This option should be used to verify and validate the
129           command line.
130
131
132       generic_options
133
134           Options that are commonly supported by most FSType-specific command
135           modules. The following options are available:
136
137           -m
138
139               Mount the file system without making an entry in /etc/mnttab.
140
141
142           -g
143
144               Globally  mount  the  file  system. On a clustered system, this
145               globally mounts the file system on all nodes of the cluster. On
146               a non-clustered system this has no effect.
147
148
149           -o
150
151               Specify  FSType-specific  options in a comma separated (without
152               spaces) list of  suboptions  and  keyword-attribute  pairs  for
153               interpretation  by  the  FSType-specific module of the command.
154               (See mount_ufs(1M).) When you use -o with a  file  system  that
155               has an entry in /etc/vfstab, any mount options entered for that
156               file system in /etc/vfstab are ignored.
157
158               The following options are supported:
159
160               devices | nodevices
161
162                   Allow or disallow the opening of device-special files.  The
163                   default is devices.
164
165                   If you use nosuid in conjunction with devices, the behavior
166                   is equivalent to that of nosuid.
167
168
169               exec | noexec
170
171                   Allow or disallow executing programs in  the  file  system.
172                   Allow  or  disallow mmap(2) with PROT_EXEC for files within
173                   the file system. The default is exec.
174
175
176               loop
177
178                   Ignored for compatibility.
179
180
181               nbmand | nonbmand
182
183                   Allow or disallow non-blocking mandatory locking  semantics
184                   on this file system. Non-blocking mandatory locking is dis‐
185                   allowed by default.
186
187                   If the file system is mounted with the nbmand option,  then
188                   applications  can  use the fcntl(2) interface to place non-
189                   blocking mandatory locks on files and the  system  enforces
190                   those  semantics.  If  you enable this option, it can cause
191                   standards conformant applications to see unexpected errors.
192
193                   To avoid the possibility of obtaining  mandatory  locks  on
194                   system files, do not use the nbmand option with the follow‐
195                   ing file systems:
196
197                     /
198                     /usr
199                     /etc
200                     /var
201                     /proc
202                     /dev
203                     /devices
204                     /system/contract
205                     /system/object
206                     /etc/mnttab
207                     /etc/dfs/sharetab
208
209
210                   Do not use the remount option to change the nbmand disposi‐
211                   tion  of  the  file  system.  The nbmand option is mutually
212                   exclusive of the global option. See -g.
213
214
215               ro | rw
216
217                   Specify read-only or read-write. The default is rw.
218
219
220               setuid | nosetuid
221
222                   Allow or disallow setuid or setgid execution.  The  default
223                   is setuid.
224
225                   If  you  specify  setuid  in  conjunction  with nosuid, the
226                   behavior is the same as nosuid.
227
228                   nosuid is equivalent to nosetuid and nodevices.  When  suid
229                   or  nosuid  is combined with setuid or nosetuid and devices
230                   or nodevices, the most restrictive options take effect.
231
232                   This option is highly recommended whenever the file  system
233                   is  shared by way of NFS with the root= option. Without it,
234                   NFS clients could add setuid programs to the server or cre‐
235                   ate devices that could open security holes.
236
237
238               suid | nosuid
239
240                   Allow  or  disallow setuid or setgid execution. The default
241                   is suid. This option also allows or disallows  opening  any
242                   device-special entries that appear within the filesystem.
243
244                   nosuid  is  equivalent to nosetuid and nodevices. When suid
245                   or nosuid is combined with setuid or nosetuid  and  devices
246                   or nodevices, the most restrictive options take effect.
247
248                   This  option is highly recommended whenever the file system
249                   is shared using NFS with the root=option, because,  without
250                   it, NFS clients could add setuid programs to the server, or
251                   create devices that could open security holes.
252
253
254
255           -O
256
257               Overlay mount. Allow the file system  to  be  mounted  over  an
258               existing  mount  point, making the underlying file system inac‐
259               cessible. If a mount is attempted on a pre-existing mount point
260               without  setting  this flag, the mount will fail, producing the
261               error "device busy".
262
263
264           -r
265
266               Mount the file system read-only.
267
268
269

EXAMPLES

271       Example 1 Mounting and Unmounting a DVD Image Directly
272
273
274       The following commands mount and unmount a DVD image.
275
276
277         # mount -F hsfs /images/solaris.iso /mnt/solaris-image
278         # umount /mnt/solaris-image
279
280
281

USAGE

283       See largefile(5) for the description  of  the  behavior  of  mount  and
284       umount  when encountering files greater than or equal to 2 Gbyte ( 2^31
285       bytes).
286

FILES

288       /etc/mnttab
289
290           Table of mounted file systems.
291
292
293       /etc/default/fs
294
295           Default local file system type. Default values can be set  for  the
296           following flags in /etc/default/fs. For example: LOCAL=ufs
297
298           LOCAL:
299
300               The default partition for a command if no FSType is specified.
301
302
303
304       /etc/vfstab
305
306           List of default parameters for each file system.
307
308

ATTRIBUTES

310       See attributes(5) for descriptions of the following attributes:
311
312
313
314
315       ┌─────────────────────────────┬─────────────────────────────┐
316       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
317       ├─────────────────────────────┼─────────────────────────────┤
318       │Availability                 │SUNWcsu                      │
319       └─────────────────────────────┴─────────────────────────────┘
320

SEE ALSO

322       lofiadm(1M),    mount_cachefs(1M),    mount_hsfs(1M),    mount_nfs(1M),
323       mount_pcfs(1M),  mount_smbfs(1M),    mount_tmpfs(1M),   mount_udfs(1M),
324       mount_ufs(1M),  mountall(1M),  umountall(1M),  fcntl(2),  mmap(2), mnt‐
325       tab(4),  vfstab(4),  attributes(   5),   largefile(5),   privileges(5),
326       lofs(7FS), pcfs(7FS)
327

NOTES

329       If  the directory on which a file system is to be mounted is a symbolic
330       link, the file system is mounted on the directory to which the symbolic
331       link refers, rather than on top of the symbolic link itself.
332

BUGS

334       The mount -p output is incorrect for cachefs.
335
336
337
338SunOS 5.11                        29 May 2008                        mount(1M)
Impressum