$ zfs set quota=10G tank/home/sueb $ zfs get quota tank/home/sueb NAME PROPERTY VALUE SOURCE tank/home/sueb quota 10G local
$ zfs list -r tank/home NAME USED AVAIL REFER MOUNTPOINT tank/home 1.45M 66.9G 36K /tank/home tank/home/glori 547K 66.9G 547K /tank/home/glori tank/home/sueb 322K 10.0G 291K /tank/home/sueb tank/home/sueb/ws 31K 10.0G 31K /tank/home/sueb/ws tank/home/mork 31K 66.9G 31K /tank/home/mork $ df -h /tank/home/sueb Filesystem Size Used Avail Use% Mounted on tank/home/sueb 10G 306K 10G 1% /tank/home/sueb
$ zfs set refquota=10g students/studentA $ zfs list -t all -r students NAME USED AVAIL REFER MOUNTPOINT students 150M 66.8G 32K /students students/studentA 150M 9.85G 150M /students/studentA students/studentA@yesterday 0 - 150M - $ zfs snapshot students/studentA@today $ zfs list -t all -r students students 150M 66.8G 32K /students students/studentA 150M 9.90G 100M /students/studentA students/studentA@yesterday 50.0M - 150M - students/studentA@today 0 - 100M -
$ zfs set quota=20g students/studentA $ zfs list -t all -r students NAME USED AVAIL REFER MOUNTPOINT students 150M 66.8G 32K /students students/studentA 150M 9.90G 100M /students/studentA students/studentA@yesterday 50.0M - 150M - students/studentA@today 0 - 100M -
$ zfs get refquota,quota students/studentA NAME PROPERTY VALUE SOURCE students/studentA refquota 10G local students/studentA quota 20G local
$ zfs create students/compsci $ zfs set userquota@student1=10G students/compsci $ zfs create students/labstaff $ zfs set groupquota@labstaff=20GB students/labstaff
$ zfs get userquota@student1 students/compsci NAME PROPERTY VALUE SOURCE students/compsci userquota@student1 10G local $ zfs get groupquota@labstaff students/labstaff NAME PROPERTY VALUE SOURCE students/labstaff groupquota@labstaff 20G local
$ zfs userspace students/compsci TYPE NAME USED QUOTA POSIX User root 350M none POSIX User student1 426M 10G $ zfs groupspace students/labstaff TYPE NAME USED QUOTA POSIX Group labstaff 250M 20G POSIX Group root 350M none
$ zfs get userused@student1 students/compsci NAME PROPERTY VALUE SOURCE students/compsci userused@student1 550M local $ zfs get groupused@labstaff students/labstaff NAME PROPERTY VALUE SOURCE students/labstaff groupused@labstaff 250 local
$ zfs set userquota@student1=none students/compsci $ zfs set groupquota@labstaff=none students/labstaff
$ zfs set userquota@student1=10m students/compsci $ zfs userspace students/compsci TYPE NAME USED QUOTA POSIX User root 350M none POSIX User student1 550M 10M $ quota student1 Block limit reached on /students/compsci
$ zfs set userquota@student1=10GB students/compsci $ zfs userspace students/compsci TYPE NAME USED QUOTA POSIX User root 350M none POSIX User student1 550M 10G $ quota student1 $ quota -v student1 Disk quotas for student1 (uid 102): Filesystem usage quota limit timeleft files quota limit timeleft /students/compsci 563287 10485760 10485760 - - - - -
$ zfs userspace students/labstaff/admindata TYPE NAME USED QUOTA SOURCE POSIX User admin1 2.00G 30G default POSIX User admin2 4.00G 30G default POSIX User root 3K 30G default
$ zfs set defaultgroupquota=120g students/math $ zfs groupspace students/math TYPE NAME USED QUOTA SOURCE POSIX Group root 6K 120G default POSIX Group students 40.0G 120G default
$ zfs set reservation=5G tank/home/bhall $ zfs get reservation tank/home/bhall NAME PROPERTY VALUE SOURCE tank/home/bhall reservation 5G local
$ zfs list -r tank/home NAME USED AVAIL REFER MOUNTPOINT tank/home 5.00G 61.9G 37K /tank/home tank/home/bhall 31K 66.9G 31K /tank/home/bhall tank/home/sueb 337K 10.0G 306K /tank/home/sueb tank/home/glori 547K 61.9G 547K /tank/home/glori tank/home/mork 31K 61.9G 31K /tank/home/mork
$ zfs set quota=5G pool/filesystem $ zfs set reservation=10G pool/filesystem/user1 cannot set reservation for 'pool/filesystem/user1': size is greater than available space
$ zfs set reservation=10G tank/home/bhall $ zfs set reservation=5G tank/home/bhall $ zfs get reservation tank/home/bhall NAME PROPERTY VALUE SOURCE tank/home/bhall reservation 5G local
$ zfs set refreservation=10g profs/prof1 $ zfs list NAME USED AVAIL REFER MOUNTPOINT profs 10.0G 23.2G 19K /profs profs/prof1 10G 33.2G 18K /profs/prof1
$ zfs set reservation=20g profs/prof1 $ zfs list NAME USED AVAIL REFER MOUNTPOINT profs 20.0G 13.2G 19K /profs profs/prof1 10G 33.2G 18K /profs/prof1
$ zfs get reservation,refreserv profs/prof1 NAME PROPERTY VALUE SOURCE profs/prof1 reservation 20G local profs/prof1 refreservation 10G local
$ zfs get -r writelimit,defaultwritelimit,effectivewritelimit users/home NAME PROPERTY VALUE SOURCE users/home writelimit default default users/home defaultwritelimit none default users/home effectivewritelimit none local users/home/kaydo writelimit default default users/home/kaydo defaultwritelimit none default users/home/kaydo effectivewritelimit none local
$ zfs get -r writelimit,defaultwritelimit,effectivewritelimit users/home NAME PROPERTY VALUE SOURCE users/home writelimit default default users/home defaultwritelimit none default users/home effectivewritelimit none local users/home/nneke writelimit default default users/home/nneke defaultwritelimit none default users/home/nneke effectivewritelimit none local
$ zfs get -r writelimit,defaultwritelimit,effectivewritelimit users/home NAME PROPERTY VALUE SOURCE users/home writelimit 1M local users/home defaultwritelimit 500K local users/home effectivewritelimit 1M local users/home/nneke writelimit default default users/home/nneke defaultwritelimit 500K inherited from users/home users/home/nneke effectivewritelimit 500K local
$ zfs set writelimit=none users/home/kaydo $ zfs get -r writelimit,defaultwritelimit,effectivewritelimit users/home NAME PROPERTY VALUE SOURCE users/home writelimit 1M local users/home defaultwritelimit 500K local users/home effectivewritelimit 1M local users/home/kaydo writelimit none local users/home/kaydo defaultwritelimit 500K inherited from users/home users/home/kaydo effectivewritelimit 1M local
$ zfs create -o writelimit=2M users/home/mork $ zfs get -r writelimit,defaultwritelimit,effectivewritelimit users/home NAME PROPERTY VALUE SOURCE users/home writelimit 1M local users/home defaultwritelimit 500K local users/home effectivewritelimit 1M local users/home/mork writelimit 2M local users/home/mork defaultwritelimit 500K inherited from users/home users/home/mork effectivewritelimit 1M local
$ zfs create -o encryption=on tank/home/megr Enter passphrase for 'tank/home/megr': xxxxxxx Enter again: xxxxxxxx
$ zfs get encryption tank/home/megr NAME PROPERTY VALUE SOURCE tank/home/megr encryption on local
$ zfs snapshot tank/home/megr@now $ zfs clone tank/home/megr@now tank/home/megr-new Enter passphrase for 'tank/home/megr-new': xxxxxxx Enter again: xxxxxxxx $ zfs set encryption=off tank/home/megr-new cannot set property for 'tank/home/megr-new': 'encryption' is readonly
$ zfs key -c tank/home/megr Enter new passphrase for 'tank/home/megr': xxxxxxxx Enter again: xxxxxxxx
$ zfs get keysource tank/home/megr NAME PROPERTY VALUE SOURCE tank/home/megr keysource passphrase,prompt local
$ zfs get rekeydate tank/home/megr NAME PROPERTY VALUE SOURCE tank/home/megr rekeydate Wed Jul 25 16:54 2012 local
$ zfs mount -a Enter passphrase for 'tank/home/megr': xxxxxxxx Enter passphrase for 'tank/home/ws': xxxxxxxx Enter passphrase for 'tank/home/mork': xxxxxxxx
$ zfs mount -a Enter passphrase for 'pond/jaust': xxxxxxxx Enter passphrase for 'pond/rori': xxxxxxxx $ zfs mount | grep pond pond /pond pond/jaust /pond/jaust pond/rori /pond/rori
$ zfs upgrade -a cannot set property for 'pond/jaust': key not present
$ zpool status -v pond . . . pond/jaust:<0x1> pond/rori:<0x1>
$ zpool scrub pond $ zpool clear pond
$ zpool create -O encryption=on users mirror c0t1d0 c1t1d0 mirror c2t1d0 c3t1d0 Enter passphrase for 'users': xxxxxxxx Enter again: xxxxxxxx $ zfs create users/home $ zfs get encryption users/home NAME PROPERTY VALUE SOURCE users/home encryption on inherited from users $ zfs create -o encryption=aes-256-ccm users/home/mork $ zfs get encryption users/home/mork NAME PROPERTY VALUE SOURCE users/home/mork encryption aes-256-ccm local
$ zfs create -o encryption=on tank/ws Enter passphrase for 'tank/ws': xxxxxxxx Enter again: xxxxxxxx $ zfs create tank/ws/fs1 $ zfs snapshot tank/ws/fs1@snap1 $ zfs clone tank/ws/fs1@snap1 tank/ws/fs1clone
$ zfs create -o encryption=on tank/ws Enter passphrase for 'tank/ws': xxxxxxxx Enter again: xxxxxxxx $ zfs snapshot tank/ws@1 $ zfs clone tank/ws@1 tank/ws1clone Enter passphrase for 'tank/ws1clone': xxxxxxxx Enter again: xxxxxxxx
$ zfs get encryption tank/home/megr NAME PROPERTY VALUE SOURCE tank/home/megr encryption on local $ zfs snapshot tank/home/megr@snap1 $ zfs get encryption bpool/snaps NAME PROPERTY VALUE SOURCE bpool/snaps encryption on inherited from bpool $ zfs send tank/home/megr@snap1 | zfs receive bpool/snaps/megr $ zfs get encryption bpool/snaps/megr NAME PROPERTY VALUE SOURCE bpool/snaps/megr encryption on inherited from bpool
# zfs create -o encryption=on -o keyformat=passphrase -o keylocation=prompt zroot/test Enter new passphrase: Re-enter new passphrase:
# dd if=/dev/random of=/zroot/key.key bs=1 count=32 32+0 records in 32+0 records out 32 bytes transferred in 0.000146 secs (219178 bytes/sec) # zfs create -o encryption=on -o keyformat=raw -o keylocation=file:///zroot/key.key zroot/test # zfs get keylocation zroot/test NAME PROPERTY VALUE SOURCE zroot/test keylocation file:///zroot/key.key local
# zfs load-key zroot/test Enter passphrase for 'zroot/test': # zfs mount zroot/test
# zfs unmount zroot/test # zfs unload-key zroot/test
$ zfs create -o shadow=nfs://system2/rpool/data/jsmith/archive rpool/data/copyarchive $ shadowadm list PATH STATE /rpool/data/copyarchive ACTIVE $ zfs create -o shadow=nfs://system2/rpool/data/jsmith/datalogs rpool/data/logcopy $ shadowadm list PATH STATE /rpool/data/copyarchive ACTIVE /rpool/data/logcopy ACTIVE $ shadowstat EST BYTES BYTES ELAPSED DATASET XFRD LEFT ERRORS TIME rpool/data/copyarchive 34.4M 3.37G - 00:00:36 rpool/data/logcopy 1.12K 155K 1 (completed)Errors are detected. rpool/data/copyarchive 34.5M 3.37G - 00:00:37 rpool/data/logcopy 1.12K 155K 1 (completed) rpool/data/copyarchive 35.0M 3.37G - 00:00:38 rpool/data/logcopy 1.12K 155K 1 (completed) rpool/data/copyarchive 35.2M 3.37G - 00:00:39 rpool/data/logcopy 1.12K 155K 1 (completed) ^C
$ shadowstat -E rpool/data/copyarchive: No errors encountered. rpool/data/logcopy: PATH ERROR errdir/cups-socket Operation not supported $ shadowstat -e /rpool/data/logcopy rpool/data/logcopy: PATH ERROR errdir/cups-socket Operation not supported $ shadowadm cancel /rpool/data/logcopy
$ shadowadm list PATH STATE /rpool/data/copyarchive ACTIVE$ shadowstat EST BYTES BYTES ELAPSED DATASET XFRD LEFT ERRORS TIME rpool/data/copyarchive 251M 3.16G - 00:01:27 rpool/data/copyarchive 251M 3.16G - 00:01:28 rpool/data/copyarchive 252M 3.16G - 00:01:29 ^C $ shadowstat No migrations in progress. $ shadowadm list $ exit
$ zfs upgrade This system is currently running ZFS filesystem version 5. All filesystems are formatted with the current version.
$ zfs upgrade -v The following filesystem versions are supported: VER DESCRIPTION --- -------------------------------------------------------- 1 Initial ZFS filesystem version 2 Enhanced directory entries 3 Case insensitive and File system unique identifier (FUID) 4 userquota, groupquota properties 5 System attributes 6 Multilevel file system support For more information about a particular version, including supported releases, see the ZFS Administration Guide.
2021/12/24