6

Are there any technical reasons why I shouldn't use ZFS file system inside a VM on a hypervisor on top of hardware RAID?

schema.png

nanashi32
  • 61
  • 1

2 Answers2

7

If you’ll pass thru your whole HBA or raw disks you should have zero issues. If you’ll try to build zvol around virtual disks it’s not going to work reliably - ZFS just like ReFS etc relies on SCSI flush command to commit metadata updates and virtual disks can’t guarantee underlying software layers would tolerate flush pushed down the storage stack.

BaronSamedi1958
  • 12,510
  • 1
  • 20
  • 46
3

ZFS will work just fine in a virtualized environment. The only thing to note is that with a single disk pool, ZFS will not be able to automatically correct any error it found (ie: it will only detect errors without repairing them).

shodanshok
  • 44,038
  • 6
  • 98
  • 162
  • So everything is fine in the schema I drew, and it's safe to assume that it will work stably in production environment? – nanashi32 Dec 12 '20 at 07:10
  • Yes, it will work correctly but without error correction capabilities. – shodanshok Dec 12 '20 at 07:59
  • 2
    At some point with power cut off in the middle of the meta update sequence virtualized disks will experience data corruption. If you think it’s OK, let’s allow this in prod and OP can call it a day. – BaronSamedi1958 Dec 14 '20 at 11:04
  • 1
    @BaronSamedi1958 No, ZFS is transactional in nature, so it would simply revert back to the latest committed transaction (or `fsynced` data). This is better then traditional journaled filesystem which, by the way, are already perfectly fine in single disk usage. – shodanshok Dec 14 '20 at 12:18