From 7a4711094b9eb982b97c615a9d9689b249979cfc Mon Sep 17 00:00:00 2001 From: Bjoern Heidotting Date: Mon, 28 Aug 2017 17:37:10 +0000 Subject: [PATCH] - Add missing quote in 'zfs set sharenfs' command - Use root prompt in various places to reflect reality - Add missing tags - Remove a useless 'zfs list' command - Use sysrc instead of echo command Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D12127 --- .../books/handbook/zfs/chapter.xml | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/en_US.ISO8859-1/books/handbook/zfs/chapter.xml b/en_US.ISO8859-1/books/handbook/zfs/chapter.xml index 5b6ab9e85e..d3e78775d3 100644 --- a/en_US.ISO8859-1/books/handbook/zfs/chapter.xml +++ b/en_US.ISO8859-1/books/handbook/zfs/chapter.xml @@ -1911,7 +1911,7 @@ tank custom:costcenter - - . To set additional options to a dataset shared through NFS, enter: - &prompt.root; zfs set sharenfs="-alldirs,-maproot=root,-network=192.168.1.0/24 mypool/usr/home + &prompt.root; zfs set sharenfs="-alldirs,-maproot=root,-network=192.168.1.0/24" mypool/usr/home @@ -2178,12 +2178,11 @@ mypool/var/tmp 262K 93.2G 120K /var/tmp mypool/var/tmp@my_recursive_snapshot 88K - 152K - mypool/var/tmp@after_cp 53.5K - 118K - mypool/var/tmp@diff_snapshot 0 - 120K - -&prompt.user; ls /var/tmp -passwd passwd.copy -&prompt.user; rm /var/tmp/passwd* -&prompt.user; ls /var/tmp -vi.recover -&prompt.user; +&prompt.root; ls /var/tmp +passwd passwd.copy vi.recover +&prompt.root; rm /var/tmp/passwd* +&prompt.root; ls /var/tmp +vi.recover At this point, the user realized that too many files were deleted and wants them back. ZFS @@ -2193,7 +2192,7 @@ vi.recover the last snapshot, issue the command: &prompt.root; zfs rollback mypool/var/tmp@diff_snapshot -&prompt.user; ls /var/tmp +&prompt.root; ls /var/tmp passwd passwd.copy vi.recover The rollback operation restored the dataset to the state @@ -2229,7 +2228,7 @@ mypool/var/tmp@diff_snapshot &prompt.root; zfs list -rt snapshot mypool/var/tmp NAME USED AVAIL REFER MOUNTPOINT mypool/var/tmp@my_recursive_snapshot 8K - 152K - -&prompt.user; ls /var/tmp +&prompt.root; ls /var/tmp vi.recover The output from zfs list -t snapshot @@ -2257,10 +2256,10 @@ vi.recover &prompt.root; zfs get snapdir mypool/var/tmp NAME PROPERTY VALUE SOURCE mypool/var/tmp snapdir hidden default -&prompt.user; ls -a /var/tmp +&prompt.root; ls -a /var/tmp . .. passwd vi.recover &prompt.root; zfs set snapdir=visible mypool/var/tmp -&prompt.user; ls -a /var/tmp +&prompt.root; ls -a /var/tmp . .. .zfs passwd vi.recover Individual files can easily be restored to a previous @@ -2275,7 +2274,7 @@ mypool/var/tmp snapdir hidden default file: &prompt.root; rm /var/tmp/passwd -&prompt.user; ls -a /var/tmp +&prompt.root; ls -a /var/tmp . .. .zfs vi.recover &prompt.root; ls /var/tmp/.zfs/snapshot after_cp my_recursive_snapshot @@ -2640,7 +2639,7 @@ mypool@replica2 0 - 55.0M - On the sending system: - &prompt.root; zfs allow -u someuser send,snapshot mypool + &prompt.root; zfs allow -u someuser send,snapshot mypool @@ -2648,12 +2647,12 @@ mypool@replica2 0 - 55.0M - the directory, and regular users must be allowed to mount file systems. On the receiving system: - &prompt.root; sysctl vfs.usermount=1 + &prompt.root; sysctl vfs.usermount=1 vfs.usermount: 0 -> 1 -&prompt.root; echo vfs.usermount=1 >> /etc/sysctl.conf +&prompt.root; sysrc -f /etc/sysctl.conf vfs.usermount=1 &prompt.root; zfs create recvpool/backup &prompt.root; zfs allow -u someuser create,mount,receive recvpool/backup -&prompt.root; chown someuser /recvpool/backup +&prompt.root; chown someuser /recvpool/backup @@ -2941,10 +2940,9 @@ pool 2.84G 2.19M 2.83G 0% 1.00x ONLINE - copied three times into different directories on the deduplicated pool created above. - &prompt.root; zpool list -for d in dir1 dir2 dir3; do -for> mkdir $d && cp -R /usr/ports $d & -for> done + &prompt.root; for d in dir1 dir2 dir3; do +> mkdir $d && cp -R /usr/ports $d & +> done Redundant data is detected and deduplicated: