ZFS default settings and layout

Jul 7, 2021
33
3
13
What is default layout and settings/features/fstab used by proxmox when installing to run on ZFS?

Background - I installed a system with the Debian text installer and then converted Debian to proxmox, now I installed two new SSDs and want to migrate the system to a ZFS mirror, the proxmox documentation about ZFS explains how to create pools etc but does not say what layout is recommended etc.

https://pve.proxmox.com/wiki/ZFS_on_Linux#_installation_as_root_file_system

I'm reading through several other documents:
https://openzfs.github.io/openzfs-docs/Getting Started/Debian/Debian Bullseye Root on ZFS.html
https://wiki.archlinux.org/title/Install_Arch_Linux_on_ZFS
https://www.funtoo.org/ZFS_as_Root_Filesystem

Also it is my understanding that normally when a VM is created on a ZFS backend zvols are used instead of sparse qcows, is it possible and should I migrate my existing VMs? Should VM storage be a seperate dataset?
 
What is default layout and settings/features/fstab used by proxmox when installing to run on ZFS?

Background - I installed a system with the Debian text installer and then converted Debian to proxmox, now I installed two new SSDs and want to migrate the system to a ZFS mirror, the proxmox documentation about ZFS explains how to create pools etc but does not say what layout is recommended etc.
As far as I see PVE isn`t customizing any ZFS options/attributes. It just uses the OpenZFS defaults and you have to optimize it yourself afterwards to fit your hardware and workloads.
By default PVE will create 3 partitions. First, a 1MB Partition for legacy reasons. Second, a 1GB partition for the bootloader. Either using grub or ESP but in both cases the proxmox-boot-tool will be used to keep them in sync. Third partition then is for ZFS. And there you will have "rpool" as the pool name, a "rpool/ROOT/pve-1" dataset that stores the root filesystem. A directory storage called "local" pointing to "/var/lib/vz" (which is part of this root filesystem). And a storage of type "ZFSpool" called "local-zfs" that is pointing to a dataset "rpool/data" where your virtual disks are stored.
Also it is my understanding that normally when a VM is created on a ZFS backend zvols are used instead of sparse qcows, is it possible and should I migrate my existing VMs?
You can move virtual disks between storages. When doing that PVE will convert these from qcow2 files to raw zvols.
Should VM storage be a seperate dataset?
Don't have to but makes it easier to manage (recursive commnds, inheriting ZFS attribute etc).
 
Last edited: