zfs restore notes

This commit is contained in:
openoms
2023-08-13 12:11:58 +02:00
parent 621c4bef5a
commit 3efc8cac7f

View File

@@ -246,16 +246,20 @@
## Import an existing ZFS pool ## Import an existing ZFS pool
* https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/index.html * https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/index.html
``` ```
zpool import poolname="fourdiskpool"
zpool import -a zpool import ${poolname} -f
# restore the key # restore the key
# load key and mount
sudo /sbin/zfs load-key -a sudo /sbin/zfs load-key -a
sudo /sbin/zfs mount -la sudo /sbin/zfs mount -la
# check
df -h
# automount with cron # automount with cron on reboot
cronjob="@reboot sudo /sbin/zfs load-key -a; sudo /sbin/zfs mount -la" cronjob="@reboot sudo /sbin/zfs load-key -a; sudo /sbin/zfs mount -la"
( (
crontab -u admin -l crontab -u admin -l