ZFS file vs partition

I have currently got a dedicated server with 2x2TB raid setup, I am bit reluctant to try and repartition it therefore, when setting up ZFS my only option seems to be for the ZFS pool to be created as a file instead of a custom partition.

I am wondering what sort performance hit I should expect, bearing in mind the HDD is noticeably slower when installing stuff compared to SSD. Is there going to be major slowness or will be it not noticeable.

For HDD, the overhead may not be too noticeable given things are already quite slow.
You’ll definitely end up doing additional read/writes because of going through another filesystem.

Would it make sense (performance) in this situation, if i was only using LXD VMs but not containers to use the filesystem storage driver instead of a ZFS file ?

Yeah, I’d expect the dir backend to offer better runtime performance with the usual limitations:

  • Disk limits won’t apply to containers
  • Launching new instances will be pretty slow (no copy-on-write)
  • Snapshots are effectively useless (require a full copy of the data)
  • Migration relies on rsync and so is also slow

If you don’t create instances too often nor use snapshots, this may be fine though.