mkdocs-benoit.jp.net/HowtoZFS.page

27 lines
830 B
Text
Raw Normal View History

2020-09-21 07:05:59 +00:00
Some commands:
```
apt install zfsutils-linux
zpool create local /dev/xxx
zpool list
zfs create local/home
zfs list
2020-09-21 10:24:06 +00:00
zfs set compression=lz4 local/home
2020-09-21 07:05:59 +00:00
zfs get compression
2020-09-21 10:24:06 +00:00
zfs get compressratio local/home
zfs set dedup=on local/home
2020-09-21 10:25:41 +00:00
zpool get dedupratio local
2020-09-21 07:05:59 +00:00
zfs set mountpoint=/home local/home
apt install nfs-kernel-server nfs-common
systemctl enable --now rpc-statd.service nfs-server.service
2020-09-21 07:16:34 +00:00
zfs set sharenfs="rw=@10.0.1.0/24" local/home
2020-09-21 07:08:06 +00:00
zfs share local/home
2020-09-24 00:32:21 +00:00
zfs get sharenfs
2020-09-21 10:12:59 +00:00
# Import pool after boot/cryptsetup Open
zfs import local
2020-09-21 15:03:30 +00:00
zfs snapshot local/containers/archive@backup
zfs list -t snapshot
2020-09-21 14:55:59 +00:00
zfs send local/containers/archive@backup | ssh zfs@10.0.1.1 sudo zfs recv local/lxd00/containers/archive
2020-09-21 15:03:30 +00:00
zfs destroy local/containers/archive@backup
2020-09-24 02:38:01 +00:00
zfs clone local/containers/archive@backup local/containers/archive-clone
2020-09-21 07:05:59 +00:00
```