OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / mount.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (C) 1993 Rickard E. Faith <faith@cs.unc.edu>
4 .\" and Copyright (C) 1994 Andries E. Brouwer <aeb@cwi.nl>
5 .\" and Copyright (C) 2002, 2005 Michael Kerrisk <mtk.manpages@gmail.com>
6 .\"
7 .\" Permission is granted to make and distribute verbatim copies of this
8 .\" manual provided the copyright notice and this permission notice are
9 .\" preserved on all copies.
10 .\"
11 .\" Permission is granted to copy and distribute modified versions of this
12 .\" manual under the conditions for verbatim copying, provided that the
13 .\" entire resulting derived work is distributed under the terms of a
14 .\" permission notice identical to this one.
15 .\"
16 .\" Since the Linux kernel and libraries are constantly changing, this
17 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
18 .\" responsibility for errors or omissions, or for damages resulting from
19 .\" the use of the information contained herein.  The author(s) may not
20 .\" have taken the same level of care in the production of this manual,
21 .\" which is licensed free of charge, as they might when working
22 .\" professionally.
23 .\"
24 .\" Formatted or processed versions of this manual, if unaccompanied by
25 .\" the source, must acknowledge the copyright and authors of this work.
26 .\"
27 .\" Modified 1996-11-04 by Eric S. Raymond <esr@thyrsus.com>
28 .\" Modified 2001-10-13 by Michael Kerrisk <mtk.manpages@gmail.com>
29 .\"     Added note on historical behavior of MS_NOSUID
30 .\" Modified 2002-05-16 by Michael Kerrisk <mtk.manpages@gmail.com>
31 .\"     Extensive changes and additions
32 .\" Modified 2002-05-27 by aeb
33 .\" Modified 2002-06-11 by Michael Kerrisk <mtk.manpages@gmail.com>
34 .\"     Enhanced descriptions of MS_MOVE, MS_BIND, and MS_REMOUNT
35 .\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
36 .\" 2005-05-18, mtk, Added MNT_EXPIRE, plus a few other tidy-ups.
37 .\" 2008-10-06, mtk: move umount*() material into separate umount.2 page.
38 .\" 2008-10-06, mtk: Add discussion of namespaces.
39 .\"
40 .\" Japanese Version Copyright (c) 1997 SUTO, Mitsuaki
41 .\"         all rights reserved.
42 .\" Translated 1997-06-26,SUTO, Mitsuaki <suto@av.crl.sony.co.jp>
43 .\" Updated 2001-05-20, Kentaro Shirakata <argrath@ub32.org>
44 .\" Updated 2001-06-25, Kentaro Shirakata
45 .\" Updated 2001-10-15, Kentaro Shirakata
46 .\" Updated 2002-01-01, Kentaro Shirakata
47 .\" Updated 2002-11-24, Kentaro Shirakata
48 .\" Updated 2003-01-27, Kentaro Shirakata
49 .\" Updated 2005-02-28, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
50 .\" Updated 2005-09-06, Akihiro MOTOKI
51 .\" Updated 2006-07-23, Akihiro MOTOKI, LDP v2.36
52 .\" Updated 2007-01-07, Akihiro MOTOKI, LDP v2.43
53 .\" Updated 2007-05-01, Akihiro MOTOKI, LDP v2.46
54 .\" Updated 2008-08-08, Akihiro MOTOKI, LDP v3.05
55 .\" Updated 2008-11-10, Akihiro MOTOKI, LDP v3.11
56 .\" Updated 2010-04-23, Akihiro MOTOKI, LDP v3.24
57 .\"
58 .\"WORD:        lazy umount             Ãٱ䥢¥ó¥Þ¥¦¥ó¥È
59 .\"WORD:        Linux-specific          Linux ÆÃÍ­
60 .\"
61 .\" motoki 2005-02-28:
62 .\" - subtree ¤ò¤É¤¦Ìõ¤¹¤«¡£ÉôʬÌÚ¡¢Éôʬ¥Ä¥ê¡¼¡¢¥µ¥Ö¥Ä¥ê¡¼¡£¡£¡£²¿¤«¤Ê¤¤¤«¡£
63 .\"
64 .TH MOUNT 2 2009-06-26 "Linux" "Linux Programmer's Manual"
65 .\"O .SH NAME
66 .SH Ì¾Á°
67 .\"O mount \- mount and unmount file systems
68 mount \- ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò¥Þ¥¦¥ó¥È/¥¢¥ó¥Þ¥¦¥ó¥È¤¹¤ë
69 .\"O .SH SYNOPSIS
70 .SH ½ñ¼°
71 .nf
72 .B "#include <sys/mount.h>"
73 .sp
74 .BI "int mount(const char *" source ", const char *" target ,
75 .BI "          const char *" filesystemtype ", unsigned long " mountflags ,
76 .BI "          const void *" data );
77 .fi
78 .\"O .SH DESCRIPTION
79 .SH ÀâÌÀ
80 .\"O .BR mount ()
81 .\"O attaches the file system specified by
82 .\"O .I source
83 .\"O (which is often a device name, but can also be a directory name
84 .\"O or a dummy) to the directory specified by
85 .\"O .IR target .
86 .BR mount ()
87 ¤Ï
88 .I source
89 ¤Ç»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à (¥Ç¥Ð¥¤¥¹Ì¾¤Ç¤¢¤ë¤³¤È¤¬Â¿¤¤¤¬¡¢
90 ¥Ç¥£¥ì¥¯¥È¥ê̾¤ä¥À¥ß¡¼¤Î¾ì¹ç¤â¤¢¤ë) ¤ò
91 .I target
92 ¤Ç»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤Ë·ë¤Ó¤Ä¤±¤ë¡£
93
94 .\"O Appropriate privilege (Linux: the
95 .\"O .B CAP_SYS_ADMIN
96 .\"O capability) is required to mount file systems.
97 ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥Þ¥¦¥ó¥È¤ò¹Ô¤¦¤Ë¤Ï¡¢
98 ŬÀڤʸ¢¸Â (Linux ¤Ç¤Ï
99 .B CAP_SYS_ADMIN
100 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£) ¤¬É¬ÍפǤ¢¤ë¡£
101
102 .\"O Since Linux 2.4 a single file system can be visible at
103 .\"O multiple mount points, and multiple mounts can be stacked
104 .\"O on the same mount point.
105 .\"O .\" Multiple mounts on same mount point: since 2.3.99pre7.
106 Linux 2.4 °Ê¹ß¡¢¤Ò¤È¤Ä¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤òÊ£¿ô¤Î¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤Ë
107 ·ë¤Ó¤Ä¤±¤ë¤³¤È¤¬¤Ç¤­¡¢Æ±¤¸¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤ËÊ£¿ô¤Î¥Þ¥¦¥ó¥È¤ò¥¹¥¿¥Ã¥¯
108 ¤µ¤»¤ë¤³¤È¤â¤Ç¤­¤ë¡£
109 .\" Multiple mounts on same mount point: since 2.3.99pre7.
110
111 .\"O Values for the
112 .\"O .I filesystemtype
113 .\"O argument supported by the kernel are listed in
114 .\"O .I /proc/filesystems
115 .\"O (like "minix", "ext2", "ext3", "jfs", "xfs", "reiserfs",
116 .\"O "msdos", "proc", "nfs", "iso9660" etc.).
117 .\"O Further types may become available when the appropriate modules
118 .\"O are loaded.
119 °ú¤­¿ô
120 .I filesystemtype
121 ¤È¤·¤Æ¥«¡¼¥Í¥ë¤¬Âбþ¤·¤Æ¤¤¤ëÃͤϡ¢
122 .I /proc/filesystems
123 ¤Ç»²¾È¤Ç¤­¤ë (Î㤨¤Ð "minix", "ext2", "ext3", "jfs", "xfs", "reiserfs",
124 "msdos", "proc", "nfs", "iso9660" Åù)¡£
125 ŬÀڤʥ⥸¥å¡¼¥ë¤¬Æɤ߹þ¤Þ¤ì¤ë¤È¡¢¤µ¤é¤ËÊ̤ÎÃͤ¬ÍøÍѲÄǽ¤Ë¤Ê¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
126
127 .\"O The
128 .\"O .I mountflags
129 .\"O argument may have the magic number 0xC0ED (\fBMS_MGC_VAL\fP)
130 .\"O in the top 16 bits (this was required in kernel versions prior to 2.4, but
131 .\"O is no longer required and ignored if specified),
132 .\"O and various mount flags (as defined in \fI<linux/fs.h>\fP for libc4 and libc5
133 .\"O and in \fI<sys/mount.h>\fP for glibc2) in the low order 16 bits:
134 °ú¤­¿ô
135 .I mountflags
136 ¤Ï¡¢ÀèƬ 16 ¥Ó¥Ã¥È¤Ï¥Þ¥¸¥Ã¥¯¥Ê¥ó¥Ð¡¼ 0xC0ED (\fBMS_MGC_VAL\fP) ¤Ç¡¢
137 »Ä¤ê¤Î 16 ¥Ó¥Ã¥È¤¬¥Þ¥¦¥ó¥È¥Õ¥é¥°¤Ç¤¢¤ë¡£
138 ¥Þ¥¸¥Ã¥¯¥Ê¥ó¥Ð¡¼¤Ï¡¢¥«¡¼¥Í¥ë¥Ð¡¼¥¸¥ç¥ó 2.4 ¤è¤êÁ°¤Ç¤Ïɬ¿Ü¤Ç¤¢¤Ã¤¿¤¬¡¢
139 ¸½ºß¤ÏɬÍפʤ¯¡¢»ØÄꤵ¤ì¤Æ¤â̵»ë¤µ¤ì¤ë¡£
140 ¥Þ¥¦¥ó¥È¥Õ¥é¥°¤Ï libc4 ¤È libc5 ¤Ç¤Ï \fI<linux/fs.h>\fP ¡¢
141 glibc2 ¤Ç¤Ï \fI<sys/mount.h>\fP ¤ÇÄêµÁ¤µ¤ì¤Æ¤ª¤ê¡¢°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë:
142 .\" FIXME 2.6.15 added flags for "shared subtree" functionality:
143 .\" MS_UNBINDABLE, MS_PRIVATE, MS_SHARED, MS_SLAVE
144 .\" These need to be documented on this page.
145 .\" See:
146 .\" Documentation/filesystems/sharedsubtree.txt
147 .\"
148 .\" http://lwn.net/Articles/159077/
149 .\"
150 .\" http://myweb.sudhaa.com:2022/~ram/sharedsubtree/paper/sharedsubtree.1.pdf
151 .\" Shared-Subtree Concept, Implementation, and Applications in Linux
152 .\" Al Viro viro@ftp.linux.org.uk
153 .\" Ram Pai linuxram@us.ibm.com
154 .\"
155 .\" http://foss.in/2005/slides/sharedsubtree1.pdf
156 .\" Shared Subtree Concept and Implementation in the Linux Kernel
157 .\" Ram Pai
158 .\"
159 .\" 2.6.25 Added MS_I_VERSION, which needs to be documented.
160 .\"
161 .TP
162 .\"O .BR MS_BIND " (Linux 2.4 onwards)"
163 .BR MS_BIND " (Linux 2.4 °Ê¹ß)"
164 .\"O .\" since 2.4.0-test9
165 .\" Àµ³Î¤Ë¤Ï 2.4.0-test9 °Ê¹ß
166 .\"O Perform a bind mount, making a file or a directory subtree visible at
167 .\"O another point within a file system.
168 .\"O Bind mounts may cross file system boundaries and span
169 .\"O .BR chroot (2)
170 .\"O jails.
171 .\"O The
172 .\"O .IR filesystemtype
173 .\"O and
174 .\"O .IR data
175 .\"O arguments are ignored.
176 .\"O Up until Linux 2.6.26,
177 .\"O .I mountflags
178 .\"O was also ignored
179 .\"O .\" with the exception of the "hidden" MS_REC mountflags bit
180 .\"O (the bind mount has the same mount options as
181 .\"O the underlying mount point).
182 ¥Ð¥¤¥ó¥É¥Þ¥¦¥ó¥È¤ò¹Ô¤¦¡£¤³¤ì¤Ï¥Õ¥¡¥¤¥ë¤ä¥Ç¥£¥ì¥¯¥È¥ê¤ÎÉôʬÌÚ¤ò
183 ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥àÆâÉô¤ÎÊ̤ξì½ê¤Ç¸«¤¨¤ë¤è¤¦¤Ë¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡£
184 ¥Ð¥¤¥ó¥É¥Þ¥¦¥ó¥È¤ò»È¤¦¤È¡¢¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò¤Þ¤¿¤¤¤Ç
185 .BR chroot (2)
186 jail ¤ò¹½À®¤¹¤ë¤³¤È¤¬²Äǽ¤Ë¤Ê¤ë¡£
187 °ú¤­¿ô
188 .I filesystemtype
189 ¤È
190 .I data
191 ¤Ï̵»ë¤µ¤ì¤ë¡£
192 Linux 2.6.26 ¤è¤êÁ°¤Ç¤Ï
193 .I mountflags
194 ¤â̵»ë¤µ¤ì¤Æ¤¤¤¿
195 .\" with the exception of the "hidden" MS_REC mountflags bit
196 (¥Ð¥¤¥ó¥É¥Þ¥¦¥ó¥È¤Ç¤Ï¡¢¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤È¤Ê¤ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤È
197 Ʊ¤¸¥Þ¥¦¥ó¥È¥ª¥×¥·¥ç¥ó¤¬»ÈÍѤµ¤ì¤ë)¡£
198 .\"O Since Linux 2.6.26, the
199 .\"O .B MS_RDONLY
200 .\"O flag is honored when making a bind mount.
201 Linux 2.6.26 °Ê¹ß¤Ç¤Ï¡¢¥Ð¥¤¥ó¥É¥Þ¥¦¥ó¥È¤ò¹Ô¤¦ºÝ¤Ë
202 .B MS_RDONLY
203 ¥Õ¥é¥°¤Ï̵»ë¤µ¤ì¤Ê¤¤¡£
204 .TP
205 .\"O .BR MS_DIRSYNC " (Since Linux 2.5.19)"
206 .BR MS_DIRSYNC " (Linux 2.5.19 °Ê¹ß)"
207 .\"O Make directory changes on this file system synchronous.
208 .\"O (This property can be obtained for individual directories
209 .\"O or subtrees using
210 .\"O .BR chattr (1).)
211 ¤³¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ø¤Î¥Ç¥£¥ì¥¯¥È¥êÊѹ¹¤òƱ´üŪ¤Ë¹Ô¤¦¡£
212 (¤³¤ÎÆÃÀ­¤Ï¸Ä¡¹¤Î¥Ç¥£¥ì¥¯¥È¥ê¡¢¤Þ¤¿¤Ï
213 .BR chattr (1)
214 ¤ò»È¤Ã¤¿ÉôʬÌÚËè¤ËÀßÄê¤Ç¤­¤ë¡£)
215 .TP
216 .B MS_MANDLOCK
217 .\"O Permit mandatory locking on files in this file system.
218 .\"O (Mandatory locking must still be enabled on a per-file basis,
219 .\"O as described in
220 .\"O .BR fcntl (2).)
221 .\"O .\" FIXME Say more about MS_MOVE
222 ¤³¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ¶¯À©¥í¥Ã¥¯¤òǧ¤á¤ë¡£
223 (¶¯À©¥í¥Ã¥¯¤òÍ­¸ú¤Ë¤¹¤ë¤Ë¤Ï¡¢
224 .BR fcntl (2)
225 ¤Ç½Ò¤Ù¤é¤ì¤Æ¤¤¤ëÊýË¡¤Ç¥Õ¥¡¥¤¥ëñ°Ì¤Çµö²Ä¤ò¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤)
226 .\" FIXME Say more about MS_MOVE
227 .TP
228 .B MS_MOVE
229 .\"O Move a subtree.
230 .\"O .I source
231 .\"O specifies an existing mount point and
232 .\"O .I target
233 .\"O specifies the new location.
234 .\"O The move is atomic: at no point is the subtree unmounted.
235 .\"O The
236 .\"O .IR filesystemtype ", " mountflags ", and " data
237 .\"O arguments are ignored.
238 ÉôʬÌÚ¤ò°ÜÆ°¤¹¤ë¡£
239 .I source
240 ¤Ë¤Ï¤¹¤Ç¤Ë¸ºß¤¹¤ë¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤ò»ØÄꤷ¡¢
241 .I target
242 ¤Ë¤Ï¿·¤·¤¤¾ì½ê¤ò»ØÄꤹ¤ë¡£
243 °ÜÆ°¤Ï¥¢¥È¥ß¥Ã¥¯¤Ç¤¢¤ë¡£
244 Áàºî¤Î¼Â¹ÔÃæ¡¢Éôʬ¥Ä¥ê¡¼¤¬¥¢¥ó¥Þ¥¦¥ó¥È¤µ¤ì¤ë¤³¤È¤Ï¤Ê¤¤¡£
245 .IR filesystemtype ", " mountflags ", " data
246 °ú¤­¿ô¤Ï̵»ë¤µ¤ì¤ë¡£
247 .TP
248 .B MS_NOATIME
249 .\"O Do not update access times for (all types of) files on this file system.
250 ¤³¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î (Á´¤Æ¤Î¼ïÎà¤Î) ¥Õ¥¡¥¤¥ë¤Î¥¢¥¯¥»¥¹»þ¹ï¤ò¹¹¿·¤·¤Ê¤¤¡£
251 .TP
252 .B MS_NODEV
253 .\"O Do not allow access to devices (special files) on this file system.
254 ¤³¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥Ç¥Ð¥¤¥¹ (¥¹¥Ú¥·¥ã¥ë¥Õ¥¡¥¤¥ë) ¤Ø¤Î¥¢¥¯¥»¥¹¤òµö²Ä¤·¤Ê¤¤¡£
255 .TP
256 .B MS_NODIRATIME
257 .\"O Do not update access times for directories on this file system.
258 ¤³¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î¥¢¥¯¥»¥¹»þ¹ï¤ò¹¹¿·¤·¤Ê¤¤¡£
259 .\"O This flag provides a subset of the functionality provided by
260 .\"O .BR MS_NOATIME ;
261 .\"O that is,
262 .\"O .BR MS_NOATIME
263 .\"O implies
264 .\"O .BR MS_NODIRATIME .
265 ¤³¤Î¥Õ¥é¥°¤Ï
266 .B MS_NOATIME
267 ¤ÇÄ󶡤µ¤ì¤ëµ¡Ç½¤Î¥µ¥Ö¥»¥Ã¥È¤òÄ󶡤¹¤ë¡£¤Ä¤Þ¤ê¡¢
268 .B MS_NOATIME
269 ¤Ç¤Ï
270 .B MS_NODIRATIME
271 ¤¬°ÅÌۤΤ¦¤ÁÀßÄꤵ¤ì¤ë¡£
272 .TP
273 .B MS_NOEXEC
274 .\"O Do not allow programs to be executed from this file system.
275 ¤³¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë¤¢¤ë¥×¥í¥°¥é¥à¤Î¼Â¹Ô¤òµö²Ä¤·¤Ê¤¤¡£
276 .\" (Possibly useful for a file system that contains non-Linux executables.
277 .\" Often used as a security feature, e.g., to make sure that restricted
278 .\" users cannot execute files uploaded using ftp or so.)
279 .TP
280 .B MS_NOSUID
281 .\"O Do not honor set-user-ID and set-group-ID bits when executing
282 .\"O programs from this file system.
283 ¤³¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤¹¤ë¤È¤­¤Ë¡¢
284 set-user-ID ¥Ó¥Ã¥È¤È set-group-ID ¥Ó¥Ã¥È¤ò̵»ë¤¹¤ë¡£
285 .\" (This is a security feature to prevent users executing set-UID and
286 .\" set-GID programs from removable disk devices.)
287 .TP
288 .B MS_RDONLY
289 .\"O Mount file system read-only.
290 ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤òÆɤ߹þ¤ßÀìÍѤǥޥ¦¥ó¥È¤¹¤ë¡£
291 .\"
292 .\" FIXME Document MS_REC, available since 2.4.11.
293 .\" This flag has meaning in conjunction with MS_BIND and
294 .\" also with the shared subtree flags.
295 .TP
296 .\"O .BR MS_RELATIME " (Since Linux 2.6.20)"
297 .BR MS_RELATIME " (Linux 2.6.20 °Ê¹ß)"
298 .\"O When a file on this file system is accessed,
299 .\"O only update the file's last access time (atime) if the current value
300 .\"O of atime is less than or equal to the file's last modification time (mtime)
301 .\"O or last status change time (ctime).
302 .\"O This option is useful for programs, such as
303 .\"O .BR mutt (1),
304 .\"O that need to know when a file has been read since it was last modified.
305 ¤³¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤Î¥Õ¥¡¥¤¥ë¤¬¥¢¥¯¥»¥¹¤µ¤ì¤¿ºÝ¡¢
306 ¤½¤Î¥Õ¥¡¥¤¥ë¤ÎºÇ½ª¥¢¥¯¥»¥¹»þ¹ï (atime) ¤Î¸½ºßÃͤ¬
307 ºÇ½ª½¤Àµ»þ¹ï (mtime) ¤äºÇ½ª¾õÂÖÊѹ¹»þ¹ï (ctime) ¤È
308 Åù¤·¤¤¤«¾®¤µ¤¤¾ì¹ç¤Ë¤Î¤ß¡¢atime ¤ò¹¹¿·¤¹¤ë¡£
309 ¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢
310 .BR mutt (1)
311 ¤Î¤è¤¦¤Ë¡¢ºÇ¸å¤ÎÆâÍƽ¤Àµ°Ê¹ß¤Ë¥Õ¥¡¥¤¥ë¤¬¤¤¤ÄÆɤ߽Фµ¤ì¤¿¤«¤òÃΤë
312 ɬÍפ¬¤¢¤ë¥×¥í¥°¥é¥à¤ÇÍ­ÍѤǤ¢¤ë¡£
313 .\"O Since Linux 2.6.30, the kernel defaults to the behavior provided
314 .\"O by this flag (unless
315 .\"O .BR MS_NOATIME
316 .\"O was specified), and the
317 .\"O .B MS_STRICTATIME
318 .\"O flag is required to obtain traditional semantics.
319 .\"O In addition, since Linux 2.6.30,
320 .\"O the file's last access time is always updated if it
321 .\"O is more than 1 day old.
322 Linux 2.6.30 °Ê¹ß¤Ç¤Ï¡¢
323 .B MS_NOATIME
324 ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢¤³¤Î¥Õ¥é¥°¤ÎÆ°ºî¤¬
325 ¥«¡¼¥Í¥ë¤Î¥Ç¥Õ¥©¥ë¥ÈÆ°ºî¤È¤Ê¤Ã¤Æ¤ª¤ê¡¢
326 Linux 2.6.30 ¤è¤êÁ°¤ÎÆ°ºî¤ò¤µ¤»¤ë¤¿¤á¤Ë¤Ï
327 .B MS_STRICTATIME
328 ¥Õ¥é¥°¤ò»ØÄꤹ¤ëɬÍפ¬¤¢¤ë¡£
329 ¤³¤ì¤Ë²Ã¤¨¤Æ¡¢Linux 2.6.30 °Ê¹ß¤Ç¤Ï¡¢
330 ¥Õ¥¡¥¤¥ë¤ÎºÇ½ª¥¢¥¯¥»¥¹»þ¹ï¤¬ 1 Æü°Ê¾åÁ°¤Î¾ì¹ç¡¢
331 ¥Õ¥¡¥¤¥ë¤ÎºÇ½ª¥¢¥¯¥»¥¹»þ¹ï¤Ï¾ï¤Ë¹¹¿·¤µ¤ì¤ë¡£
332 .\" Matthew Garrett notes in the patch that added this behavior
333 .\" that this lets utilities such as tmpreaper (which deletes
334 .\" files based on last acces time) work correctly.
335 .TP
336 .B MS_REMOUNT
337 .\"O Remount an existing mount.
338 .\"O This allows you to change the
339 .\"O .I mountflags
340 .\"O and
341 .\"O .I data
342 .\"O of an existing mount without having to unmount and remount the file system.
343 .\"O .I source
344 .\"O and
345 .\"O .I target
346 .\"O should be the same values specified in the initial
347 .\"O .BR mount ()
348 .\"O call;
349 .\"O .I filesystemtype
350 .\"O is ignored.
351 ¤¹¤Ç¤Ë¸ºß¤¹¤ë¥Þ¥¦¥ó¥È¤òºÆ¥Þ¥¦¥ó¥È¤¹¤ë¡£
352 ¤³¤ì¤Ë¤è¤ê¡¢¤¹¤Ç¤Ë¸ºß¤¹¤ë¥Þ¥¦¥ó¥È¤Î
353 .I mountflags
354 ¤È
355 .I data
356 ¤ò¡¢°ìÅÙ¥¢¥ó¥Þ¥¦¥ó¥È¤·¤Æ¤«¤éºÆ¥Þ¥¦¥ó¥È¤¹¤ë¤È¤¤¤¦ºî¶È¤ò¤»¤º¤Ë
357 Êѹ¹¤Ç¤­¤ë¡£
358 .I source
359 ¤È
360 .I target
361 ¤ÏºÇ½é¤Î
362 .BR mount ()
363 ¸Æ¤Ó½Ð¤·¤ÈƱ¤¸Ãͤò»ØÄꤹ¤ëɬÍפ¬¤¢¤ë¡£
364 .I filesystemtype
365 ¤Ï̵»ë¤µ¤ì¤ë¡£
366
367 .\"O The following
368 .\"O .I mountflags
369 .\"O can be changed:
370 .\"O .BR MS_RDONLY ,
371 .\"O .BR MS_SYNCHRONOUS ,
372 .\"O .BR MS_MANDLOCK ;
373 .\"O before kernel 2.6.16, the following could also be changed:
374 .\"O .B MS_NOATIME
375 .\"O and
376 .\"O .BR MS_NODIRATIME ;
377 .\"O and, additionally, before kernel 2.4.10, the following could also be changed:
378 .\"O .BR MS_NOSUID ,
379 .\"O .BR MS_NODEV ,
380 .\"O .BR MS_NOEXEC .
381 .I mountflags
382 ¤Î¤¦¤Á
383 .BR MS_RDONLY ,
384 .BR MS_SYNCHRONOUS ,
385 .B MS_MANDLOCK
386 ¤ÏÊѹ¹²Äǽ¤Ç¤¢¤ë¡£
387 ¥«¡¼¥Í¥ë 2.6.16 ¤è¤êÁ°¤Ç¤Ï¡¢
388 .BR MS_NOATIME ,
389 .B MS_NODIRATIME
390 ¤âÊѹ¹²Äǽ¤Ç¤¢¤Ã¤¿¡£
391 ¥«¡¼¥Í¥ë 2.4.10 ¤è¤êÁ°¤Ç¤Ï¡¢¾åµ­¤Ë²Ã¤¨¤Æ¡¢
392 .BR MS_NOSUID ,
393 .BR MS_NODEV ,
394 .B MS_NOEXEC
395 ¤âÊѹ¹²Äǽ¤Ç¤¢¤Ã¤¿¡£
396 .TP
397 .\"O .BR MS_SILENT " (since Linux 2.6.17)"
398 .BR MS_SILENT " (Linux 2.6.17 °Ê¹ß)"
399 .\"O Suppress the display of certain
400 .\"O .RI ( printk ())
401 .\"O warning messages in the kernel log.
402 .\"O This flag supersedes the misnamed and obsolete
403 .\"O .BR MS_VERBOSE
404 .\"O flag (available since Linux 2.4.12), which has the same meaning.
405 ¥«¡¼¥Í¥ë¤Î¥í¥°Æâ¤Î¤¢¤ë¼ï¤Î
406 .RI ( printk ())
407 ·Ù¹ð¥á¥Ã¥»¡¼¥¸¤Îɽ¼¨¤òÍÞÀ©¤¹¤ë¡£
408 ¤³¤Î¥Õ¥é¥°¤Ï¡¢Ì¾Á°¤¬ÉÔŬÀÚ¤ÇÇѻߤµ¤ì¤¿
409 .B MS_VERBOSE
410 ¥Õ¥é¥° (Linux 2.4.12 °Ê¹ß¤ÇÍøÍѲÄǽ) ¤òÃÖ¤­´¹¤¨¤ë¤â¤Î¤Ç¡¢Æ±¤¸°ÕÌ£¤ò»ý¤Ä¡£
411 .TP
412 .\"O .BR MS_STRICTATIME " (Since Linux 2.6.30)"
413 .BR MS_STRICTATIME " (Linux 2.6.30 °Ê¹ß)"
414 .\"O Always update the last access time (atime) when files on this
415 .\"O file system are accessed.
416 .\"O (This was the default behavior before Linux 2.6.30.)
417 .\"O Specifying this flag overrides the effect of setting the
418 .\"O .BR MS_NOATIME
419 .\"O and
420 .\"O .BR MS_RELATIME
421 .\"O flags.
422 ¤³¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¥¢¥¯¥»¥¹¤µ¤ì¤¿ºÝ¤ËºÇ½ª¥¢¥¯¥»¥¹»þ¹ï (atime)
423 ¤ò¾ï¤Ë¹¹¿·¤¹¤ë (Linux 2.6.30 ¤è¤êÁ°¤Ç¤Ï¡¢¤³¤ì¤¬¥Ç¥Õ¥©¥ë¥È¤ÎÆ°ºî
424 ¤Ç¤¢¤Ã¤¿)¡£
425 ¤³¤Î¥Õ¥é¥°¤ò»ØÄꤹ¤ë¤³¤È¤Ç¡¢
426 .B MS_NOATIME
427 ¤È
428 .B MS_RELATIME
429 ¤Îξ¥Õ¥é¥°¤òÀßÄꤷ¤¿ºÝ¤Î±Æ¶Á¤ò¾å½ñ¤­¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
430 .TP
431 .B MS_SYNCHRONOUS
432 .\"O Make writes on this file system synchronous (as though
433 .\"O the
434 .\"O .B O_SYNC
435 .\"O flag to
436 .\"O .BR open (2)
437 .\"O was specified for all file opens to this file system).
438 ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ËÂФ·¤ÆƱ´üŪ¤Ë½ñ¤­¹þ¤ß¤ò¹Ô¤¦¡£
439 (¤³¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ÎÁ´¤Æ¤Î¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ¡¢
440 .BR open (2)
441 ¤Î¥Õ¥é¥°¤Ë
442 .B O_SYNC
443 ¤ò»ØÄꤷ¤¿¤è¤¦¤ÊÆ°ºî¤È¤Ê¤ë)
444 .PP
445 .\"O From Linux 2.4 onwards, the
446 .\"O .BR MS_NODEV ", " MS_NOEXEC ", and " MS_NOSUID
447 .\"O flags are settable on a per-mount-point basis.
448 .\"O From kernel 2.6.16 onwards,
449 .\"O .B MS_NOATIME
450 .\"O and
451 .\"O .B MS_NODIRATIME
452 .\"O are also settable on a per-mount-point basis.
453 .\"O The
454 .\"O .B MS_RELATIME
455 .\"O flag is also settable on a per-mount-point basis.
456 Linux 2.4 °Ê¹ß¤Ç¤Ï¡¢
457 .BR MS_NODEV ", " MS_NOEXEC ", " MS_NOSUID
458 ¤Ï¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥Èñ°Ì¤Ç»ØÄê¤Ç¤­¤ë¡£
459 ¥«¡¼¥Í¥ë 2.6.16 °Ê¹ß¤Ç¤Ï¡¢
460 .B MS_NOATIME
461 ¤È
462 .B MS_NODIRATIME
463 ¤â¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥Èñ°Ì¤Ç»ØÄê¤Ç¤­¤ë¡£
464 ¤Þ¤¿¡¢
465 .B MS_RELATIME
466 ¥Õ¥é¥°¤â¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥Èñ°Ì¤ÇÀßÄê¤Ç¤­¤ë¡£
467 .PP
468 .\"O The
469 .\"O .I data
470 .\"O argument is interpreted by the different file systems.
471 °ú¤­¿ô
472 .I data
473 ¤¬¤É¤Î¤è¤¦¤Ë²ò¼á¤µ¤ì¤ë¤«¤Ï¡¢¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë¤è¤Ã¤Æ°Û¤Ê¤ë¡£
474 .\"O Typically it is a string of comma-separated options
475 .\"O understood by this file system.
476 .\"O See
477 .\"O .BR mount (8)
478 .\"O for details of the options available for each filesystem type.
479 ¤¿¤¤¤Æ¤¤¤Ï¡¢»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ÇÍøÍѲÄǽ¤Ê¥ª¥×¥·¥ç¥ó¤¬
480 ¥³¥ó¥Þ¶èÀÚ¤ê¤Çʤ٤é¤ì¤¿Ê¸»úÎó¤Ç¤¢¤ë¡£
481 ³Æ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ËÂФ·¤Æ»ØÄê²Äǽ¤Ê¥ª¥×¥·¥ç¥ó¤Î¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï
482 .BR mount (8)
483 ¤ò»²¾È¤Î¤³¤È¡£
484 .\"O .SH "RETURN VALUE"
485 .SH ÊÖ¤êÃÍ
486 .\"O On success, zero is returned.
487 .\"O On error, \-1 is returned, and
488 .\"O .I errno
489 .\"O is set appropriately.
490 À®¸ù¤·¤¿¾ì¹ç 0 ¤¬Ê֤롣¼ºÇÔ¤·¤¿¾ì¹ç \-1 ¤¬Ê֤ꡢ
491 .I errno
492 ¤¬¥¨¥é¡¼¤ÎÆâÍƤ˽¾¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£
493 .\"O .SH ERRORS
494 .SH ¥¨¥é¡¼
495 .\"O The error values given below result from filesystem type independent
496 .\"O errors.
497 .\"O Each filesystem type may have its own special errors and its
498 .\"O own special behavior.
499 .\"O See the kernel source code for details.
500 °Ê²¼¤Ë¼¨¤¹¥¨¥é¡¼¤Ï¡¢¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë°Í¸¤·¤Ê¤¤¤â¤Î¤Ç¤¢¤ë¡£
501 ¤½¤ì¤¾¤ì¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¥¿¥¤¥×¤Ë¤Ï¸ÇÍ­¤Î¥¨¥é¡¼¤¬Â¸ºß¤¹¤ë¾ì¹ç¤¬¤¢¤ê¡¢
502 Æȼ«¤ÎÆ°ºî¤ò¤¹¤ë¤³¤È¤â¤¢¤ë¡£¾Ü¤·¤¯¤Ï¥«¡¼¥Í¥ë¤Î¥½¡¼¥¹¤ò¸«¤ÆÍߤ·¤¤¡£
503 .TP
504 .B EACCES
505 .\"O A component of a path was not searchable.
506 .\"O (See also
507 .\"O .BR path_resolution (7).)
508 .\"O Or, mounting a read-only filesystem was attempted without giving the
509 .\"O .B MS_RDONLY
510 .\"O flag.
511 .\"O Or, the block device
512 .\"O .I source
513 .\"O is located on a filesystem mounted with the
514 .\"O .B MS_NODEV
515 .\"O option.
516 .\"O .\" mtk: Probably: write permission is required for MS_BIND, with
517 .\"O .\" the error EPERM if not present; CAP_DAC_OVERRIDE is required.
518 ¥Ñ¥¹¤Ë´Þ¤Þ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Ë¸¡º÷ (¼Â¹Ô) µö²Ä¤¬¤Ê¤¤
519 .RB ( path_resolution (7)
520 ¤â»²¾È)¡£
521 ¤Þ¤¿¤Ï¡¢
522 .B MS_RONLY
523 ¥Õ¥é¥°¤ò»ØÄꤻ¤º¤ËÆɤ߹þ¤ßÀìÍѤΥե¡¥¤¥ë¥·¥¹¥Æ¥à¤ò
524 ¥Þ¥¦¥ó¥È¤·¤è¤¦¤È¤·¤¿¡£
525 ¤Þ¤¿¤Ï¡¢¥Ö¥í¥Ã¥¯¥Ç¥Ð¥¤¥¹
526 .I source
527 ¤¬
528 .B MS_NODEV
529 ¥ª¥×¥·¥ç¥ó¤Ç¥Þ¥¦¥ó¥È¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤Ë¤¢¤ë¡£
530 .\" mtk: Probably: write permission is required for MS_BIND, with
531 .\" the error EPERM if not present; CAP_DAC_OVERRIDE is required.
532 .TP
533 .B EBUSY
534 .\"O .I source
535 .\"O is already mounted.
536 .\"O Or, it cannot be remounted read-only,
537 .\"O because it still holds files open for writing.
538 .\"O Or, it cannot be mounted on
539 .\"O .I target
540 .\"O because
541 .\"O .I target
542 .\"O is still busy (it is the working directory of some task,
543 .\"O the mount point of another device, has open files, etc.).
544 .I source
545 ¤Ï´û¤Ë¥Þ¥¦¥ó¥È¤µ¤ì¤Æ¤¤¤ë¡£
546 ¤Þ¤¿¤Ï¡¢½ñ¤­¹þ¤ßÍѤ˥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤¬¤¢¤ê¡¢
547 Æɤ߹þ¤ßÀìÍѤǺƥޥ¦¥ó¥È¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¡£
548 ¤Þ¤¿¤Ï¡¢
549 .I target
550 ¤¬»ÈÍÑÃæ (busy) ¤Î¤¿¤á¡¢
551 .I target
552 ¤Ë¥Þ¥¦¥ó¥È¤Ç¤­¤Ê¤¤¡£
553 .I target
554 ¤¬»ÈÍÑÃæ¤ÎÎã¤È¤·¤Æ¤Ï¡¢¤¢¤ë¥¿¥¹¥¯¤¬Æ°ºî¤·¤Æ¤¤¤ë¥Ç¥£¥ì¥¯¥È¥ê (working
555 directory) ¤Ç¤¢¤ë¤È¤«¡¢Ê̤ΥǥХ¤¥¹¤Î¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤Ç¤¢¤ë¤È¤«¡¢
556 ¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤¹¤ë¡¢¤Ê¤É¤¬¤¢¤ë¡£
557 .TP
558 .B EFAULT
559 .\"O One of the pointer arguments points outside the user address space.
560 ¾ì½ê¤ò¼¨¤¹°ú¤­¿ô¤Î¤Ò¤È¤Ä¤¬¥æ¡¼¥¶¡¼¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Î³°¤ò»Ø¤·¤Æ¤¤¤ë¡£
561 .TP
562 .B EINVAL
563 .\"O .I source
564 .\"O had an invalid superblock.
565 .I source
566 ¤ËÉÔÀµ¤Ê¥¹¡¼¥Ñ¡¼¥Ö¥í¥Ã¥¯¤¬¤¢¤ë¡£
567 .\"O Or, a remount
568 .\"O .RB ( MS_REMOUNT )
569 .\"O was attempted, but
570 .\"O .I source
571 .\"O was not already mounted on
572 .\"O .IR target .
573 ¤Þ¤¿¤Ï¡¢
574 .I source
575 ¤¬
576 .I target
577 ¤Ë¥Þ¥¦¥ó¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¤Î¤Ë¡¢ºÆ¥Þ¥¦¥ó¥È
578 .RB ( MS_REMOUNT )
579 ¤¬Í׵ᤵ¤ì¤¿¡£
580 .\"O Or, a move
581 .\"O .RB ( MS_MOVE )
582 .\"O was attempted, but
583 .\"O .I source
584 .\"O was not a mount point, or was \(aq/\(aq.
585 ¤Þ¤¿¤Ï¡¢
586 .I source
587 ¤¬¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤Ç¤Ï¤Ê¤¤¤«¡¢\(aq/\(aq ¤Ê¤Î¤Ë¡¢°ÜÆ°
588 .RB ( MS_MOVE )
589 ¤¬Í׵ᤵ¤ì¤¿¡£
590 .TP
591 .B ELOOP
592 .\"O Too many links encountered during pathname resolution.
593 .\"O Or, a move was attempted, while
594 .\"O .I target
595 .\"O is a descendant of
596 .\"O .IR source .
597 ¥Ñ¥¹Ì¾¤Î²ò·èÃæ¤ËÅо줷¤¿¥ê¥ó¥¯¤¬Â¿¤¹¤®¤¿¡£
598 ¤Þ¤¿¤Ï¡¢
599 .I target
600 ¤¬
601 .I source
602 ¤Î»Ò¹¤Ê¤Î¤Ë°ÜÆ°¤¬Í׵ᤵ¤ì¤¿¡£
603 .TP
604 .B EMFILE
605 .\"O (In case no block device is required:)
606 .\"O Table of dummy devices is full.
607 .\" motoki: ¤É¤¦Ìõ¤¹¤Î¤¬¤¤¤¤¤À¤í¤¦¤«¡©
608 (¥Ö¥í¥Ã¥¯¥Ç¥Ð¥¤¥¹¤¬É¬ÍפǤʤ¤¾ì¹ç)
609 ¥À¥ß¡¼¥Ç¥Ð¥¤¥¹¤Î¥Æ¡¼¥Ö¥ë¤¬°ìÇդˤʤä¿¡£
610 .TP
611 .B ENAMETOOLONG
612 .\"O A pathname was longer than
613 .\"O .BR MAXPATHLEN .
614 ¥Ñ¥¹Ì¾¤ÎŤµ¤¬
615 .B MAXPATHLEN
616 ¤ò±Û¤¨¤¿¡£
617 .TP
618 .B ENODEV
619 .\"O .I filesystemtype
620 .\"O not configured in the kernel.
621 .I filesystemtype
622 ¤¬¥«¡¼¥Í¥ëÃæ¤ÇÄêµÁ (config) ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
623 .TP
624 .B ENOENT
625 .\"O A pathname was empty or had a nonexistent component.
626 ¥Ñ¥¹Ì¾¤¬¶õ¤Ç¤¢¤ë¡£¤â¤·¤¯¤Ï»ØÄꤵ¤ì¤¿¥Ñ¥¹¤¬Â¸ºß¤·¤Ê¤¤¡£
627 .TP
628 .B ENOMEM
629 .\"O The kernel could not allocate a free page to copy filenames or data into.
630 ¥«¡¼¥Í¥ë¤¬¥Õ¥¡¥¤¥ë̾¤ä¥Ç¡¼¥¿¤ò¥³¥Ô¡¼¤¹¤ë¤¿¤á¤Î¶õ¤­¥Ú¡¼¥¸¤ò³ÎÊݤǤ­¤Ê¤¤¡£
631 .TP
632 .B ENOTBLK
633 .\"O .I source
634 .\"O is not a block device (and a device was required).
635 (¥Ö¥í¥Ã¥¯¥Ç¥Ð¥¤¥¹¤¬É¬ÍפÀ¤¬)
636 .I source
637 ¤¬¥Ö¥í¥Ã¥¯¥Ç¥Ð¥¤¥¹¤Ç¤Ï¤Ê¤¤¡£
638 .TP
639 .B ENOTDIR
640 .\"O .IR target ,
641 .\"O or a prefix of
642 .\"O .IR source ,
643 .\"O is not a directory.
644 .I target
645 ¤«¡¢
646 .I source
647 ¤Î¥×¥ì¥Õ¥£¥Ã¥¯¥¹¤¬¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ï¤Ê¤¤¡£
648 .TP
649 .B ENXIO
650 .\"O The major number of the block device
651 .\"O .I source
652 .\"O is out of range.
653 ¥Ö¥í¥Ã¥¯¥Ç¥Ð¥¤¥¹
654 .I source
655 ¤Î¥á¥¸¥ã¡¼Èֹ椬Èϰϳ°¤Ç¤¢¤ë¡£
656 .TP
657 .B EPERM
658 .\"O The caller does not have the required privileges.
659 ¸Æ¤Ó½Ð¤·¸µ¤ËɬÍפʸ¢¸Â¤¬¤Ê¤¤¡£
660 .\"O .SH "CONFORMING TO"
661 .SH ½àµò
662 .\"O This function is Linux-specific and should not be used in
663 .\"O programs intended to be portable.
664 ¤³¤Î´Ø¿ô¤Ï Linux ¸ÇÍ­¤Î´Ø¿ô¤Ç¤¢¤ê¡¢°Ü¿¢¤ò¹Íθ¤·¤¿¥×¥í¥°¥é¥à¤Ç¤Ï
665 »ÈÍѤ¹¤Ù¤­¤Ç¤Ê¤¤¡£
666 .\"O .SH NOTES
667 .\"O The original
668 .\"O .B MS_SYNC
669 .\"O flag was renamed
670 .\"O .B MS_SYNCHRONOUS
671 .\"O in 1.1.69
672 .\"O when a different
673 .\"O .B MS_SYNC
674 .\"O was added to \fI<mman.h>\fP.
675 ¸µ¤Î
676 .B MS_SYNC
677 ¥Õ¥é¥°¤Ï¡¢Ê̤Î
678 .B MS_SYNC
679 ¤¬ \fI<mman.h>\fP ¤ËÄɲ䵤줿¤Î¤Ç
680 1.1.69 ¤«¤é
681 .B MS_SYNCHRONOUS
682 ¤Ë̾Á°¤¬ÊѤï¤Ã¤¿¡£
683 .LP
684 .\"O Before Linux 2.4 an attempt to execute a set-UID or set-GID program
685 .\"O on a filesystem mounted with
686 .\"O .B MS_NOSUID
687 .\"O would fail with
688 .\"O .BR EPERM .
689 Linux 2.4 ¤è¤êÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¢
690 .B MS_NOSUID
691 ¥ª¥×¥·¥ç¥óÉÕ¤­¤Ç¥Þ¥¦¥ó¥È¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤Î
692 set-UID ¤ä set-GID ¤Î¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤·¤è¤¦¤È¤¹¤ë¤È¡¢
693 .B EPERM
694 ¥¨¥é¡¼¤È¤Ê¤Ã¤¿¡£
695 .\"O Since Linux 2.4 the set-UID and set-GID bits are just silently ignored
696 .\"O in this case.
697 Linux 2.4 °Ê¹ß¤Ç¤Ï¡¢¤³¤Î¤è¤¦¤Ê¾ì¹ç¤Ï set-UID ¥Ó¥Ã¥È¤ä set-GID ¥Ó¥Ã¥È¤¬
698 ̵»ë¤µ¤ì¤ë¤À¤±¤Ç¤¢¤ë¡£
699 .\"O .\" The change is in patch-2.4.0-prerelease.
700 .\" ¤³¤ÎÊѹ¹¤Ï patch-2.4.0-prerelease ¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¡£
701 .\"O .SS Per-process Namespaces
702 .SS ¥×¥í¥»¥¹Ã±°Ì¤Î̾Á°¶õ´Ö
703 .\"O Starting with kernel 2.4.19, Linux provides
704 .\"O per-process mount namespaces.
705 .\"O A mount namespace is the set of file system mounts that
706 .\"O are visible to a process.
707 .\"O Mount-point namespaces can be (and usually are)
708 .\"O shared between multiple processes,
709 .\"O and changes to the namespace (i.e., mounts and unmounts) by one process
710 .\"O are visible to all other processes sharing the same namespace.
711 .\"O (The pre-2.4.19 Linux situation can be considered as one in which
712 .\"O a single namespace was shared by every process on the system.)
713 ¥«¡¼¥Í¥ë 2.4.19 °Ê¹ß¤Î Linux ¤Ç¤Ï¡¢¥×¥í¥»¥¹Ã±°Ì¤Î¥Þ¥¦¥ó¥È̾Á°¶õ´Ö
714 (mount namespace) ¤¬Ä󶡤µ¤ì¤Æ¤¤¤ë¡£¥Þ¥¦¥ó¥È̾Á°¶õ´Ö¤È¤Ï¡¢
715 ¤¢¤ë¥×¥í¥»¥¹¤Ë¸«¤¨¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥Þ¥¦¥ó¥È¤Î½¸¹ç¤Ç¤¢¤ë¡£
716 ¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤Î̾Á°¶õ´Ö¤ÏÊ£¿ô¤Î¥×¥í¥»¥¹¤Ç¶¦Í­¤¹¤ë¤³¤È¤¬¤Ç¤­¡¢
717 ÉáÄ̤϶¦Í­¤µ¤ì¤Æ¤¤¤ë¡£
718 °ì¤Ä¤Î¥×¥í¥»¥¹¤Ë¤è¤ë̾Á°¶õ´Ö¤ÎÊѹ¹ (¤¹¤Ê¤ï¤Á¡¢¥Þ¥¦¥ó¥È¤ä¥¢¥ó¥Þ¥¦¥ó¥È) ¤Ï
719 Ʊ¤¸Ì¾Á°¶õ´Ö¤ò¶¦Í­¤¹¤ë¾¤ÎÁ´¤Æ¤Î¥×¥í¥»¥¹¤Ë¤â¸«¤¨¤ë¡£
720 (2.4.19 ¤è¤êÁ°¤Î Linux ¤Ï¡¢°ì¤Ä¤Î̾Á°¶õ´Ö¤¬¥·¥¹¥Æ¥à¾å¤ÎÁ´¥×¥í¥»¥¹¤Ç
721 ¶¦Í­¤µ¤ì¤ë¾õ¶·¤È¤ß¤Ê¤¹¤³¤È¤¬¤Ç¤­¤ë¡£)
722
723 .\"O A child process created by
724 .\"O .BR fork (2)
725 .\"O shares its parent's mount namespace;
726 .\"O the mount namespace is preserved across an
727 .\"O .BR execve (2).
728 .BR fork (2)
729 ·Ðͳ¤ÇºîÀ®¤µ¤ì¤¿»Ò¥×¥í¥»¥¹¤Ï¿Æ¥×¥í¥»¥¹¤Î¥Þ¥¦¥ó¥È̾Á°¶õ´Ö¤ò¶¦Í­¤¹¤ë¡£
730 .BR execve (2)
731 ¤ÎÁ°¸å¤Ç¥Þ¥¦¥ó¥È̾Á°¶õ´Ö¤ÏÊÝ»ý¤µ¤ì¤ë¡£
732
733 .\"O A process can obtain a private mount namespace if:
734 .\"O it was created using the
735 .\"O .BR clone ()
736 .\"O .BR CLONE_NEWNS
737 .\"O flag,
738 .\"O in which case its new namespace is initialized to be a
739 .\"O .I copy
740 .\"O of the namespace of the process that called
741 .\"O .BR clone ();
742 .\"O or it calls
743 .\"O .BR unshare (2)
744 .\"O with the
745 .\"O .BR CLONE_NEWNS
746 .\"O flag,
747 .\"O which causes the caller's mount namespace to obtain a private copy
748 .\"O of the namespace that it was previously sharing with other processes,
749 .\"O so that future mounts and unmounts by the caller are invisible
750 .\"O to other processes (except child processes that the caller
751 .\"O subsequently creates) and vice versa.
752 ¥×¥í¥»¥¹¤Ï¼«Ê¬ÍÑ (private) ¤Î¥Þ¥¦¥ó¥È̾Á°¶õ´Ö¤ò»ý¤Ä¤³¤È¤¬¤Ç¤­¤ë¡£
753 ¼«Ê¬ÍѤÎ̾Á°¶õ´Ö¤ò»ý¤Ä¤³¤È¤¬¤Ç¤­¤ë¤Î¤Ï¡¢
754 ¤½¤Î¥×¥í¥»¥¹¤¬
755 .BR clone ()
756 .B CLONE_NEWNS
757 ¥Õ¥é¥°¤ò»È¤Ã¤ÆºîÀ®¤µ¤ì¤¿¾ì¹ç¤È¡¢
758 ¤½¤Î¥×¥í¥»¥¹¤¬
759 .B CLONE_NEWNS
760 ¥Õ¥é¥°ÉÕ¤­¤Ç
761 .BR unshare (2)
762 ¤ò¸Æ¤Ó½Ð¤·¤¿¾ì¹ç¤Ç¤¢¤ë¡£
763 Á°¼Ô¤Î¾ì¹ç¡¢ºîÀ®¤µ¤ì¤¿¥×¥í¥»¥¹¤Î¿·¤·¤¤Ì¾Á°¶õ´Ö¤Ï
764 .BR clone ()
765 ¤ò¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î̾Á°¶õ´Ö¤Î¡Ö¥³¥Ô¡¼¡×¤Ç½é´ü²½¤µ¤ì¤ë¡£
766 ¸å¼Ô¤Î¾ì¹ç¡¢
767 .BR unshare (2)
768 ¤ò¸Æ¤Ó½Ð¤¹¤È¡¢¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤Î¥Þ¥¦¥ó¥È̾Á°¶õ´Ö¤¬¡¢
769 ¤½¤ì¤Þ¤Ç¤Ï¾¤Î¥×¥í¥»¥¹¤È¶¦Í­¤·¤Æ¤¤¤¿Ì¾Á°¶õ´Ö¤Î¼«Ê¬ÍѤΥ³¥Ô¡¼¤È¤Ê¤ë¡£
770 ¤³¤ì¤Ë¤è¤ê¡¢¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤¬¤³¤ì°Ê¸å¤Ë¹Ô¤¦¥Þ¥¦¥ó¥È/¥¢¥ó¥Þ¥¦¥ó¥È¤Ï
771 ¾¤Î¥×¥í¥»¥¹¤«¤é¸«¤¨¤Ê¤¯¤Ê¤ë
772 (¤¿¤À¤·¡¢¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤¬
773 .BR unshare (2)
774 ¤Î¸Æ¤Ó½Ð¤·°Ê¹ß¤ËºîÀ®¤·¤¿»Ò¥×¥í¥»¥¹¤Ë¤Ï¸«¤¨¤ë)¡£
775 ¤Þ¤¿¡¢¤½¤ÎµÕ¤Î¡¢Â¾¤Î¥×¥í¥»¥¹¤¬¹Ô¤Ã¤¿¥Þ¥¦¥ó¥È/¥¢¥ó¥Þ¥¦¥ó¥È¤â¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤Ë¤Ï
776 ¸«¤¨¤Ê¤¯¤Ê¤ë¡£
777
778 .\"O The Linux-specific
779 .\"O .I /proc/PID/self
780 .\"O file exposes the list of mount points in the mount
781 .\"O namespace of the process with the specified ID; see
782 .\"O .BR proc (5)
783 .\"O for details.
784 Linux Æȼ«¤Î¥Õ¥¡¥¤¥ë
785 .\"Omotoki: /proc/PID/mounts ¤Î´Ö°ã¤¤¤Ç¤Ï¡©
786 .\"Omotoki: self ¤Ï PID ¤ÎÂå¤ï¤ê¤Ë¤Ê¤ë¤â¤Î¡£
787 .I /proc/PID/mounts
788 ¤Ç¤Ï¡¢»ØÄꤵ¤ì¤¿ ID ¤ò»ý¤Ä¥×¥í¥»¥¹¤Î¥Þ¥¦¥ó¥È̾Á°¶õ´Ö¤Ë¤ª¤±¤ë
789 ¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤Î¥ê¥¹¥È¤¬¸ø³«¤µ¤ì¤Æ¤¤¤ë¡£¾ÜºÙ¤Ï
790 .BR proc (5)
791 ¤ò»²¾È¤Î¤³¤È¡£
792 .\"O .SH "SEE ALSO"
793 .SH ´ØÏ¢¹àÌÜ
794 .BR umount (2),
795 .BR path_resolution (7),
796 .BR mount (8),
797 .BR umount (8)