zfs

差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
下次修改
前次修改
zfs [2017/11/11 15:22] jzzfs [2018/12/27 00:41] (目前版本) jz
行 12: 行 12:
 ====== Dataset ====== ====== Dataset ======
 <code> <code>
 +# enable encryption feature
 +zpool set feature@encryption=enabled POOL_NAME
 +
 # encrypted dataset with passphrase # encrypted dataset with passphrase
-zfs create -o encryption=on -o keyformat=passphrase POOL_NAME/DATASET_NAME+zfs create -o encryption=aes-256-gcm -o keyformat=passphrase POOL_NAME/DATASET_NAME
  
 # encrypted dataset with key # encrypted dataset with key
 dd if=/dev/urandom of=/tmp/key bs=1 count=32 dd if=/dev/urandom of=/tmp/key bs=1 count=32
-zfs create -o encryption=on -o keylocation=file:///tmp/key POOL_NAME/DATASET_NAME+zfs create -o encryption=aes-256-gcm -o keyformat=raw -o keylocation=file:///tmp/key POOL_NAME/DATASET_NAME
  
 # load key # load key
 zfs load-key POOL_NAME/DATASET_NAME zfs load-key POOL_NAME/DATASET_NAME
 +
 +# mount all
 +zpool import -a -f
 +zfs mount -a
 +
 +# get property
 +zfs get -p encryption,keylocation
 +
 +# delete dataset
 +zfs destroy POOL_NAME/DATASET_NAME
 </code> </code>
  
行 37: 行 50:
 zfs list zfs list
 zfs get quota zroot/usr/home/username zfs get quota zroot/usr/home/username
 +</code>
 +
 +====== Snapshot ======
 +
 +===== Manual =====
 +<code>
 +zfs snapshot tank/pool@snapshot
 +zfs rename tank/pool@snapshot tank/pool@snapshot-renamed
 +zfs rollback tank/pool@snapshot-renamed
 +zfs destroy tank/pool@snapshot-renamed
 +</code>
 +
 +===== Scheduled =====
 +<code>
 +yaourt znapzend
 +znapzendzetup create --recursive SRC '7d=>1h,30d=>6h,60d=>1d' tank/pool
 +znapzend --debug --runonce tank/pool
 +zfs list -t snapshot
 +systemctl enable znapzend
 +systemctl start znapzend
 </code> </code>
  
行 42: 行 75:
   * https://docs.oracle.com/cd/E23823_01/html/819-5461/gazvb.html   * https://docs.oracle.com/cd/E23823_01/html/819-5461/gazvb.html
   * https://lildude.co.uk/zfs-cheatsheet   * https://lildude.co.uk/zfs-cheatsheet
 +  * https://wiki.archlinux.org/index.php/ZFS
 +  * https://blog.heckel.xyz/2017/01/08/zfs-encryption-openzfs-zfs-on-linux/
  
  • zfs.1510384923.txt.gz
  • 上一次變更: 2017/11/11 15:22
  • jz