aboutsummaryrefslogtreecommitdiffstats
path: root/man/man8/zfs.8
diff options
context:
space:
mode:
authorнаб <[email protected]>2022-03-16 17:46:32 +0100
committerBrian Behlendorf <[email protected]>2022-03-28 10:13:13 -0700
commita2550c9df9a9b1346f61fb1652c1c716fc492d44 (patch)
tree327306ea670ff12fc47643d72ca55e3dccbd1c22 /man/man8/zfs.8
parent1ebe4c482dbfecd0f4005f079d9557cb59f50f7b (diff)
man: Examples: use subsections instead of lists
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13228
Diffstat (limited to 'man/man8/zfs.8')
-rw-r--r--man/man8/zfs.853
1 files changed, 25 insertions, 28 deletions
diff --git a/man/man8/zfs.8 b/man/man8/zfs.8
index 48453ef46..eb762fb40 100644
--- a/man/man8/zfs.8
+++ b/man/man8/zfs.8
@@ -36,7 +36,7 @@
.\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright 2019 Joyent, Inc.
.\"
-.Dd June 30, 2019
+.Dd March 16, 2022
.Dt ZFS 8
.Os
.
@@ -299,9 +299,7 @@ if an error occurs, and
if invalid command line options were specified.
.
.Sh EXAMPLES
-.Bl -tag -width ""
-.
-.It Sy Example 1 : No Creating a ZFS File System Hierarchy
+.Ss Example 1 : No Creating a ZFS File System Hierarchy
The following commands create a file system named
.Ar pool/home
and a file system named
@@ -314,7 +312,7 @@ file system.
.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
+.Ss Example 2 : No Creating a ZFS Snapshot
The following command creates a snapshot named
.Ar yesterday .
This snapshot is mounted on demand in the
@@ -324,7 +322,7 @@ directory at the root of the
file system.
.Dl # Nm zfs Cm snapshot Ar pool/home/bob Ns @ Ns Ar yesterday
.
-.It Sy Example 3 : No Creating and Destroying Multiple Snapshots
+.Ss Example 3 : No Creating and Destroying Multiple Snapshots
The following command creates snapshots named
.Ar yesterday No of Ar pool/home
and all of its descendent file systems.
@@ -335,7 +333,7 @@ The second command destroys the newly created snapshots.
.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
+.Ss Example 4 : No Disabling and Enabling File System Compression
The following command disables the
.Sy compression
property for all file systems under
@@ -347,7 +345,7 @@ for
.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
+.Ss Example 5 : No Listing ZFS Datasets
The following command lists all active file systems and volumes in the system.
Snapshots are displayed if
.Sy listsnaps Ns = Ns Sy on .
@@ -365,12 +363,12 @@ 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
+.Ss Example 6 : No Setting a Quota on a ZFS File System
The following command sets a quota of 50 Gbytes for
.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
+.Ss Example 7 : No Listing ZFS Properties
The following command lists all properties for
.Ar pool/home/bob :
.Bd -literal -compact -offset Ds
@@ -435,7 +433,7 @@ pool/home/bob quota 20G
pool/home/bob compression on
.Ed
.
-.It Sy Example 8 : No Rolling Back a ZFS File System
+.Ss Example 8 : No Rolling Back a ZFS File System
The following command reverts the contents of
.Ar pool/home/anne
to the snapshot named
@@ -443,13 +441,13 @@ to the snapshot named
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
+.Ss Example 9 : No Creating a ZFS Clone
The following command creates a writable file system whose initial contents are
the same as
.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
+.Ss 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:
@@ -466,7 +464,7 @@ promotion, and renaming:
.No # Nm zfs Cm destroy Ar pool/project/legacy
.Ed
.
-.It Sy Example 11 : No Inheriting ZFS Properties
+.Ss Example 11 : No Inheriting ZFS Properties
The following command causes
.Ar pool/home/bob No and Ar pool/home/anne
to inherit the
@@ -474,7 +472,7 @@ to inherit the
property from their parent.
.Dl # Nm zfs Cm inherit Sy checksum Ar pool/home/bob pool/home/anne
.
-.It Sy Example 12 : No Remotely Replicating ZFS Data
+.Ss 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
@@ -493,7 +491,7 @@ and must not initially contain
.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
+.Ss Example 13 : No Using the Nm zfs Cm receive Fl d No Option
The following command sends a full stream of
.Ar poolA/fsA/fsB@snap
to a remote machine, receiving it into
@@ -513,13 +511,13 @@ does not exist, it is created as an empty file system.
.No " " Nm ssh Ar host Nm zfs Cm receive Fl d Ar poolB/received
.Ed
.
-.It Sy Example 14 : No Setting User Properties
+.Ss Example 14 : No Setting User Properties
The following example sets the user-defined
.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
+.Ss 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,
@@ -536,7 +534,7 @@ renames the remaining snapshots, and then creates a new snapshot, as follows:
.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
+.Ss 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 read-write
@@ -550,7 +548,7 @@ file system:
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
+.Ss Example 17 : No Delegating ZFS Administration Permissions on a ZFS Dataset
The following example shows how to set permissions so that user
.Ar cindys
can create, destroy, mount, and take snapshots on
@@ -575,7 +573,7 @@ will be unable to mount file systems under
Add an ACE similar to the following syntax to provide mount point access:
.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
+.Ss Example 18 : No Delegating Create Time Permissions on a ZFS Dataset
The following example shows how to grant anyone in the group
.Ar staff
to create file systems in
@@ -596,7 +594,7 @@ Local+Descendent permissions:
group staff create,mount
.Ed
.
-.It Sy Example 19 : No Defining and Granting a Permission Set on a ZFS Dataset
+.Ss 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
.Ar tank/users
file system.
@@ -614,7 +612,7 @@ Local+Descendent permissions:
group staff @pset
.Ed
.
-.It Sy Example 20 : No Delegating Property Permissions on a ZFS Dataset
+.Ss 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
.Ar users/home
@@ -634,7 +632,7 @@ NAME PROPERTY VALUE SOURCE
users/home/marks quota 10G local
.Ed
.
-.It Sy Example 21 : No Removing ZFS Delegated Permissions on a ZFS Dataset
+.Ss Example 21 : No Removing ZFS Delegated Permissions on a ZFS Dataset
The following example shows how to remove the snapshot permission from the
.Ar staff
group on the
@@ -653,7 +651,7 @@ Local+Descendent permissions:
group staff @pset
.Ed
.
-.It Sy Example 22 : No Showing the differences between a snapshot and a ZFS Dataset
+.Ss 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
@@ -669,12 +667,12 @@ R F /tank/test/oldname -> /tank/test/newname
M F /tank/test/modified
.Ed
.
-.It Sy Example 23 : No Creating a bookmark
+.Ss 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.
.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
+.Ss 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 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
@@ -701,7 +699,6 @@ 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 (like via a reboot).
-.El
.
.Sh ENVIRONMENT VARIABLES
.Bl -tag -width "ZFS_MOUNT_HELPER"