Is it a good idea to use ZFS on a KVM virtual machine with direct disk access?
Asked by
hull+section7
I'm currently running a backup server on Debian 13 that has a ZFS pool with two mirrored disks. I'm considering virtualizing this backup server and directly passing /dev/sdb and /dev/sdc to a virtual machine, wanting to use ZFS directly on those disks instead of relying on qcow2 images. I realize this method makes the machine less portable. Will ZFS function properly in this setup? Thanks!
Answers
While it's possible, I would advise against it unless you have a solid reason. VMs can have more chances of filesystem corruptionโoften because they're not always shut down properly. Instead, I prefer to run ZFS on the host itself, so the host can manage things like snapshots for the guests more effectively. Plus, using passthrough configurations can complicate things. Just my two cents!
Reply to this answer
Yes, it can definitely work if you set it up right! But you might want to reconsider the virtualization part. Whatโs the reason you want to run it in a VM? It could complicate things more than necessary.
Reply to this answer
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions