Lint most manpages

Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12129
This commit is contained in:
наб
2021-05-27 02:46:40 +02:00
committed by Brian Behlendorf
parent 13c9a41140
commit c650ceb64d
58 changed files with 2700 additions and 2686 deletions
+239 -243
View File
@@ -18,7 +18,6 @@
.\"
.\" CDDL HEADER END
.\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@@ -40,17 +39,19 @@
.Dd June 30, 2019
.Dt ZFS 8
.Os
.
.Sh NAME
.Nm zfs
.Nd configures ZFS file systems
.Nd configure ZFS datasets
.Sh SYNOPSIS
.Nm
.Fl ?V
.Nm
.Cm version
.Nm
.Cm <subcommand>
.Op Ar <args>
.Cm subcommand
.Op Ar arguments
.
.Sh DESCRIPTION
The
.Nm
@@ -58,23 +59,18 @@ command configures ZFS datasets within a ZFS storage pool, as described in
.Xr zpool 8 .
A dataset is identified by a unique path within the ZFS namespace.
For example:
.Bd -literal
pool/{filesystem,volume,snapshot}
.Ed
.Dl pool/{filesystem,volume,snapshot}
.Pp
where the maximum length of a dataset name is
.Dv MAXNAMELEN
.Pq 256 bytes
.Sy MAXNAMELEN Pq 256B
and the maximum amount of nesting allowed in a path is 50 levels deep.
.Pp
A dataset can be one of the following:
.Bl -tag -width "file system"
.Bl -tag -offset Ds -width "file system"
.It Sy file system
A ZFS dataset of type
.Sy filesystem
can be mounted within the standard system namespace and behaves like other file
Can be mounted within the standard system namespace and behaves like other file
systems.
While ZFS file systems are designed to be POSIX compliant, known issues exist
While ZFS file systems are designed to be POSIX-compliant, known issues exist
that prevent compliance in some cases.
Applications that depend on standards conformance might fail due to non-standard
behavior when checking file system free space.
@@ -92,38 +88,39 @@ or
Much like a
.Sy snapshot ,
but without the hold on on-disk data.
It can be used as the source of a send (but not for a receive). It is specified as
It can be used as the source of a send (but not for a receive).
It is specified as
.Ar filesystem Ns # Ns Ar name
or
.Ar volume Ns # Ns Ar name .
.El
.Pp
For details see
.Xr zfsconcepts 8 .
See
.Xr zfsconcepts 8
for details.
.
.Ss Properties
Properties are divided into two types, native properties and user-defined
.Po or
.Qq user
.Pc
Properties are divided into two types: native properties and user-defined
.Pq or Qq user
properties.
Native properties either export internal statistics or control ZFS behavior.
In addition, native properties are either editable or read-only.
User properties have no effect on ZFS behavior, but you can use them to annotate
datasets in a way that is meaningful in your environment.
For more information about properties, see the
.Xr zfsprops 8 man page.
For more information about properties, see
.Xr zfsprops 8 .
.
.Ss Encryption
Enabling the
.Sy encryption
feature allows for the creation of encrypted filesystems and volumes.
ZFS will encrypt file and zvol data, file attributes, ACLs, permission bits,
directory listings, FUID mappings, and
.Sy userused
/
.Sy groupused
.Sy userused Ns / Ns Sy groupused Ns / Ns Sy projectused
data.
For an overview of encryption see the
.Xr zfs-load-key 8 command manual.
For an overview of encryption, see
.Xr zfs-load-key 8 .
.
.Sh SUBCOMMANDS
All subcommands that modify state are logged persistently to the pool in their
original form.
@@ -134,9 +131,6 @@ Displays a help message.
.Nm
.Fl V , -version
.Xc
An alias for the
.Nm zfs Cm version
subcommand.
.It Xo
.Nm
.Cm version
@@ -145,6 +139,7 @@ Displays the software version of the
.Nm
userland utility and the zfs kernel module.
.El
.
.Ss Dataset Management
.Bl -tag -width ""
.It Xr zfs-list 8
@@ -158,26 +153,25 @@ Renames the given dataset (filesystem or snapshot).
.It Xr zfs-upgrade 8
Manage upgrading the on-disk version of filesystems.
.El
.
.Ss Snapshots
.Bl -tag -width ""
.It Xr zfs-snapshot 8
Creates snapshots with the given names.
.It Xr zfs-rollback 8
Roll back the given dataset to a previous snapshot.
.It Xo
.Xr zfs-hold 8 /
.Xr zfs-release 8
.Xc
.It Xr zfs-hold 8 Ns / Ns Xr zfs-release 8
Add or remove a hold reference to the specified snapshot or snapshots.
If a hold exists on a snapshot, attempts to destroy that snapshot by using the
.Nm zfs Cm destroy
command return
.Er EBUSY .
.Sy EBUSY .
.It Xr zfs-diff 8
Display the difference between a snapshot of a given filesystem and another
snapshot of that filesystem from a later time or the current contents of the
filesystem.
.El
.
.Ss Clones
.Bl -tag -width ""
.It Xr zfs-clone 8
@@ -187,6 +181,7 @@ Promotes a clone file system to no longer be dependent on its
.Qq origin
snapshot.
.El
.
.Ss Send & Receive
.Bl -tag -width ""
.It Xr zfs-send 8
@@ -211,6 +206,7 @@ This feature can be used to allow clones of a filesystem to be made available on
a remote system, in the case where their parent need not (or needs to not) be
usable.
.El
.
.Ss Properties
.Bl -tag -width ""
.It Xr zfs-get 8
@@ -223,18 +219,16 @@ restored to default if no ancestor has the property set, or with the
.Fl S
option reverted to the received value if one exists.
.El
.
.Ss Quotas
.Bl -tag -width ""
.It Xo
.Xr zfs-userspace 8 /
.Xr zfs-groupspace 8 /
.Xr zfs-projectspace 8
.Xc
.It Xr zfs-userspace 8 Ns / Ns Xr zfs-groupspace 8 Ns / Ns Xr zfs-projectspace 8
Displays space consumed by, and quotas on, each user, group, or project
in the specified filesystem or snapshot.
.It Xr zfs-project 8
List, set, or clear project ID and/or inherit flag on the file(s) or directories.
.El
.
.Ss Mountpoints
.Bl -tag -width ""
.It Xr zfs-mount 8
@@ -245,6 +239,7 @@ property.
.It Xr zfs-unmount 8
Unmounts currently mounted ZFS file systems.
.El
.
.Ss Shares
.Bl -tag -width ""
.It Xr zfs-share 8
@@ -252,6 +247,7 @@ Shares available ZFS file systems.
.It Xr zfs-unshare 8
Unshares currently shared ZFS file systems.
.El
.
.Ss Delegated Administration
.Bl -tag -width ""
.It Xr zfs-allow 8
@@ -259,6 +255,7 @@ Delegate permissions on the specified filesystem or volume.
.It Xr zfs-unallow 8
Remove delegated permissions on the specified filesystem or volume.
.El
.
.Ss Encryption
.Bl -tag -width ""
.It Xr zfs-change-key 8
@@ -268,12 +265,14 @@ Load the key for the specified encrypted dataset, enabling access.
.It Xr zfs-unload-key 8
Unload a key for the specified dataset, removing the ability to access the dataset.
.El
.
.Ss Channel Programs
.Bl -tag -width ""
.It Xr zfs-program 8
Execute ZFS administrative operations
programmatically via a Lua script-language channel program.
.El
.
.Ss Jails
.Bl -tag -width ""
.It Xr zfs-jail 8
@@ -281,100 +280,101 @@ Attaches a filesystem to a jail.
.It Xr zfs-unjail 8
Detaches a filesystem from a jail.
.El
.
.Ss Waiting
.Bl -tag -width ""
.It Xr zfs-wait 8
Wait for background activity in a filesystem to complete.
.El
.
.Sh EXIT STATUS
The
.Nm
utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line
options were specified.
utility exits
.Sy 0
on success,
.Sy 1
if an error occurs, and
.Sy 2
if invalid command line options were specified.
.
.Sh EXAMPLES
.Bl -tag -width ""
.It Sy Example 1 No Creating a ZFS File System Hierarchy
.
.It Sy Example 1 : No Creating a ZFS File System Hierarchy
The following commands create a file system named
.Em pool/home
.Ar pool/home
and a file system named
.Em pool/home/bob .
.Ar pool/home/bob .
The mount point
.Pa /export/home
is set for the parent file system, and is automatically inherited by the child
file system.
.Bd -literal
# zfs create pool/home
# zfs set mountpoint=/export/home pool/home
# zfs create pool/home/bob
.Ed
.It Sy Example 2 No Creating a ZFS Snapshot
.Dl # Nm zfs Cm create Ar pool/home
.Dl # Nm zfs Cm set Sy mountpoint Ns = Ns Ar /export/home pool/home
.Dl # Nm zfs Cm create Ar pool/home/bob
.
.It Sy Example 2 : No Creating a ZFS Snapshot
The following command creates a snapshot named
.Sy yesterday .
.Ar yesterday .
This snapshot is mounted on demand in the
.Pa .zfs/snapshot
directory at the root of the
.Em pool/home/bob
.Ar pool/home/bob
file system.
.Bd -literal
# zfs snapshot pool/home/bob@yesterday
.Ed
.It Sy Example 3 No Creating and Destroying Multiple Snapshots
.Dl # Nm zfs Cm snapshot Ar pool/home/bob Ns @ Ns Ar yesterday
.
.It Sy Example 3 : No Creating and Destroying Multiple Snapshots
The following command creates snapshots named
.Sy yesterday
of
.Em pool/home
.Ar yesterday No of Ar pool/home
and all of its descendent file systems.
Each snapshot is mounted on demand in the
.Pa .zfs/snapshot
directory at the root of its file system.
The second command destroys the newly created snapshots.
.Bd -literal
# zfs snapshot -r pool/home@yesterday
# zfs destroy -r pool/home@yesterday
.Ed
.It Sy Example 4 No Disabling and Enabling File System Compression
.Dl # Nm zfs Cm snapshot Fl r Ar pool/home Ns @ Ns Ar yesterday
.Dl # Nm zfs Cm destroy Fl r Ar pool/home Ns @ Ns Ar yesterday
.
.It Sy Example 4 : No Disabling and Enabling File System Compression
The following command disables the
.Sy compression
property for all file systems under
.Em pool/home .
.Ar pool/home .
The next command explicitly enables
.Sy compression
for
.Em pool/home/anne .
.Bd -literal
# zfs set compression=off pool/home
# zfs set compression=on pool/home/anne
.Ed
.It Sy Example 5 No Listing ZFS Datasets
.Ar pool/home/anne .
.Dl # Nm zfs Cm set Sy compression Ns = Ns Sy off Ar pool/home
.Dl # Nm zfs Cm set Sy compression Ns = Ns Sy on Ar pool/home/anne
.
.It Sy Example 5 : No Listing ZFS Datasets
The following command lists all active file systems and volumes in the system.
Snapshots are displayed if the
.Sy listsnaps
property is
.Sy on .
Snapshots are displayed if
.Sy listsnaps Ns = Ns Sy on .
The default is
.Sy off .
See
.Xr zpool 8
.Xr zpoolprops 8
for more information on pool properties.
.Bd -literal
# zfs list
.Bd -literal -compact -offset Ds
.No # Nm zfs Cm list
NAME USED AVAIL REFER MOUNTPOINT
pool 450K 457G 18K /pool
pool/home 315K 457G 21K /export/home
pool/home/anne 18K 457G 18K /export/home/anne
pool/home/bob 276K 457G 276K /export/home/bob
.Ed
.It Sy Example 6 No Setting a Quota on a ZFS File System
.
.It Sy Example 6 : No Setting a Quota on a ZFS File System
The following command sets a quota of 50 Gbytes for
.Em pool/home/bob .
.Bd -literal
# zfs set quota=50G pool/home/bob
.Ed
.It Sy Example 7 No Listing ZFS Properties
.Ar pool/home/bob :
.Dl # Nm zfs Cm set Sy quota Ns = Ns Ar 50G pool/home/bob
.
.It Sy Example 7 : No Listing ZFS Properties
The following command lists all properties for
.Em pool/home/bob .
.Bd -literal
# zfs get all pool/home/bob
.Ar pool/home/bob :
.Bd -literal -compact -offset Ds
.No # Nm zfs Cm get Sy all Ar pool/home/bob
NAME PROPERTY VALUE SOURCE
pool/home/bob type filesystem -
pool/home/bob creation Tue Jul 21 15:53 2009 -
@@ -420,63 +420,61 @@ pool/home/bob usedbychildren 0 -
pool/home/bob usedbyrefreservation 0 -
.Ed
.Pp
The following command gets a single property value.
.Bd -literal
# zfs get -H -o value compression pool/home/bob
The following command gets a single property value:
.Bd -literal -compact -offset Ds
.No # Nm zfs Cm get Fl H o Sy value compression Ar pool/home/bob
on
.Ed
.Pp
The following command lists all properties with local settings for
.Em pool/home/bob .
.Bd -literal
# zfs get -r -s local -o name,property,value all pool/home/bob
.Ar pool/home/bob :
.Bd -literal -compact -offset Ds
.No # Nm zfs Cm get Fl r s Sy local Fl o Sy name , Ns Sy property , Ns Sy value all Ar pool/home/bob
NAME PROPERTY VALUE
pool/home/bob quota 20G
pool/home/bob compression on
.Ed
.It Sy Example 8 No Rolling Back a ZFS File System
.
.It Sy Example 8 : No Rolling Back a ZFS File System
The following command reverts the contents of
.Em pool/home/anne
.Ar pool/home/anne
to the snapshot named
.Sy yesterday ,
deleting all intermediate snapshots.
.Bd -literal
# zfs rollback -r pool/home/anne@yesterday
.Ed
.It Sy Example 9 No Creating a ZFS Clone
.Ar yesterday ,
deleting all intermediate snapshots:
.Dl # Nm zfs Cm rollback Fl r Ar pool/home/anne Ns @ Ns Ar yesterday
.
.It Sy Example 9 : No Creating a ZFS Clone
The following command creates a writable file system whose initial contents are
the same as
.Em pool/home/bob@yesterday .
.Bd -literal
# zfs clone pool/home/bob@yesterday pool/clone
.Ed
.It Sy Example 10 No Promoting a ZFS Clone
.Ar pool/home/bob@yesterday .
.Dl # Nm zfs Cm clone Ar pool/home/bob@yesterday pool/clone
.
.It Sy Example 10 : No Promoting a ZFS Clone
The following commands illustrate how to test out changes to a file system, and
then replace the original file system with the changed one, using clones, clone
promotion, and renaming:
.Bd -literal
# zfs create pool/project/production
.Bd -literal -compact -offset Ds
.No # Nm zfs Cm create Ar pool/project/production
populate /pool/project/production with data
# zfs snapshot pool/project/production@today
# zfs clone pool/project/production@today pool/project/beta
.No # Nm zfs Cm snapshot Ar pool/project/production Ns @ Ns Ar today
.No # Nm zfs Cm clone Ar pool/project/production@today pool/project/beta
make changes to /pool/project/beta and test them
# zfs promote pool/project/beta
# zfs rename pool/project/production pool/project/legacy
# zfs rename pool/project/beta pool/project/production
.No # Nm zfs Cm promote Ar pool/project/beta
.No # Nm zfs Cm rename Ar pool/project/production pool/project/legacy
.No # Nm zfs Cm rename Ar pool/project/beta pool/project/production
once the legacy version is no longer needed, it can be destroyed
# zfs destroy pool/project/legacy
.No # Nm zfs Cm destroy Ar pool/project/legacy
.Ed
.It Sy Example 11 No Inheriting ZFS Properties
.
.It Sy Example 11 : No Inheriting ZFS Properties
The following command causes
.Em pool/home/bob
and
.Em pool/home/anne
.Ar pool/home/bob No and Ar pool/home/anne
to inherit the
.Sy checksum
property from their parent.
.Bd -literal
# zfs inherit checksum pool/home/bob pool/home/anne
.Ed
.It Sy Example 12 No Remotely Replicating ZFS Data
.Dl # Nm zfs Cm inherit Sy checksum Ar pool/home/bob pool/home/anne
.
.It Sy Example 12 : No Remotely Replicating ZFS Data
The following commands send a full stream and then an incremental stream to a
remote machine, restoring them into
.Em poolB/received/fs@a
@@ -488,147 +486,145 @@ must contain the file system
.Em poolB/received ,
and must not initially contain
.Em poolB/received/fs .
.Bd -literal
# zfs send pool/fs@a | \e
ssh host zfs receive poolB/received/fs@a
# zfs send -i a pool/fs@b | \e
ssh host zfs receive poolB/received/fs
.Bd -literal -compact -offset Ds
.No # Nm zfs Cm send Ar pool/fs@a |
.No " " Nm ssh Ar host Nm zfs Cm receive Ar poolB/received/fs Ns @ Ns Ar a
.No # Nm zfs Cm send Fl i Ar a pool/fs@b |
.No " " Nm ssh Ar host Nm zfs Cm receive Ar poolB/received/fs
.Ed
.It Sy Example 13 No Using the Nm zfs Cm receive Fl d No Option
.
.It Sy Example 13 : No Using the Nm zfs Cm receive Fl d No Option
The following command sends a full stream of
.Em poolA/fsA/fsB@snap
.Ar poolA/fsA/fsB@snap
to a remote machine, receiving it into
.Em poolB/received/fsA/fsB@snap .
.Ar poolB/received/fsA/fsB@snap .
The
.Em fsA/fsB@snap
.Ar fsA/fsB@snap
portion of the received snapshot's name is determined from the name of the sent
snapshot.
.Em poolB
.Ar poolB
must contain the file system
.Em poolB/received .
.Ar poolB/received .
If
.Em poolB/received/fsA
.Ar poolB/received/fsA
does not exist, it is created as an empty file system.
.Bd -literal
# zfs send poolA/fsA/fsB@snap | \e
ssh host zfs receive -d poolB/received
.Bd -literal -compact -offset Ds
.No # Nm zfs Cm send Ar poolA/fsA/fsB@snap |
.No " " Nm ssh Ar host Nm zfs Cm receive Fl d Ar poolB/received
.Ed
.It Sy Example 14 No Setting User Properties
.
.It Sy Example 14 : No Setting User Properties
The following example sets the user-defined
.Sy com.example:department
property for a dataset.
.Bd -literal
# zfs set com.example:department=12345 tank/accounting
.Ed
.It Sy Example 15 No Performing a Rolling Snapshot
.Ar com.example : Ns Ar department
property for a dataset:
.Dl # Nm zfs Cm set Ar com.example : Ns Ar department Ns = Ns Ar 12345 tank/accounting
.
.It Sy Example 15 : No Performing a Rolling Snapshot
The following example shows how to maintain a history of snapshots with a
consistent naming scheme.
To keep a week's worth of snapshots, the user destroys the oldest snapshot,
renames the remaining snapshots, and then creates a new snapshot, as follows:
.Bd -literal
# zfs destroy -r pool/users@7daysago
# zfs rename -r pool/users@6daysago @7daysago
# zfs rename -r pool/users@5daysago @6daysago
# zfs rename -r pool/users@4daysago @5daysago
# zfs rename -r pool/users@3daysago @4daysago
# zfs rename -r pool/users@2daysago @3daysago
# zfs rename -r pool/users@yesterday @2daysago
# zfs rename -r pool/users@today @yesterday
# zfs snapshot -r pool/users@today
.Bd -literal -compact -offset Ds
.No # Nm zfs Cm destroy Fl r Ar pool/users@7daysago
.No # Nm zfs Cm rename Fl r Ar pool/users@6daysago No @ Ns Ar 7daysago
.No # Nm zfs Cm rename Fl r Ar pool/users@5daysago No @ Ns Ar 6daysago
.No # Nm zfs Cm rename Fl r Ar pool/users@4daysago No @ Ns Ar 5daysago
.No # Nm zfs Cm rename Fl r Ar pool/users@3daysago No @ Ns Ar 4daysago
.No # Nm zfs Cm rename Fl r Ar pool/users@2daysago No @ Ns Ar 3daysago
.No # Nm zfs Cm rename Fl r Ar pool/users@yesterday No @ Ns Ar 2daysago
.No # Nm zfs Cm rename Fl r Ar pool/users@today No @ Ns Ar yesterday
.No # Nm zfs Cm snapshot Fl r Ar pool/users Ns @ Ns Ar today
.Ed
.It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
.
.It Sy Example 16 : No Setting sharenfs Property Options on a ZFS File System
The following commands show how to set
.Sy sharenfs
property options to enable
.Sy rw
access for a set of
.Sy IP
addresses and to enable root access for system
.Sy neo
property options to enable read-write
access for a set of IP addresses and to enable root access for system
.Qq neo
on the
.Em tank/home
file system.
.Bd -literal
# zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
.Ed
.Ar tank/home
file system:
.Dl # Nm zfs Cm set Sy sharenfs Ns = Ns ' Ns Ar rw Ns =@123.123.0.0/16,root= Ns Ar neo Ns ' tank/home
.Pp
If you are using
.Sy DNS
for host name resolution, specify the fully qualified hostname.
.It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset
If you are using DNS for host name resolution,
specify the fully-qualified hostname.
.
.It Sy Example 17 : No Delegating ZFS Administration Permissions on a ZFS Dataset
The following example shows how to set permissions so that user
.Sy cindys
.Ar cindys
can create, destroy, mount, and take snapshots on
.Em tank/cindys .
.Ar tank/cindys .
The permissions on
.Em tank/cindys
.Ar tank/cindys
are also displayed.
.Bd -literal
# zfs allow cindys create,destroy,mount,snapshot tank/cindys
# zfs allow tank/cindys
.Bd -literal -compact -offset Ds
.No # Nm zfs Cm allow Sy cindys create , Ns Sy destroy , Ns Sy mount , Ns Sy snapshot Ar tank/cindys
.No # Nm zfs Cm allow Ar tank/cindys
---- Permissions on tank/cindys --------------------------------------
Local+Descendent permissions:
user cindys create,destroy,mount,snapshot
.Ed
.Pp
Because the
.Em tank/cindys
.Ar tank/cindys
mount point permission is set to 755 by default, user
.Sy cindys
.Ar cindys
will be unable to mount file systems under
.Em tank/cindys .
.Ar tank/cindys .
Add an ACE similar to the following syntax to provide mount point access:
.Bd -literal
# chmod A+user:cindys:add_subdirectory:allow /tank/cindys
.Ed
.It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset
.Dl # Cm chmod No A+user: Ns Ar cindys Ns :add_subdirectory:allow Ar /tank/cindys
.
.It Sy Example 18 : No Delegating Create Time Permissions on a ZFS Dataset
The following example shows how to grant anyone in the group
.Sy staff
.Ar staff
to create file systems in
.Em tank/users .
.Ar tank/users .
This syntax also allows staff members to destroy their own file systems, but not
destroy anyone else's file system.
The permissions on
.Em tank/users
.Ar tank/users
are also displayed.
.Bd -literal
# zfs allow staff create,mount tank/users
# zfs allow -c destroy tank/users
# zfs allow tank/users
.Bd -literal -compact -offset Ds
.No # Nm zfs Cm allow Ar staff Sy create , Ns Sy mount Ar tank/users
.No # Nm zfs Cm allow Fl c Sy destroy Ar tank/users
.No # Nm zfs Cm allow Ar tank/users
---- Permissions on tank/users ---------------------------------------
Permission sets:
destroy
Local+Descendent permissions:
group staff create,mount
.Ed
.It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset
.
.It Sy Example 19 : No Defining and Granting a Permission Set on a ZFS Dataset
The following example shows how to define and grant a permission set on the
.Em tank/users
.Ar tank/users
file system.
The permissions on
.Em tank/users
.Ar tank/users
are also displayed.
.Bd -literal
# zfs allow -s @pset create,destroy,snapshot,mount tank/users
# zfs allow staff @pset tank/users
# zfs allow tank/users
.Bd -literal -compact -offset Ds
.No # Nm zfs Cm allow Fl s No @ Ns Ar pset Sy create , Ns Sy destroy , Ns Sy snapshot , Ns Sy mount Ar tank/users
.No # Nm zfs Cm allow staff No @ Ns Ar pset tank/users
.No # Nm zfs Cm allow Ar tank/users
---- Permissions on tank/users ---------------------------------------
Permission sets:
@pset create,destroy,mount,snapshot
Local+Descendent permissions:
group staff @pset
.Ed
.It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset
.
.It Sy Example 20 : No Delegating Property Permissions on a ZFS Dataset
The following example shows to grant the ability to set quotas and reservations
on the
.Em users/home
.Ar users/home
file system.
The permissions on
.Em users/home
.Ar users/home
are also displayed.
.Bd -literal
# zfs allow cindys quota,reservation users/home
# zfs allow users/home
.Bd -literal -compact -offset Ds
.No # Nm zfs Cm allow Ar cindys Sy quota , Ns Sy reservation Ar users/home
.No # Nm zfs Cm allow Ar users/home
---- Permissions on users/home ---------------------------------------
Local+Descendent permissions:
user cindys quota,reservation
@@ -637,32 +633,34 @@ cindys% zfs get quota users/home/marks
NAME PROPERTY VALUE SOURCE
users/home/marks quota 10G local
.Ed
.It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset
.
.It Sy Example 21 : No Removing ZFS Delegated Permissions on a ZFS Dataset
The following example shows how to remove the snapshot permission from the
.Sy staff
.Ar staff
group on the
.Em tank/users
.Sy tank/users
file system.
The permissions on
.Em tank/users
.Sy tank/users
are also displayed.
.Bd -literal
# zfs unallow staff snapshot tank/users
# zfs allow tank/users
.Bd -literal -compact -offset Ds
.No # Nm zfs Cm unallow Ar staff Sy snapshot Ar tank/users
.No # Nm zfs Cm allow Ar tank/users
---- Permissions on tank/users ---------------------------------------
Permission sets:
@pset create,destroy,mount,snapshot
Local+Descendent permissions:
group staff @pset
.Ed
.It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset
.
.It Sy Example 22 : No Showing the differences between a snapshot and a ZFS Dataset
The following example shows how to see what has changed between a prior
snapshot of a ZFS dataset and its current state.
The
.Fl F
option is used to indicate type information for the files affected.
.Bd -literal
# zfs diff -F tank/test@before tank/test
.Bd -literal -compact -offset Ds
.No # Nm zfs Cm diff Fl F Ar tank/test@before tank/test
M / /tank/test/
M F /tank/test/linked (+1)
R F /tank/test/oldname -> /tank/test/newname
@@ -670,57 +668,55 @@ R F /tank/test/oldname -> /tank/test/newname
+ F /tank/test/created
M F /tank/test/modified
.Ed
.It Sy Example 23 No Creating a bookmark
.
.It Sy Example 23 : No Creating a bookmark
The following example create a bookmark to a snapshot.
This bookmark can then be used instead of snapshot in send streams.
.Bd -literal
# zfs bookmark rpool@snapshot rpool#bookmark
.Ed
.It Sy Example 24 No Setting sharesmb Property Options on a ZFS File System
.Dl # Nm zfs Cm bookmark Ar rpool Ns @ Ns Ar snapshot rpool Ns # Ns Ar bookmark
.
.It Sy Example 24 : No Setting Sy sharesmb No Property Options on a ZFS File System
The following example show how to share SMB filesystem through ZFS.
Note that a user and his/her password must be given.
.Bd -literal
# smbmount //127.0.0.1/share_tmp /mnt/tmp \\
-o user=workgroup/turbo,password=obrut,uid=1000
.Ed
Note that a user and their password must be given.
.Dl # Nm smbmount Ar //127.0.0.1/share_tmp /mnt/tmp Fl o No user=workgroup/turbo,password=obrut,uid=1000
.Pp
Minimal
.Em /etc/samba/smb.conf
configuration required:
.Pa /etc/samba/smb.conf
configuration is required, as follows.
.Pp
Samba will need to listen to 'localhost' (127.0.0.1) for the ZFS utilities to
Samba will need to bind to the loopback interface for the ZFS utilities to
communicate with Samba.
This is the default behavior for most Linux distributions.
.Pp
Samba must be able to authenticate a user.
This can be done in a number of ways, depending on if using the system password file, LDAP or the Samba
specific smbpasswd file.
How to do this is outside the scope of this manual.
Please refer to the
This can be done in a number of ways
.Pq Xr passwd 5 , LDAP , Xr smbpasswd 5 , &c.\& .
How to do this is outside the scope of this document refer to
.Xr smb.conf 5
man page for more information.
for more information.
.Pp
See the
.Sy USERSHARE section
of the
.Xr smb.conf 5
man page for all configuration options in case you need to modify any options
to the share afterwards.
.Sx USERSHARES
section for all configuration options,
in case you need to modify any options of the share afterwards.
Do note that any changes done with the
.Xr net 8
command will be undone if the share is ever unshared (such as at a reboot etc).
command will be undone if the share is ever unshared (like via a reboot).
.El
.
.Sh ENVIRONMENT VARIABLES
.Bl -tag -width "ZFS_MOUNT_HELPER"
.It Ev ZFS_MOUNT_HELPER
.It Sy ZFS_MOUNT_HELPER
Cause
.Nm zfs mount
.Nm zfs Cm mount
to use
.Em /bin/mount
to mount zfs datasets. This option is provided for backwards compatibility with older zfs versions.
.Xr mount 8
to mount ZFS datasets.
This option is provided for backwards compatibility with older ZFS versions.
.El
.
.Sh INTERFACE STABILITY
.Sy Committed .
.
.Sh SEE ALSO
.Xr attr 1 ,
.Xr gzip 1 ,