mount.zfs.8: match to reality; zfsprops.8: add missing temporary options

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12111
This commit is contained in:
наб 2021-05-24 20:26:39 +02:00 committed by Brian Behlendorf
parent eae3598ae4
commit 20bd864edc
3 changed files with 37 additions and 77 deletions

View File

@ -185,10 +185,11 @@ main(int argc, char **argv)
break;
case 'h':
case '?':
(void) fprintf(stderr, gettext("Invalid option '%c'\n"),
optopt);
if (optopt)
(void) fprintf(stderr,
gettext("Invalid option '%c'\n"), optopt);
(void) fprintf(stderr, gettext("Usage: mount.zfs "
"[-sfnv] [-o options] <dataset> <mountpoint>\n"));
"[-sfnvh] [-o options] <dataset> <mountpoint>\n"));
return (MOUNT_USAGE);
}
}

View File

@ -1,4 +1,3 @@
'\" t
.\"
.\" CDDL HEADER START
.\"
@ -19,7 +18,6 @@
.\"
.\" CDDL HEADER END
.\"
.\"
.\" Copyright 2013 Darik Horn <dajhorn@vanadac.com>. All rights reserved.
.\"
.Dd May 24, 2021
@ -37,68 +35,49 @@
.Ar mountpoint
.
.Sh DESCRIPTION
The
.Nm
is part of the zfsutils package for Linux. It is a helper program that
is usually invoked by the
helper is used by
.Xr mount 8
to mount filesystem snapshots and
.Sy mountpoint= Ns Ar legacy
ZFS filesystems, as well as by
.Xr zfs 8
when the
.Ev Em $ZFS_MOUNT_HELPER
environment variable is not set.
Users should should invoke either
.Xr mount 8
or
.Xr zfs 8
commands to mount a ZFS dataset.
in most cases.
.Pp
All
.Ar options
are handled according to the FILESYSTEM INDEPENDENT MOUNT OPTIONS
section in the
.Xr mount 8
manual, except for those described below.
are handled according to the
.Em Temporary Mount Point Properties
section in
.Xr zfsprops 8 ,
except for those described below.
.Pp
The
.Ar dataset
parameter is a ZFS filesystem name, as output by the
.Nm zfs Cm load-key Fl h Fl o Ar name
command. This parameter never has a leading slash character and is
not a device name.
.Pp
The
.Ar mountpoint
parameter is the path name of a directory.
If
.Pa /etc/mtab
is a regular file and
.Fl n
was not specified, it will be updated via libmount.
.
.Sh OPTIONS
.Bl -tag -width "-o xa"
.It Fl s
Ignore bad or sloppy mount options.
Ignore unknown (sloppy) mount options.
.It Fl f
Do a fake mount; do not perform the mount operation.
Do everything except actually executing the system call.
.It Fl n
Do not update the /etc/mtab file.
Never update
.Pa /etc/mtab .
.It Fl v
Increase verbosity.
Print resolved mount options and parser state.
.It Fl h
Print the usage message.
.It Fl o Ar context
This flag sets the SELinux context for all files in the filesystem
under that mountpoint.
.It Fl o Ar fscontext
This flag sets the SELinux context for the filesystem being mounted.
.It Fl o Ar defcontext
This flag sets the SELinux context for unlabeled files.
.It Fl o Ar rootcontext
This flag sets the SELinux context for the root inode of the filesystem.
.It Fl o Ar legacy
This private flag indicates that the
.Ar dataset
has an entry in the /etc/fstab file.
.It Fl o Ar noxattr
This private flag disables extended attributes.
.It Fl o Ar xattr
This private flag enables directory-based extended attributes and, if
appropriate, adds a ZFS context to the selinux system policy.
.It Fl o Ar saxattr
This private flag enables system attributed-based extended attributes and, if
appropriate, adds a ZFS context to the selinux system policy.
.It Fl o Ar dirxattr
Equivalent to
.Ar xattr .
.It Fl o Ar zfsutil
This private flag indicates that
.Xr mount 8
@ -107,32 +86,7 @@ is being called by the
command.
.El
.
.Sh NOTES
ZFS conventionally requires that the
.Ar mountpoint
be an empty directory, but the Linux implementation inconsistently
enforces the requirement.
.Pp
The
.Nm
helper does not mount the contents of zvols.
.
.Sh FILES
.Bl -tag -width "/etc/fstab"
.It Pa /etc/fstab
The static filesystem table.
.It Pa /etc/mtab
The mounted filesystem table.
.El
.
.Sh AUTHORS
The primary author of
.Nm
is Brian Behlendorf <behlendorf1@llnl.gov>.
.Pp
This man page was written by Darik Horn <dajhorn@vanadac.com>.
.
.Sh SEE ALSO
.Xr fstab 5 ,
.Xr mount 8 ,
.Xr zfs 8
.Xr zfs-mount 8

View File

@ -1947,6 +1947,11 @@ The correlation between properties and mount options is as follows:
relatime relatime/norelatime
setuid suid/nosuid
xattr xattr/noxattr
nbmand mand/nomand
context context=
fscontext fscontext=
defcontext defcontext=
rootcontext rootcontext=
.Ed
.Pp
In addition, these options can be set on a per-mount basis using the