From d842ca3ff274581682678bd8bd6dc3f709c2b460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Wed, 16 Mar 2022 18:49:31 +0100 Subject: [PATCH] man: zfs-create.8: import examples from zfs.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #13228 --- man/man8/zfs-create.8 | 35 ++++++++++++++++++++++++++++++++++- man/man8/zfs.8 | 1 + 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/man/man8/zfs-create.8 b/man/man8/zfs-create.8 index 55397fa661..f302493e0a 100644 --- a/man/man8/zfs-create.8 +++ b/man/man8/zfs-create.8 @@ -29,7 +29,7 @@ .\" Copyright 2018 Nexenta Systems, Inc. .\" Copyright 2019 Joyent, Inc. .\" -.Dd December 1, 2020 +.Dd March 16, 2022 .Dt ZFS-CREATE 8 .Os . @@ -243,6 +243,39 @@ enable the swap area using the command. Swapping to files on ZFS filesystems is not supported. . +.Sh EXAMPLES +.\" These are, respectively, examples 1, 10 from zfs.8 +.\" Make sure to update them bidirectionally +.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 +.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. +.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 +. +.Ss Example 2 : 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 -compact -offset Ds +.No # Nm zfs Cm create Ar pool/project/production + populate /pool/project/production with data +.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 +.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 +.No # Nm zfs Cm destroy Ar pool/project/legacy +.Ed +. .Sh SEE ALSO .Xr zfs-destroy 8 , .Xr zfs-list 8 , diff --git a/man/man8/zfs.8 b/man/man8/zfs.8 index 570899121e..9850215d97 100644 --- a/man/man8/zfs.8 +++ b/man/man8/zfs.8 @@ -300,6 +300,7 @@ if invalid command line options were specified. . .Sh EXAMPLES .\" Examples 1, 4, 6, 7, 11, 14, 16 are shared with zfs-set.8. +.\" Examples 1, 10 are shared with zfs-create.8. .\" Examples 3, 10, 15 are shared with zfs-destroy.8. .\" Examples 5 are shared with zfs-list.8. .\" Examples 8 are shared with zfs-rollback.8.