1 .\" Hey Emacs! This file is -*- nroff -*- source.
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>
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.
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.
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
24 .\" Formatted or processed versions of this manual, if unaccompanied by
25 .\" the source, must acknowledge the copyright and authors of this work.
27 .\" 2008-10-06, mtk: Created this as a new page by splitting
28 .\" umount/umount2 material out of mount.2
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
34 .TH UMOUNT 2 2009-09-03 "Linux" "Linux Programmer's Manual"
37 .\"O umount, umount2 \- unmount file system
38 umount, umount2 \- ファイルシステムをアンマウントする
42 .B "#include <sys/mount.h>"
44 .BI "int umount(const char *" target );
46 .BI "int umount2(const char *" target ", int " flags );
53 .\"O remove the attachment of the (topmost) file system mounted on
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
65 .\"O Appropriate privilege (Linux: the
67 .\"O capability) is required to unmount file systems.
73 .\"O Linux 2.1.116 added the
75 .\"O system call, which, like
77 .\"O unmounts a target, but allows additional
79 .\"O controlling the behavior of the operation:
88 が追加されており、操作時の振る舞いを制御できる。
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) でも強制的にアンマウントを実行する。
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 不可能となり、実際のアンマウントはマウントポイントがビジーで
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.
112 .\"O If a mount point is not currently in use, then an initial call to
114 .\"O with this flag fails with the error
116 .\"O but marks the mount point as expired.
117 マウントポイントが現在使用中でない場合、このフラグをつけて
121 エラーで失敗するが、マウントポイントには期限切れ (expire)
123 .\"O The mount point remains expired as long as it isn't accessed
125 そのマウントポイントはいずれかのプロセスがアクセスしない限り
131 .\"O unmounts an expired mount point.
136 を呼び出すと、期限切れの印のついたマウントポイントが
138 .\"O This flag cannot be specified with either
141 .\"O .BR MNT_DETACH .
147 .\"O .SH "RETURN VALUE"
149 .\"O On success, zero is returned.
150 .\"O On error, \-1 is returned, and
152 .\"O is set appropriately.
159 .\"O The error values given below result from filesystem type independent
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 独自の動作をすることもある。詳しくはカーネルのソースを見て欲しい。
173 .\"O successfully marked an unbusy file system as expired.
177 の呼び出しで、正常に未使用のファイルシステムに期限切れの印を
182 .\"O could not be unmounted because it is busy.
189 .\"O points outside the user address space.
195 .\"O is not a mount point.
219 .\"O A pathname was longer than
220 .\"O .BR MAXPATHLEN .
226 .\"O A pathname was empty or had a nonexistent component.
227 パス名が空である。もしくは指定されたパスが存在しない。
230 .\"O The kernel could not allocate a free page to copy filenames or data into.
231 カーネルがファイル名やデータをコピーするための空きページを確保できなかった。
234 .\"O The caller does not have the required privileges.
241 .\" http://sourceware.org/bugzilla/show_bug.cgi?id=10092
242 .\"O are only available in glibc since version 2.11.
246 はバージョン 2.11 以降の glibc でのみ利用できる。
247 .\"O .SH "CONFORMING TO"
249 .\"O These functions are Linux-specific and should not be used in
250 .\"O programs intended to be portable.
251 この関数は Linux 固有の関数であり、移植を考慮したプログラムでは
257 .\"O function was called as \fIumount(device)\fP and would return
259 .\"O when called with something other than a block device.
262 関数は \fIumount(device)\fP の形で呼び出され、
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 デバイスを指定しただけでは不十分だからである)。
280 .BR path_resolution (7),