If you run incus on a Hyper-V VM and the storage will be on a virtual disk, which storage pool driver should be used (virtual disk (.vhdx) being on a hardware RAID)?
ZFS from my understanding wants direct hardware access to do it’s thing, which this won’t have.
BTRFS is fine with that I think, but it doesn’t seem to be preferred for stability reasons?
Not too familiar with the others, but perhaps they are better for this scenario?
It only “wants” to have it, if you want the full set of benefits ZFS can provide.
ZFS will work fine on a single virtual disk, and you get some of the other benefits of ZFS like snapshots and snapshot replication. However, if it detects data corruption from the underlying hardware, it has no way to correct it. The corrupt file will become unreadable (ZFS will never return bad data), and it’s up to you to restore that file from a backup.
On the other hand, if you let ZFS have direct access to disks and use its own mirroring or RAID, it can both detect and fix the problem. For example, in the simplest case: if it has two mirror copies, it knows which is right and which is wrong, and will overwrite the bad data with the good.
If you want this benefit, one way would be to could create two .vhdx files, pass them as two virtual drives to your incus VM, and do ZFS mirroring between them. But there’s a 50% loss in storage capacity, of course.
However, even with a single disk, I’d still go with ZFS.
What’s “wasted caching”? Every filesystem does caching - well, the kernel VFS block layer does caching. With zfs 2.3.0+, zfs is allowed to use almost all system RAM for caching, but it will shrink under memory pressure. You can also constrain it with zfs_arc_max if you want.
Basically, if you give a VM (say) 4GiB of RAM, then any RAM which is not in use for anything else will be used for cache inside the guest. This is also true for other filesystems like ext4 which sit on the VFS block cache, as it is for zfs which manages its own ARC.