File: mount.2

package info (click to toggle)
manpages-ja 0.5.0.0.20080615-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 20,508 kB
  • ctags: 1
  • sloc: sh: 13,690; perl: 157; makefile: 114
file content (469 lines) | stat: -rw-r--r-- 13,784 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (C) 1993 Rickard E. Faith <faith@cs.unc.edu>
.\" and Copyright (C) 1994 Andries E. Brouwer <aeb@cwi.nl>
.\" and Copyright (C) 2002, 2005 Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Modified 1996-11-04 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified 2001-10-13 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"	Added note on historical behavior of MS_NOSUID
.\" Modified 2002-05-16 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"	Extensive changes and additions
.\" Modified 2002-05-27 by aeb
.\" Modified 2002-06-11 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"	Enhanced descriptions of MS_MOVE, MS_BIND, and MS_REMOUNT
.\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" 2005-05-18, mtk, Added MNT_EXPIRE, plus a few other tidy-ups.
.\"
.\" Japanese Version Copyright (c) 1997 SUTO, Mitsuaki
.\"         all rights reserved.
.\" Translated 1997-06-26,SUTO, Mitsuaki <suto@av.crl.sony.co.jp>
.\" Updated 2001-05-20, Kentaro Shirakata <argrath@ub32.org>
.\" Updated 2001-06-25, Kentaro Shirakata
.\" Updated 2001-10-15, Kentaro Shirakata
.\" Updated 2002-01-01, Kentaro Shirakata
.\" Updated 2002-11-24, Kentaro Shirakata
.\" Updated 2003-01-27, Kentaro Shirakata
.\" Updated 2005-02-28, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\" Updated 2005-09-06, Akihiro MOTOKI
.\" Updated 2006-07-23, Akihiro MOTOKI, LDP v2.36
.\" Updated 2007-01-07, Akihiro MOTOKI, LDP v2.43
.\" Updated 2007-05-01, Akihiro MOTOKI, LDP v2.46
.\"
.\"WORD:	lazy umount		ٱ䥢ޥ
.\"WORD:	Linux-specific		Linux ͭ
.\"
.\" motoki 2005-02-28:
.\" - subtree ɤʬڡʬĥ꡼֥ĥ꡼ʤ
.\"
.TH MOUNT 2 2007-12-17 "Linux" "Linux Programmer's Manual"
.SH ̾
mount, umount, umount2 \- ե륷ƥޥ/ޥȤ
.SH 
.nf
.B "#include <sys/mount.h>"
.sp
.BI "int mount(const char *" source ", const char *" target ,
.BI "          const char *" filesystemtype ", unsigned long " mountflags ,
.BI "          const void *" data );
.sp
.BI "int umount(const char *" target );
.sp
.fi
.BI "int umount2(const char *" target ", int " flags );
.SH 
.BR mount ()

.I source
ǻꤵ줿ե륷ƥ (ǥХ̾Ǥ뤳Ȥ¿
ǥ쥯ȥ̾ߡξ⤢) 
.I target
ǻꤵ줿ǥ쥯ȥ˷ӤĤ롣

.BR umount ()

.BR umount2 ()

.I target
˥ޥȤƤ (Ǿ̤) ե륷ƥ򳰤

ե륷ƥΥޥ/ޥȤԤˤϡ
Ŭڤʸ (Linux Ǥ
.B CAP_SYS_ADMIN
ѥӥƥ) ɬפǤ롣

Linux 2.4 ʹߡҤȤĤΥե륷ƥʣΥޥȥݥȤ
ӤĤ뤳ȤǤƱޥȥݥȤʣΥޥȤ򥹥å
뤳ȤǤ롣
.\" Multiple mounts on same mount point: since 2.3.99pre7.


.I filesystemtype
Ȥƥͥ뤬бƤͤϡ
.I /proc/filesystems
ǻȤǤ (㤨 "minix",
"ext2", "msdos", "proc", "nfs", "iso9660" )
Ŭڤʥ⥸塼뤬ɤ߹ޤȡ̤ͤѲǽˤʤ뤫⤷ʤ


.I mountflags
ϡƬ 16 ӥåȤϥޥåʥС 0xC0ED (\fBMS_MGC_VAL\fP) ǡ
Ĥ 16 ӥåȤޥȥե饰Ǥ롣
ޥåʥСϡͥС 2.4 ǤɬܤǤä
ߤɬפʤꤵƤ̵뤵롣
ޥȥե饰 libc4  libc5 Ǥ \fI<linux/fs.h>\fP 
glibc2 Ǥ \fI<sys/mount.h>\fP Ƥꡢʲ̤Ǥ:
.\" FIXME 2.6.15 added flags for "shared sub-tree" functionality:
.\" MS_UNBINDABLE, MS_PRIVATE, MS_SHARED, MS_SLAVE
.\" These need to be documented on this page.
.\" See Documentation/sharedsubtree.txt
.TP
.BR MS_BIND " (Linux 2.4 ʹ)"
.\" Τˤ 2.4.0-test9 ʹ
ХɥޥȤԤϥեǥ쥯ȥʬڤ
ե륷ƥ̤ξǸ褦ˤΤǤ롣
ХɥޥȤȤȡե륷ƥޤ
.BR chroot (2)
jail 뤳Ȥǽˤʤ롣
.IR filesystemtype ", " mountflags ", " data
̵뤵롣
.\" with the exception of the "hidden" MS_REC mountflags bit
.TP
.BR MS_DIRSYNC " (Linux 2.5.19 ʹ)"
Υե륷ƥؤΥǥ쥯ȥѹƱŪ˹Ԥ
(ϸġΥǥ쥯ȥꡢޤ
.BR chattr (1)
ȤäʬǤ롣)
.TP
.B MS_MANDLOCK
Υե륷ƥΥեФƶåǧ롣
(åͭˤˤϡ
.BR fcntl (2)
ǽҤ٤Ƥˡǥեñ̤ǵĤ򤷤ʤФʤʤ)
.\" FIXME Say more about MS_MOVE
.TP
.B MS_MOVE
ʬڤư롣
.I source
ˤϤǤ¸ߤޥȥݥȤꤷ
.I target
ˤϿꤹ롣
ưϥȥߥåǤ롣
μ¹桢ʬĥ꡼ޥȤ뤳ȤϤʤ
.IR filesystemtype ", " mountflags ", " data
̵뤵롣
.TP
.B MS_NOATIME
Υե륷ƥ (Ƥμ) եΥ򹹿ʤ
.TP
.B MS_NODEV
Υե륷ƥΥǥХ (ڥե) ؤΥĤʤ
.TP
.B MS_NODIRATIME
Υե륷ƥΥǥ쥯ȥΥ򹹿ʤ
Υե饰
.B MS_NOATIME
󶡤뵡ǽΥ֥åȤ󶡤롣Ĥޤꡢ
.B MS_NOATIME
Ǥ
.B MS_NODIRATIME
ۤΤꤵ롣
.TP
.B MS_NOEXEC
Υե륷ƥˤץμ¹ԤĤʤ
.\" (Possibly useful for a file system that contains non-Linux executables.
.\" Often used as a security feature, e.g., to make sure that restricted
.\" users cannot execute files uploaded using ftp or so.)
.TP
.B MS_NOSUID
Υե륷ƥΥץ¹ԤȤˡ
set-user-ID ӥåȤ set-group-ID ӥåȤ̵뤹롣
.\" (This is a security feature to prevent users executing set-UID and
.\" set-GID programs from removable disk devices.)
.TP
.B MS_RDONLY
ե륷ƥɤ߹ѤǥޥȤ롣
.\"
.\" FIXME Document MS_REC, available since 2.4.11.
.\" This flag has meaning in conjunction with MS_BIND and
.\" also with the shared sub-tree flags.
.TP
.BR MS_RELATIME " (Linux 2.6.20 ʹ)"
Υե륷ƥΥե뤬줿ݡ
Υեκǽ (atime) θͤ
ǽ (mtime) ǽѹ (ctime) 
ˤΤߡatime 򹹿롣
Υץϡ
.BR mutt (1)
Τ褦ˡǸƽʹߤ˥ե뤬ɤ߽Ф줿Τ
ɬפץͭѤǤ롣
.TP
.B MS_REMOUNT
Ǥ¸ߤޥȤƥޥȤ롣
ˤꡢǤ¸ߤޥȤ
.I mountflags

.I data
򡢰٥ޥȤƤƥޥȤȤȤ򤻤
ѹǤ롣
.I source

.I target
Ϻǽ
.BR mount ()
ƤӽФƱͤꤹɬפ롣
.I filesystemtype
̵뤵롣

.I mountflags
Τ
.BR MS_RDONLY ,
.BR MS_SYNCHRONOUS ,
.B MS_MANDLOCK
ѹǽǤ롣
ͥ 2.6.16 Ǥϡ
.BR MS_NOATIME ,
.B MS_NODIRATIME
ѹǽǤä
ͥ 2.4 Ǥϡ嵭˲äơ
.BR MS_NOSUID ,
.BR MS_NODEV ,
.B MS_NOEXEC
ѹǽǤä
.TP
.B MS_SYNCHRONOUS
ե륷ƥФƱŪ˽񤭹ߤԤ
(Υե륷ƥƤΥץ󤵤줿եФơ
.BR open (2)
Υե饰
.B O_SYNC
ꤷ褦ưȤʤ)
.PP
Linux 2.4 ʹߤǤϡ
.BR MS_NODEV ", " MS_NOEXEC ", " MS_NOSUID
ϥޥȥݥñ̤ǻǤ롣
ͥ 2.6.16 ʹߤǤϡ
.B MS_NOATIME

.B MS_NODIRATIME
ޥȥݥñ̤ǻǤ롣
ޤ
.B MS_RELATIME
ե饰ޥȥݥñ̤Ǥ롣
.PP

.I data
ɤΤ褦˲ᤵ뤫ϡե륷ƥˤäưۤʤ롣
Ƥϡꤵ줿ե륷ƥѲǽʥץ
޶ڤ¤٤줿ʸǤ롣
ƥե륷ƥФƻǽʥץξܺ٤ˤĤƤ
.BR mount (8)
򻲾ȤΤȡ
.PP
.\" Note: the kernel naming differs from the glibc naming
.\" umount2 is the glibc name for what the kernel now calls umount
.\" and umount is the glibc name for oldumount
Linux 2.1.116 顢
.BR umount2 ()
ƥॳ뤬ɲä줿
.BR umount ()
Ʊͤ
.I target 򥢥ޥȤ뤬
.I flags
ɲäƤꡢκݤο񤤤Ǥ롣
.TP
.BR MNT_FORCE " (2.1.116 ʹ)"
 (busy) Ǥ⶯Ū˥ޥȤ¹Ԥ롣
Ԥȥǡ򼺤ǽ롣
(NFS ޥ)
.\" FIXME Can MNT_FORCE result in data loss?  According to
.\" the Solaris manual page it can cause data loss on Solaris.
.\" If the same holds on Linux, then this should be documented.
.TP
.BR MNT_DETACH " (2.4.11 ʹ)"
ٱ䥢ޥȤԤޥȥݥȤФ뿷Υ
ԲǽȤʤꡢºݤΥޥȤϥޥȥݥȤӥ
ʤʤäǹԤ
.TP
.BR MNT_EXPIRE " (Linux 2.6.8 ʹ)"
ޥȥݥȤ˴ڤΰĤ롣
ޥȥݥȤ߻Ǥʤ硢Υե饰Ĥ
.BR umount2 ()
ƸƤӽФ
.B EAGAIN
顼ǼԤ뤬ޥȥݥȤˤϴڤ (expire)
ΰĤ롣
ΥޥȥݥȤϤ줫Υץʤ¤
ڤΰĤޤޤȤʤ롣
.B MNT_EXPIRE
Ĥ
.BR umount2 ()
ƤӽФȡڤΰΤĤޥȥݥȤ
ޥȤ롣
Υե饰
.B MNT_FORCE
.B MNT_DETACH
Ʊ˻ꤹ뤳ȤϤǤʤ
.SH ֤
 0 ֤롣Ԥ \-1 ֤ꡢ
.I errno
顼Ƥ˽äꤵ롣
.SH 顼
ʲ˼顼ϡե륷ƥ˰¸ʤΤǤ롣
줾Υե륷ƥॿפˤϸͭΥ顼¸ߤ礬ꡢ
ȼư򤹤뤳Ȥ⤢롣ܤϥͥΥ򸫤ߤ
.TP
.B EACCES
ѥ˴ޤޤǥ쥯ȥ˸ (¹) Ĥʤ
.RB ( path_resolution (7)
⻲)
ޤϡ
.B MS_RONLY
ե饰ꤻɤ߹ѤΥե륷ƥ
ޥȤ褦Ȥ
ޤϡ֥åǥХ
.I source

.B MS_NODEV
ץǥޥȤ줿ե륷ƥˤ롣
.\" mtk: Probably: write permission is required for MS_BIND, with
.\" the error EPERM if not present; CAP_DAC_OVERRIDE is required.
.TP
.B EAGAIN
.B MNT_EXPIRE
.BR umount2 ()
θƤӽФǡ̤ѤΥե륷ƥ˴ڤΰ
Ĥ뤳ȤǤ
.TP
.B EBUSY
.I source
ϴ˥ޥȤƤ롣
ޤϡ񤭹Ѥ˥ץ󤵤줿ե뤬ꡢ
ɤ߹ѤǺƥޥȤ뤳ȤǤʤ
ޤϡ
.I target
 (busy) Τᡢ
.I target
˥ޥ/ޥȤǤʤ
.I target
ȤƤϡ륿ưƤǥ쥯ȥ (working
directory) ǤȤ̤ΥǥХΥޥȥݥȤǤȤ
ץ󤵤줿ե뤬¸ߤ롢ʤɤ롣
.TP
.B EFAULT
򼨤ΤҤȤĤ桼Υɥ쥹֤γؤƤ롣
.TP
.B EINVAL
.I source
ʥѡ֥å롣
ޤϡ
.I source

.I target
˥ޥȤƤʤΤˡƥޥ
.RB ( MS_REMOUNT )
׵ᤵ줿
ޤϡ
.I source
ޥȥݥȤǤϤʤ'/' ʤΤˡư
.RB ( MS_MOVE )
׵ᤵ줿
ޤϡ
.I target
ޥȥݥȤǤϤʤΤ˥ޥȤ׵ᤵ줿
ޤϡ
.B MNT_EXPIRE
.BR umount2 ()
Ф
.B MNT_DETACH

.B MNT_FORCE
Ʊ˻ꤵ줿
.TP
.B ELOOP
ѥ̾βо줷󥯤¿
ޤϡ
.I target

.I source
λ¹ʤΤ˰ư׵ᤵ줿
.TP
.B EMFILE
.\" motoki: ɤΤ
(֥åǥХɬפǤʤ)
ߡǥХΥơ֥뤬դˤʤä
.TP
.B ENAMETOOLONG
ѥ̾Ĺ
.B MAXPATHLEN
ۤ
.TP
.B ENODEV
.I filesystemtype
ͥ (config) Ƥʤ
.TP
.B ENOENT
ѥ̾Ǥ롣⤷ϻꤵ줿ѥ¸ߤʤ
.TP
.B ENOMEM
ͥ뤬ե̾ǡ򥳥ԡ뤿ζڡݤǤʤ
.TP
.B ENOTBLK
(֥åǥХɬפ)
.I source
֥åǥХǤϤʤ
.TP
.B ENOTDIR
2 ܤΰ⤷ 1 ܤΰƬǥ쥯ȥǤϤʤ
.TP
.B ENXIO
֥åǥХ
.I source
Υ᥸㡼ֹ椬ϰϳǤ롣
.TP
.B EPERM
ƤӽФɬפʸ¤ʤ
.SH 
δؿ Linux ͭδؿǤꡢܿθץǤ
Ѥ٤Ǥʤ
.SH 
.SS Linux Ǥ

.BR umount ()
ؿ \fIumount(device)\fP ηǸƤӽФ졢
֥åǥХʳꤷƸƤӽФ
.B ENOTBLK
֤
Linux 0.98p4 ǡ̵̾ǥХ (anonymous device) б뤿
\fIumount(dir)\fP ηǤθƤӽФä줿
Linux 2.3.99-pre7 ǡ\fIumount(device)\fP Ϻ졢
\fIumount(dir)\fP Ĥ줿
(ĤΥǥХʣΰ֤˥ޥȽ褦ˤʤäᡢ
ǥХꤷǤԽʬǤ)
.LP

.B MS_SYNC
ե饰ϡ̤
.B MS_SYNC
 \fI<mman.h>\fP ɲä줿Τ
1.1.69 
.B MS_SYNCHRONOUS
̾Ѥä
.LP
Linux 2.4 ΥСǤϡ
.B MS_NOSUID
ץդǥޥȤ줿ե륷ƥ
set-UID  set-GID Υץ¹Ԥ褦Ȥȡ
.B EPERM
顼Ȥʤä
Linux 2.4 ʹߤǤϡΤ褦ʾ set-UID ӥåȤ set-GID ӥåȤ
̵뤵Ǥ롣
.\" ѹ patch-2.4.0-prerelease ˴ޤޤƤ롣
.SH Ϣ
.BR path_resolution (7),
.BR mount (8),
.BR umount (8)