How to correctly use ZFS in Proxmox ? One pool or two ?


Active Member
Jan 19, 2019

I would like to add 4 disks of 8To each on Proxmox. I've done some research and it seems that ZFS would be a good way to do that.
I would like to create 2 separate pools with 2 mirrored disks in each.

How could I add those disks to my VMs after that ? If I want to only allocate 1To for a VM, and 500 for another one, how would I do that ?

I've never used ZFS before, and I've not used Proxmox enough to understand how it would work.

Thanks a lot for your help
I would create an RAID 10, so you have more performance and the space is similar to your setup.

You add the ZFS as storage in PVE and create the virtual disk on it. It's not more magic, it's basic virtualization :)
  • Like
Reactions: amigaoneit
As simple as that...

If I create multiples datasets like mypool/dataset1 and mypool/dataset2, is it possible to add one of them as the virtual disk for the VM ?
Sorry if that sounds stupid, but I've not found anything about that !
Thanks !
is it possible to add one of them as the virtual disk for the VM
No. You add the dataset under storage as ZFS. Then if you create an virtual machine a blockdevice will be created. Like here on on one of my server:
v-machines                                    5,77T  3,01T   112K  /v-machines
v-machines/Downloads                           162M  3,01T   162M  /v-machines/Downloads
v-machines/HDD-vmdata                         58,6G  3,01T   112K  /v-machines/HDD-vmdata
v-machines/HDD-vmdata/base-100-disk-0          132K  3,01T   132K  -
v-machines/HDD-vmdata/base-100-disk-1         1,75G  3,01T  1,75G  -
v-machines/HDD-vmdata/base-109-disk-1         9,51G  3,01T  9,51G  -
v-machines/HDD-vmdata/base-119-disk-0           64K  3,01T    56K  -
v-machines/HDD-vmdata/base-119-disk-1         1,78G  3,01T  1,78G  -
v-machines/HDD-vmdata/base-122-disk-0         40,4M  3,01T  40,4M  -
v-machines/HDD-vmdata/base-122-disk-1         4,47G  3,01T  4,47G  -
v-machines/HDD-vmdata/subvol-101-disk-0       1,77G  6,23G  1,77G  /v-machines/HDD-vmdata/subvol-101-disk-0
v-machines/HDD-vmdata/subvol-102-disk-0        836M  7,18G   836M  /v-machines/HDD-vmdata/subvol-102-disk-0
v-machines/HDD-vmdata/vm-107-disk-0           24,6G  3,01T  24,5G  -
v-machines/HDD-vmdata/vm-113-disk-0             56K  3,01T    56K  -
v-machines/HDD-vmdata/vm-113-disk-1           13,9G  3,01T  13,9G  -
v-machines/home                               5,19T  3,01T  5,19T  /v-machines/home
v-machines/virtualbox-darkbox                   96K  3,01T    96K  /v-machines/virtualbox-darkbox


Don't forget to activate Compression on the pool or on your dataset.
zpool get all
No. You add the dataset under storage as ZFS. Then if you create an virtual machine a blockdevice will be created.

I'm really not familiar with bockdevice, I don't think I've ever used one. Your dataset is HDD-vmdata, and is available as a ZFS pool, right ?

If I want to create a new VM and add the HDD-vmdata, when I have to choose storage, that's where I can choose the HDD-vmdata ? (cf first file)

And if I want to add another dataset to a VM, I can choose the dataset (which is a blockdevice ?) and add it there ? (cf second file)

Is it possible to "share" a dataset between multiples VMs ? Like a Download dataset, could it be accessible by different VMs ?

Thanks for your help


  • 1.png
    10.6 KB · Views: 27
  • 2.png
    15.1 KB · Views: 27
Really, you think to complicated.

You have an zpool right? Ok. And on this zpool you create an dataset. And this dataset you add under the storagetab as ZFS. That's it. Nothing more. And now your screenshots are wrong. Never use ZFS as filesystem for qcow2. With that your vm's can be broken and your performance is in the basement.
Autrui, do not do this setup.
There is simply no reason for it.
Zfs needs direct access to the hardware. You create your pools on the host. As in your proxmox box.
Now how You use this pools is ul to you. Some people do everything on the host. That is load the pools as host local storage and just dump stuff on it. I personnaly had some bad luck with that kind of setup so I do a little more complicated configuration.
What is it?
Well I setup my proxmox on 2 raid1 ssd. My rpool, the system pool, is 120gb ssd based.
Than I also have a pvedata pool on 2 1tb spinners that I add to my hoat as local storage. This is where everything gose. My VMs etc...
All this ia zfs mirror pools.

Now this is where my setup gets a little complicated.
I have a number of spinners warriing in size from 2tb to 4tb. That I want to use for all of my actuall data, like media , backups and so on.
So I created several pools out of all disks keeping each pool on same size disks.
The zfs pools are automounted .On creation. Than I bind mount my pools into my lxc containers.
I do not use this pools to install OS. I only store data on them. I have emby server in lxc serving media off my pools.
I have file server sharing the pools as well with sambal.
The only thing I still can not do is to add them to full VM.
  • Like
Reactions: semanticbeeng


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!