OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / umount.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 .\" 2008-10-06, mtk: Created this as a new page by splitting
28 .\"     umount/umount2 material out of mount.2
29 .\"
30 .\" Japanese Version Copyright (c) 2008  Akihiro MOTOKI
31 .\"         all rights reserved.
32 .\" Translated 2008-11-20, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.13
33 .\" 
34 .TH UMOUNT 2 2009-09-03 "Linux" "Linux Programmer's Manual"
35 .\"O .SH NAME
36 .SH Ì¾Á°
37 .\"O umount, umount2 \- unmount file system
38 umount, umount2 \- ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò¥¢¥ó¥Þ¥¦¥ó¥È¤¹¤ë
39 .\"O .SH SYNOPSIS
40 .SH ½ñ¼°
41 .nf
42 .B "#include <sys/mount.h>"
43 .sp
44 .BI "int umount(const char *" target );
45 .sp
46 .BI "int umount2(const char *" target ", int " flags );
47 .fi
48 .\"O .SH DESCRIPTION
49 .SH ÀâÌÀ
50 .\"O .BR umount ()
51 .\"O and
52 .\"O .BR umount2 ()
53 .\"O remove the attachment of the (topmost) file system mounted on
54 .\"O .IR target .
55 .BR umount ()
56 ¤È
57 .BR umount2 ()
58 ¤Ï
59 .I target
60 ¤Ë¥Þ¥¦¥ó¥È¤µ¤ì¤Æ¤¤¤ë (ºÇ¾å°Ì¤Î) ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò³°¤¹¡£
61 .\" Note: the kernel naming differs from the glibc naming
62 .\" umount2 is the glibc name for what the kernel now calls umount
63 .\" and umount is the glibc name for oldumount
64
65 .\"O Appropriate privilege (Linux: the
66 .\"O .B CAP_SYS_ADMIN
67 .\"O capability) is required to unmount file systems.
68 ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥¢¥ó¥Þ¥¦¥ó¥È¤ò¹Ô¤¦¤Ë¤Ï¡¢
69 ŬÀڤʸ¢¸Â (Linux ¤Ç¤Ï
70 .B CAP_SYS_ADMIN
71 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£) ¤¬É¬ÍפǤ¢¤ë¡£
72
73 .\"O Linux 2.1.116 added the
74 .\"O .BR umount2 ()
75 .\"O system call, which, like
76 .\"O .BR umount (),
77 .\"O unmounts a target, but allows additional
78 .\"O .I flags
79 .\"O controlling the behavior of the operation:
80 Linux 2.1.116 ¤«¤é¡¢
81 .BR umount2 ()
82 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤¬Äɲ䵤줿¡£¤³¤ì¤Ï
83 .BR umount ()
84 ¤ÈƱÍͤË
85 .I target
86 ¤ò¥¢¥ó¥Þ¥¦¥ó¥È¤¹¤ë¤¬¡¢
87 .I flags
88 ¤¬Äɲ䵤ì¤Æ¤ª¤ê¡¢Áàºî»þ¤Î¿¶¤ëÉñ¤¤¤òÀ©¸æ¤Ç¤­¤ë¡£
89 .TP
90 .\"O .BR MNT_FORCE " (since Linux 2.1.116)"
91 .BR MNT_FORCE " (2.1.116 °Ê¹ß)"
92 .\"O Force unmount even if busy.
93 .\"O This can cause data loss.
94 .\"O (Only for NFS mounts.)
95 »ÈÍÑÃæ (busy) ¤Ç¤â¶¯À©Åª¤Ë¥¢¥ó¥Þ¥¦¥ó¥È¤ò¼Â¹Ô¤¹¤ë¡£
96 ¤³¤ì¤ò¹Ô¤¦¤È¥Ç¡¼¥¿¤ò¼º¤¦²ÄǽÀ­¤¬¤¢¤ë¡£
97 (NFS ¥Þ¥¦¥ó¥ÈÀìÍÑ)
98 .TP
99 .\"O .BR MNT_DETACH " (since Linux 2.4.11)"
100 .BR MNT_DETACH " (2.4.11 °Ê¹ß)"
101 .\"O Perform a lazy unmount: make the mount point unavailable for
102 .\"O new accesses, and actually perform the unmount when the mount point
103 .\"O ceases to be busy.
104 Ãٱ䥢¥ó¥Þ¥¦¥ó¥È¤ò¹Ô¤¦¡£¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤ËÂФ¹¤ë¿·µ¬¤Î¥¢¥¯¥»¥¹¤Ï
105 ÉÔ²Äǽ¤È¤Ê¤ê¡¢¼ÂºÝ¤Î¥¢¥ó¥Þ¥¦¥ó¥È¤Ï¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤¬¥Ó¥¸¡¼¤Ç
106 ¤Ê¤¯¤Ê¤Ã¤¿»þÅÀ¤Ç¹Ô¤¦¡£
107 .TP
108 .\"O .BR MNT_EXPIRE " (since Linux 2.6.8)"
109 .BR MNT_EXPIRE " (Linux 2.6.8 °Ê¹ß)"
110 .\"O Mark the mount point as expired.
111 ¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤Ë´ü¸ÂÀÚ¤ì¤Î°õ¤ò¤Ä¤±¤ë¡£
112 .\"O If a mount point is not currently in use, then an initial call to
113 .\"O .BR umount2 ()
114 .\"O with this flag fails with the error
115 .\"O .BR EAGAIN ,
116 .\"O but marks the mount point as expired.
117 ¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤¬¸½ºß»ÈÍÑÃæ¤Ç¤Ê¤¤¾ì¹ç¡¢¤³¤Î¥Õ¥é¥°¤ò¤Ä¤±¤Æ
118 .BR umount2 ()
119 ¤ò½é¤á¤Æ¸Æ¤Ó½Ð¤¹¤È
120 .B EAGAIN
121 ¥¨¥é¡¼¤Ç¼ºÇÔ¤¹¤ë¤¬¡¢¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤Ë¤Ï´ü¸ÂÀÚ¤ì (expire)
122 ¤Î°õ¤¬¤Ä¤±¤é¤ì¤ë¡£
123 .\"O The mount point remains expired as long as it isn't accessed
124 .\"O by any process.
125 ¤½¤Î¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤Ï¤¤¤º¤ì¤«¤Î¥×¥í¥»¥¹¤¬¥¢¥¯¥»¥¹¤·¤Ê¤¤¸Â¤ê
126 ´ü¸ÂÀÚ¤ì¤Î°õ¤¬¤Ä¤¤¤¿¤Þ¤Þ¤È¤Ê¤ë¡£
127 .\"O A second
128 .\"O .BR umount2 ()
129 .\"O call specifying
130 .\"O .B MNT_EXPIRE
131 .\"O unmounts an expired mount point.
132 ¤â¤¦°ìÅÙ
133 .B MNT_EXPIRE
134 ¤ò¤Ä¤±¤Æ
135 .BR umount2 ()
136 ¤ò¸Æ¤Ó½Ð¤¹¤È¡¢´ü¸ÂÀÚ¤ì¤Î°õ¤Î¤Ä¤¤¤¿¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤¬
137 ¥¢¥ó¥Þ¥¦¥ó¥È¤µ¤ì¤ë¡£
138 .\"O This flag cannot be specified with either
139 .\"O .B MNT_FORCE
140 .\"O or
141 .\"O .BR MNT_DETACH .
142 ¤³¤Î¥Õ¥é¥°¤ò
143 .B MNT_FORCE
144 ¤â¤·¤¯¤Ï
145 .B MNT_DETACH
146 ¤ÈƱ»þ¤Ë»ØÄꤹ¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤¡£
147 .\"O .SH "RETURN VALUE"
148 .SH ÊÖ¤êÃÍ
149 .\"O On success, zero is returned.
150 .\"O On error, \-1 is returned, and
151 .\"O .I errno
152 .\"O is set appropriately.
153 À®¸ù¤·¤¿¾ì¹ç 0 ¤¬Ê֤롣
154 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤¬Ê֤ꡢ
155 .I errno
156 ¤¬¥¨¥é¡¼¤ÎÆâÍƤˤ·¤¿¤¬¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£
157 .\"O .SH ERRORS
158 .SH ¥¨¥é¡¼
159 .\"O The error values given below result from filesystem type independent
160 .\"O errors.
161 .\"O Each filesystem type may have its own special errors and its
162 .\"O own special behavior.
163 .\"O See the kernel source code for details.
164 °Ê²¼¤Ë¼¨¤¹¥¨¥é¡¼¤Ï¡¢¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë°Í¸¤·¤Ê¤¤¤â¤Î¤Ç¤¢¤ë¡£
165 ¤½¤ì¤¾¤ì¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¥¿¥¤¥×¤Ë¤Ï¸ÇÍ­¤Î¥¨¥é¡¼¤¬Â¸ºß¤¹¤ë¾ì¹ç¤¬¤¢¤ê¡¢
166 Æȼ«¤ÎÆ°ºî¤ò¤¹¤ë¤³¤È¤â¤¢¤ë¡£¾Ü¤·¤¯¤Ï¥«¡¼¥Í¥ë¤Î¥½¡¼¥¹¤ò¸«¤ÆÍߤ·¤¤¡£
167 .TP
168 .B EAGAIN
169 .\"O A call to
170 .\"O .BR umount2 ()
171 .\"O specifying
172 .\"O .B MNT_EXPIRE
173 .\"O successfully marked an unbusy file system as expired.
174 .B MNT_EXPIRE
175 ¤ò»ØÄꤷ¤¿
176 .BR umount2 ()
177 ¤Î¸Æ¤Ó½Ð¤·¤Ç¡¢Àµ¾ï¤Ë̤»ÈÍѤΥե¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë´ü¸ÂÀÚ¤ì¤Î°õ¤ò
178 ¤Ä¤±¤ë¤³¤È¤¬¤Ç¤­¤¿¡£
179 .TP
180 .B EBUSY
181 .\"O .I target
182 .\"O could not be unmounted because it is busy.
183 »ÈÍÑÃæ (busy) ¤Î¤¿¤á¡¢
184 .I target
185 ¤ò¥¢¥ó¥Þ¥¦¥ó¥È¤Ç¤­¤Ê¤«¤Ã¤¿¡£
186 .TP
187 .B EFAULT
188 .\"O .I target
189 .\"O points outside the user address space.
190 .I target
191 ¤¬¥æ¡¼¥¶¥¢¥É¥ì¥¹¶õ´Ö¤Î³°¤ò»Ø¤·¤Æ¤¤¤ë¡£
192 .TP
193 .B EINVAL
194 .\"O .I target
195 .\"O is not a mount point.
196 .\"O Or,
197 .\"O .BR umount2 ()
198 .\"O was called with
199 .\"O .B MNT_EXPIRE
200 .\"O and either
201 .\"O .B MNT_DETACH
202 .\"O or
203 .\"O .BR MNT_FORCE .
204 .I target
205 ¤¬¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤Ç¤Ï¤Ê¤¤¡£
206 ¤Þ¤¿¤Ï¡¢
207 .BR umount2 ()
208 ¤Ç¡¢
209 .B MNT_EXPIRE
210 ¤¬»ØÄꤵ¤ì¤¿
211 .BR umount2 ()
212 ¤Ç¡¢
213 .B MNT_DETACH
214 ¤«
215 .B MNT_FORCE
216 ¤¬Æ±»þ¤Ë»ØÄꤵ¤ì¤¿¡£
217 .TP
218 .B ENAMETOOLONG
219 .\"O A pathname was longer than
220 .\"O .BR MAXPATHLEN .
221 ¥Ñ¥¹Ì¾¤ÎŤµ¤¬
222 .B MAXPATHLEN
223 ¤è¤êŤ«¤Ã¤¿¡£
224 .TP
225 .B ENOENT
226 .\"O A pathname was empty or had a nonexistent component.
227 ¥Ñ¥¹Ì¾¤¬¶õ¤Ç¤¢¤ë¡£¤â¤·¤¯¤Ï»ØÄꤵ¤ì¤¿¥Ñ¥¹¤¬Â¸ºß¤·¤Ê¤¤¡£
228 .TP
229 .B ENOMEM
230 .\"O The kernel could not allocate a free page to copy filenames or data into.
231 ¥«¡¼¥Í¥ë¤¬¥Õ¥¡¥¤¥ë̾¤ä¥Ç¡¼¥¿¤ò¥³¥Ô¡¼¤¹¤ë¤¿¤á¤Î¶õ¤­¥Ú¡¼¥¸¤ò³ÎÊݤǤ­¤Ê¤«¤Ã¤¿¡£
232 .TP
233 .B EPERM
234 .\"O The caller does not have the required privileges.
235 ¸Æ¤Ó½Ð¤·¸µ¤¬É¬Íפʸ¢¸Â¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¡£
236 .\"O .SH VERSIONS
237 .SH ¥Ð¡¼¥¸¥ç¥ó
238 .\"O .BR MNT_DETACH
239 .\"O and
240 .\"O .BR MNT_EXPIRE
241 .\" http://sourceware.org/bugzilla/show_bug.cgi?id=10092
242 .\"O are only available in glibc since version 2.11.
243 .BR MNT_DETACH
244 ¤È
245 .BR MNT_EXPIRE
246 ¤Ï¥Ð¡¼¥¸¥ç¥ó 2.11 °Ê¹ß¤Î glibc ¤Ç¤Î¤ßÍøÍѤǤ­¤ë¡£
247 .\"O .SH "CONFORMING TO"
248 .SH ½àµò
249 .\"O These functions are Linux-specific and should not be used in
250 .\"O programs intended to be portable.
251 ¤³¤Î´Ø¿ô¤Ï Linux ¸ÇÍ­¤Î´Ø¿ô¤Ç¤¢¤ê¡¢°Ü¿¢¤ò¹Íθ¤·¤¿¥×¥í¥°¥é¥à¤Ç¤Ï
252 »ÈÍѤ¹¤Ù¤­¤Ç¤Ê¤¤¡£
253 .\"O .SH NOTES
254 .SH Ãí°Õ
255 .\"O The original
256 .\"O .BR umount ()
257 .\"O function was called as \fIumount(device)\fP and would return
258 .\"O .B ENOTBLK
259 .\"O when called with something other than a block device.
260 ¸µ¡¹¤Î
261 .BR umount ()
262 ´Ø¿ô¤Ï \fIumount(device)\fP ¤Î·Á¤Ç¸Æ¤Ó½Ð¤µ¤ì¡¢
263 ¥Ö¥í¥Ã¥¯¥Ç¥Ð¥¤¥¹°Ê³°¤ò»ØÄꤷ¤Æ¸Æ¤Ó½Ð¤¹¤È
264 .B ENOTBLK
265 ¤òÊÖ¤·¤¿¡£
266 .\"O In Linux 0.98p4 a call \fIumount(dir)\fP was added, in order to
267 .\"O support anonymous devices.
268 Linux 0.98p4 ¤Ç¡¢ÌµÌ¾¥Ç¥Ð¥¤¥¹ (anonymous device) ¤ËÂбþ¤¹¤ë¤¿¤á¤Ë
269 \fIumount(dir)\fP ¤Î·Á¤Ç¤Î¸Æ¤Ó½Ð¤·¤¬²Ã¤¨¤é¤ì¤¿¡£
270 .\"O In Linux 2.3.99-pre7 the call \fIumount(device)\fP was removed,
271 .\"O leaving only \fIumount(dir)\fP (since now devices can be mounted
272 .\"O in more than one place, so specifying the device does not suffice).
273 Linux 2.3.99-pre7 ¤Ç¡¢\fIumount(device)\fP ¤Ïºï½ü¤µ¤ì¡¢
274 \fIumount(dir)\fP ¤À¤±¤¬»Ä¤µ¤ì¤¿
275 (°ì¤Ä¤Î¥Ç¥Ð¥¤¥¹¤òÊ£¿ô¤Î°ÌÃ֤˥ޥ¦¥ó¥È½ÐÍè¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¤¿¤á¡¢
276 ¥Ç¥Ð¥¤¥¹¤ò»ØÄꤷ¤¿¤À¤±¤Ç¤ÏÉÔ½½Ê¬¤À¤«¤é¤Ç¤¢¤ë)¡£
277 .\"O .SH "SEE ALSO"
278 .SH ´ØÏ¢¹àÌÜ
279 .BR mount (2),
280 .BR path_resolution (7),
281 .BR mount (8),
282 .BR umount (8)