ZVOL Question

tdyboc

Member
Dec 3, 2020
10
0
6
57
On my proxmox server, I 'zfs create -V 16G zfs/zvol', I see the device it's /dev/zd0. I cannot see this device in proxmox UI anywhere, I can't use it as a HDD for any new VM or as a extra device to any existing VMs. I can't even put LVM on top of it from the proxmox host as I get an error message: Device /dev/zd0 excluded by a filter

Can someone explain this?

Thanks
 
Your zvol device will be in /dev/[zpoolName]/[optZfsDataSet]/[zvolName] This device will not be visible in Proxmox UI, but You can add this in configuration files to existing, or new VM if You like. Read: ZFS on linux, Tips and Tricks from Proxmox Wiki. From Proxmox UI You can only create new zvol for KVM VM, for conatainers it creates only data sets. For more information about ZFS look: Oracle ZFS Administration Guide and Debian ZFS.
 
May I ask why you create the volume dataset manually? If you create a dataset (for example <pool>/guests) you can add a storage in the Datacenter -> Storage panel of the type ZFS and point it to that dataset. PVE will then create the VM zvols and container datasets in that location by itself.
 
Well, I think I understand ZFS well enough I've used it outside proxmox. This is my ZFS setup, i created this from the command-line after I got an initial error in the UI. All this storage is within the proxmox server/system via a LSI SAS 9201-16i.
1607817263674.png

In proxmox this is what I see. Can do nothing further from here, no unused disks. I chose to use not mirrors, this is just a play area for me so nothing important and I just wanted the capacity.

1607817324601.png

1607818118039.png
 
Last edited:
Okay, you created directory storages on the ZFS pool. This can be okay if you want to store backups, ISOs and such things on it. But please add the following two lines to the directory config in /etc/pve/storage.cfg:
Code:
is_mountpoint 1
mkdir 0
so that PVE knows that the storage should only be activated once something (the zfs dataset) is mounted at that path and not to create the path if it does not exist yet.

For containers and VMs you don't need to define a directory storage but can add a storage of the type ZFS and point it to the dataset of your choice.
With that PVE will create zvols for VM disks and regular filesystem datasets for containers in the dataset given.
 

About

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!