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
|
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (C) 1993 Rickard E. Faith <faith@cs.unc.edu>
.\" Copyright (C) 1994 Andries E. Brouwer <aeb@cwi.nl>
.\" Copyright (C) 2002 Michael Kerrisk <mtk-manpages@gmx.net>
.\"
.\" 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@gmx.net>
.\" Added note on historical behaviour of MS_NOSUID
.\" Modified 2002-05-16 by Michael Kerrisk <mtk-manpages@gmx.net>
.\" Extensive changes and additions
.\" Modified 2002-05-27 by aeb
.\" Modified 2002-06-11 by Michael Kerrisk <mtk-manpages@gmx.net>
.\" Enhanced descriptions of MS_MOVE, MS_BIND, and MS_REMOUNT
.\" Modified 2004-06-17 by Michael Kerrisk <mtk-manpages@gmx.net>
.\"
.\" 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 <argrath@ub32.org>
.\" Updated 2001-10-15, Kentaro Shirakata <argrath@ub32.org>
.\" Updated 2002-01-01, Kentaro Shirakata <argrath@ub32.org>
.\" Updated 2002-11-24, Kentaro Shirakata <argrath@ub32.org>
.\" Updated 2003-01-27, Kentaro Shirakata <argrath@ub32.org>
.\" Updated 2005-02-28, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\"
.\"WORD: lazy umount ٱ䥢ޥ
.\"WORD: Linux-specific Linux ͭ
.\"
.\" motoki 2005-02-28:
.\" - subtree ɤʬڡʬĥ֥ĥʤ
.\"
.TH MOUNT 2 2004-06-17 "Linux 2.6" "Linux Programmer's Manual"
.SH ̾
mount, umount \- ե륷ƥޥ/ޥȤ
.SH
.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
.BI "int umount2(const char *" target ", int " flags );
.SH
.B mount
.I source
ǻꤵ줿ե륷ƥ (ǥХ̾Ǥ뤳Ȥ¿
ǥ쥯ȥ̾ߡξ⤢)
.I target
ǻꤵ줿ǥ쥯ȥ˷ӤĤ롣
.BR umount " " 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 Ǥ <linux/fs.h>
glibc2 Ǥ <sys/mount.h> Ƥꡢʲ̤Ǥ:
.TP
.B 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
.B MS_DIRSYNC
(Linux 2.5.19 ʹ)
Υե륷ƥؤΥǥ쥯ȥѹƱŪ˹Ԥ
(ϸġΥǥ쥯ȥꡢޤ
.BR chattr (8)
ȤäʬǤ롣)
.TP
.B MS_MANDLOCK
Υե륷ƥΥեФƶåǧ롣
(åͭˤˤϡ
.BR fcntl (2)
ǽҤ٤Ƥˡǥեñ̤ǵĤʤФʤʤ)
.\" FIXME: More can be said 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
Υե륷ƥΥǥ쥯ȥΥʤ
.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-UID ӥåȤ set-GID ӥåȤ̵뤹롣
.\" (This is a security feature to prevent users executing set-UID and
.\" set-GID programs from removable disk devices.)
.TP
.B MS_RDONLY
ե륷ƥɤ߹ѤǥޥȤ롣
.TP
.B MS_REMOUNT
Ǥ¸ߤޥȤƥޥȤ롣
ˤꡢǤ¸ߤޥȤ
.I mountflags
.I data
٥ޥȤƤƥޥȤȤȤ
ѹǤ롣
.I source
.I target
Ϻǽ
.BR mount ()
ƤӽФƱͤꤹɬפ롣
.I filesystemtype
̵뤵롣
.TP
.B MS_SYNCHRONOUS
ե륷ƥФƱŪ˽ߤԤ
(Υե륷ƥƤΥץ줿եФơ
.BR open (2)
Υե饰
.B O_SYNC
ꤷ褦ưȤʤ)
.PP
Linux 2.4 ʹߤǤϡ
.BR MS_NODEV ", " MS_NOEXEC ", " MS_NOSUID
ϥޥȥݥñ̤ǻǤ롣
.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 ()
Ʊͤ target ޥȤ뤬
.I flags
ɲäƤꡢκݤοǤ롣
.TP
.B MNT_FORCE
(busy) ǤŪ˥ޥȤ¹Ԥ롣
(2.1.116 ʹߡNFS ޥ)
.TP
.B MNT_DETACH
ٱ䥢ޥȤ롣ޥȥݥȤФ뿷Υ
ԲǽȤʤꡢºݤΥޥȤϥޥȥݥȤӥ
ʤʤäǹԤ(2.4.11 ʹ)
.SH ֤
0 ֤롣Ԥ \-1 ֤ꡢ
.I errno
顼Ƥ˽äꤵ롣
.SH 顼
ʲ˼顼ϡե륷ƥ˰¸ʤΤǤ롣
줾Υե륷ƥॿפˤϸͭΥ顼¸ߤ礬ꡢ
ȼư뤳Ȥ⤢롣ܤϥͥΥߤ
.TP
.B EACCES
ѥ˴ޤޤǥ쥯ȥ˸ (¹) Ĥʤ
.RB ( path_resolution (2)
⻲)
.br
ޤϡ MS_RONLY ե饰ꤻɤ߹ѤΥե륷ƥ
ޥȤ褦Ȥ
.br
ޤϡ֥åǥХ
.I source
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 EBUSY
.I source
ϴ˥ޥȤƤ롣
ޤϡѤ˥ץ줿ե뤬ꡢ
ɤ߹ѤǺƥޥȤ뤳ȤǤʤ
ޤϡ
.I target
(busy) Τᡢ
.I target
˥ޥ/ޥȤǤʤ
.I target
ȤƤϡ륿ưƤǥ쥯ȥ (working
directory) ǤȤ̤ΥǥХΥޥȥݥȤǤȤ
ץ줿ե뤬¸ߤ롢ʤɤ롣
.TP
.B EFAULT
ΤҤȤĤ桼Υɥ쥹֤γؤƤ롣
.TP
.B EINVAL
.I source
ʥѡ֥å롣ޤϡ
.I source
.I target
˥ޥȤƤʤΤˡƥޥȤᤵ줿
ޤϡ
.I source
ޥȥݥȤǤϤʤ'/' ʤΤˡưᤵ줿
ޤϡ
.I target
ޥȥݥȤǤϤʤΤ˥ޥȤᤵ줿
.TP
.B ELOOP
ѥ̾β˥¿
ޤϡ
.I target
.I source
λ¹ʤΤ˰ưᤵ줿
.TP
.B EMFILE
.\" motoki: ɤΤ
(֥åǥХɬפǤʤ)
ߡǥХΥơ֥뤬դˤʤä
.TP
.B ENAMETOOLONG
ѥ̾Ĺ 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
ǽ
.B umount
ؿ \fIumount(device)\fP ηǸƤӽФ졢
֥åǥХʳꤷƸƤӽФ ENOTBLK ֤
Linux 0.98p4 ǡ̵̾ǥХ (anonymous device) б뤿
\fIumount(dir)\fP ηǤθƤӽФä줿
Linux 2.3.99-pre7 ǡ\fIumount(device)\fP Ϻ졢
\fIumount(dir)\fP Ĥ줿
(ĤΥǥХʣΰ֤˥ޥȽ褦ˤʤäᡢ
ǥХꤷǤԽʬǤ)
.LP
MS_SYNC ե饰ϡ̤ MS_SYNC <mman.h> ɲä줿Τ
1.1.69 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 (2),
.BR mount (8),
.BR umount (8)
|