Are there any technical reasons why I shouldn't use ZFS file system inside a VM on a hypervisor on top of hardware RAID?
Asked
Active
Viewed 860 times
2 Answers
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
-
What about the schema I drew? I plan to use zfs only on a single virtual disk, just to track whether any errors will appear, without raidz or self-healing. Will it be stable enough to be used in a production environment? – nanashi32 Dec 12 '20 at 07:07
-
I think that in the OP case full HBA passthrough is not practical / possible. – shodanshok Dec 12 '20 at 08:00
-
2I don’t understand what you drew. – BaronSamedi1958 Dec 14 '20 at 11:03
-
2Probably. Passing just disks alone works as well. – BaronSamedi1958 Dec 14 '20 at 11:03
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
-
2At 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