That may sound like a strange use case, but is there a way to access a ZFS volume directly through an LXC container or a Qemu VM with Proxmox?

I'd like to have incremental backups pushed to my guest on my server from my computer. For this, I'd be happy to have zfs send|receive enabled on my guest linked to my host's ZFS pool.

Currently, installing zfs-dkms and launching zfs-share.service aborts with the unability to find /dev/zfs on my CT.

How would you link the ZFS pool to it?

  • For a VM, the best you can do is make the ZFS filesystem available over NFS from the host, mount it in the guest to do whatever IO, and run any administrative commands from the host. I'm not sure about LXC containers -- there is no fundamental problem with this, but I don't know if anyone has actually finished building it for Linux yet. From github.com/lxc/lxd/issues/4184 and the linked github.com/zfsonlinux/zfs/pull/6865, it seems at least partially implemented, but perhaps still incomplete. – Dan Dec 1 '18 at 1:25
  • I'll look forward the PR and this implementation, thank you! I looked a bit at the NFS feature with ZFS, I didn't find any clues on having it working with zfs send|receive from the guest. That's my main use case. I'm currently wondering would that be better having a script handling this directly from the host or not, otherwise. – Luka Dec 3 '18 at 14:09
  • Like I said, if you use NFS to share the filesystem from the host to the guest, you’d have to “run any administrative commands from the host”, including send/receive. – Dan Dec 3 '18 at 14:19
  • I am currently trying to access ZFS over LXC by forwarding /dev/zfs to guest. I'll explain the solution I'll choose when I'll have mine setted up (keeping track here sounds good). – Luka Dec 4 '18 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.