$ sudo systemctl edit zfs-import-cache.service
[Unit] Requires=open-iscsi.service iscsi.service After=open-iscsi.service iscsi.service
Beginner users could not know that the easiest way to replicate a whole pool is to use the zfs send/receive tool.
You have just to create a snapshot and send it to the new pool. All the previous snapshots will be sent preserving dates and names.
zfs send -R MY_OLD_POOL@MY_LATEST_SNAPSHOT | zfs receive -F MY_NEW_POOL
# apt install --yes debootstrap gdisk dpkg-dev linux-headers-$(uname -r) \ git-buildpackage build-essential dkms libaio-dev \ libattr1-dev libelf-dev libblkid-dev libselinux1-dev libssl-dev \ libudev-dev python3-cffi python3-setuptools python3-sphinx \ python3-all-dev uuid-dev zlib1g-dev # git clone https://salsa.debian.org/zfsonlinux-team/zfs.git # cd zfs # git checkout pristine-tar # git checkout master # gbp buildpackage -uc -us # cd .. # dpkg --install \ libnvpair1linux_0.8.1-4_amd64.deb \ libuutil1linux_0.8.1-4_amd64.deb \ libzfs2linux_0.8.1-4_amd64.deb \ libzpool2linux_0.8.1-4_amd64.deb \ zfs-dkms_0.8.1-4_all.deb \ zfsutils-linux_0.8.1-4_amd64.deb \ zfs-zed_0.8.1-4_amd64.deb # modprobe zfs
This command works with the volume, not the pool. You will need to execute it for every volume if you pool has more than one.
sudo zpool online -e zpool-docker nvme-Amazon_Elastic_Block_Store_volxxxxxxxxx