What filesystem to use inside VM?

Hello,

when deploying a Virtual Machine on TrueNAS SCALE it gets a Zvol that is handled as block device inside the VM. What are the preferred file systems to use inside the VMs on such Zvol block devices?

I think using ZFS inside the VMs makes no sense, as the Zvol is already protected by ZFS and using “ZFS inside ZFS” sound a bit faulty to me.

Should I simply use something like ext4 inside the VMs or do you have any recommendations?

Thanks a lot in advance,

Thomas

Yes, whatever non-CoW file system the guest OS uses—because ZFS-on-ZFS or generally CoW-on-CoW is an inefficient waste.

1 Like

Do a bit of reading on suitable ZVOL block sizes for your VM’s workload - there is a fair bit of info on that out there e.g.

Also see the note about sparse zvols and TRIM.

I like to use LLVM, predominately because it’s the Ubuntu default and then I can use my guide to resizing the ZVol whenever I want :wink:

2 Likes

To take a contrary position, I generally avoid LVM and any other kind of volume manager for VMs, preferring to let the host deal with that sort of thing. Bare ext4, and if I need to resize it, it’s:

  • Increase virtual disk size in the hypervisor
  • In the VM, parted /dev/sda resizepart 1 100%
  • In the VM, resize2fs /dev/sda1

Easy-peasy.

5 Likes

Agree and I will go one step further

Just use RAW files and forget the complications of a ZVOL.

Been using them since I moved 100% of my VMs (from ESXi) and few Apps (from TrueNAS Core) to SCALE, more than 2 years ago?

Yes, the darn GUI does not let you create the raw files, but once you create or convert the files, you can select them in the GUI.

What exactly do you mean with raw files?

What “complications” are those? And what benefits do you see to using RAW files instead?

1 Like

It’s not a complication, if you know, but how does a newbie copy a zvol?

Regardless, I find copying/moving simple files always beats figuring out zvol names and zfs commands.

If I was a newbie, personally I’d research use the well documented features that are ZFS bread-and-butter like snapshots and clones, which can be created via the UI, rather than wasteful file copying.

Why does a newbie (or anyone else) need to?

That’s why the GUI is there, so you don’t need to.

2 Likes