]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - sys-utils/umount.8
docs: update year in libs docs
[thirdparty/util-linux.git] / sys-utils / umount.8
index 1e27f01f8957b0f3f6ef0d52a745807de1331dab..b075467d58d83d16d0da3f26a2a9cba37ca15f1b 100644 (file)
@@ -55,7 +55,8 @@ working directory there, or when a swap file on it is in use.  The
 offending process could even be
 .B umount
 itself - it opens libc, and libc in its turn may open for example locale
-files.  A lazy unmount avoids this problem.
+files.  A lazy unmount avoids this problem, but it may introduce another
+issues. See \fB\-\-lazy\fR description below.
 .SH OPTIONS
 .TP
 .BR \-a , " \-\-all"
@@ -119,6 +120,28 @@ By default such a helper program is called if it exists.
 Lazy unmount.  Detach the filesystem from the file hierarchy now,
 and clean up all references to this filesystem as soon as it is not busy
 anymore.
+
+A system reboot would be expected in near future if you're going to use this
+option for network filesystem or local filesystem with submounts.  The
+recommended use-case for \fBumount \-l\fR is to prevent hangs on shutdown due to
+an unreachable network share where a normal umount will hang due to a downed
+server or a network partition. Remounts of the share will not be possible.
+
+.TP
+.BR \-N , " \-\-namespace " \fIns
+Perform umount in namespace specified by \fIns\fR.
+\fIns\fR is either PID of process running in that namespace
+or special file representing that namespace.
+.sp
+.BR umount (8)
+switches to the namespace when it reads /etc/fstab, writes /etc/mtab (or writes to /run/mount) and calls
+.BR umount (2)
+system call, otherwise it runs in the original namespace. It means that the target namespace does not have
+to contain any libraries or another requirements necessary to execute
+.BR umount (2)
+command.
+.sp
+See \fBnamespaces\fR(7) for more information.
 .TP
 .BR \-n , " \-\-no\-mtab"
 Unmount without writing in
@@ -132,6 +155,9 @@ Each option can be prefixed with
 .B no
 to indicate that no action should be taken for this option.
 .TP
+.BR \-q , " \-\-quiet"
+Suppress "not mounted" error messages.
+.TP
 .BR \-R , " \-\-recursive"
 Recursively unmount each specified directory.  Recursion for each directory will
 stop if any unmount operation in the chain fails for any reason.  The relationship
@@ -150,12 +176,11 @@ More than one type may be specified in a comma-separated list.  The list
 of filesystem types can be prefixed with
 .B no
 to indicate that no action should be taken for all of the mentioned types.
-.BR
 Note that
 .B umount
 reads information about mounted filesystems from kernel (/proc/mounts) and
 filesystem names may be different than filesystem names used in the /etc/fstab
-(e.g. "nfs4" vs. "nfs").
+(e.g., "nfs4" vs. "nfs").
 .TP
 .BR \-v , " \-\-verbose"
 Verbose mode.
@@ -165,6 +190,25 @@ Display version information and exit.
 .TP
 .BR \-h , " \-\-help"
 Display help text and exit.
+.SH "NON-SUPERUSER UMOUNTS"
+Normally, only the superuser can umount filesystems.
+However, when
+.I fstab
+contains the
+.B user
+option on a line, anybody can umount the corresponding filesystem.  For more details see
+.BR mount (8)
+man page.
+.PP
+Since version 2.34 \fBumount\fR command allows to perform umount operation also
+for fuse filesystems if kernel mount table contains user's ID.  In this case fstab
+user= mount option is not required.
+.PP
+Since version 2.35 \fBumount\fR command does not exit when user permissions are
+inadequate by internal libmount security rules.  It drops suid permissions
+and continue as regular non-root user. It allows to support use-cases where
+root permissions are not necessary (e.g., fuse filesystems, user namespaces,
+etc).
 .SH "LOOP DEVICE"
 The
 .B umount
@@ -175,7 +219,7 @@ command independently of /etc/mtab.
 In this case the device is initialized with "autoclear" flag (see
 .BR losetup (8)
 output for more details), otherwise it's necessary to use the option \fB \-\-detach\-loop\fR
-or call \fBlosetup -d <device>\fR. The autoclear feature is supported since Linux 2.6.25.
+or call \fBlosetup \-d <device>\fR. The autoclear feature is supported since Linux 2.6.25.
 .SH EXTERNAL HELPERS
 The syntax of external unmount helpers is:
 .PP
@@ -183,6 +227,8 @@ The syntax of external unmount helpers is:
 .BI umount. suffix
 .RI { directory | device }
 .RB [ \-flnrv ]
+.RB [ \-N
+.IR namespace ]
 .RB [ \-t
 .IR type . subtype ]
 .RE