[SOLVED] Question about how Proxmox uses ZFS pools

Venom

Member
Dec 2, 2021
9
3
8
38
Hello,
I just bought some new disks and though it would be a good time to try out ZFS. I have been explained by some people that first
you create a zpool and then on top of that you create a filesystem data-set, after which you can store you files on the mounted
location. I added my zfs filesystem as a storage pool within Proxmox and then as a test I created testvm with a 100G hard disk.
Then I went to look for the raw image file under the location I have my filesystem data-set mounted. But I don't see any raw images
created for the hard disk. However I do see the following:
Code:
zd0               230:0    0   100G  0 disk
~# ls -l /dev/zmedia/zimages
total 0 lrwxrwxrwx 1 root root 9 Jun 25 08:22 vm-108-disk-0 -> ../../zd0
vm-108-disk-0
So it seems Proxmox creates a blockdevice that it uses for a virtual hard disk. Currently I have two raw images files which I have stored under a
local filesystem location and then location is used as a storage pool in Proxmox. I was hoping just to copy them over to my new zfs filesystem
mountpoint and then just to have to adjust my vm to look at the right Proxmox storage pool, Is that possible? Or is creating new blockdevices(/dev/zmedia/zimages) the
normal way Proxmox deals with zfs storage pools and that I will either have to copy the files within my vm or dd the raw images files to newly created zdX block devices? I'm still new to zfs, so I only have a basic understanding of how it works, maybe I am missing something?
 
Last edited:
stored under a
local filesystem location and then location is used as a storage pool in Proxmox. I was hoping just to copy them over to my new zfs filesystem
Sure: Datacenter --> Node --> <your VM> --> Hardware --> Hard Disk.

In the Menu "Disk Action" in the top button area you'll find "Move Storage" which allows to move that selected disk to any compatible Datastore.


Some functions are hard to find...

Have fun - and welcome to the forum :)
 
  • Like
Reactions: Venom
Thanks for your help and the welcome! :)

I did see that but wasn't sure what the best way to handle it, would it have been an option to add the /zmedia as a local directory storage pool and then move the raw images files there also an option? If so which one is better to use, it seems like when adding my zfs pool as a zfs storage pool within Proxmox it's comparable to a lvm storage pool as in how it creates the disks for the vm's.
 
would it have been an option to add the /zmedia as a local directory storage pool and then move the raw images files there also an option?
Yes, that is an option. But no, I would not do that. A directory based datastore has an additional layer: the base file-system. On top of that you might store xyz.qcow container files for a virtual machine. Inside of that file the guest would create a partition table and file systems. I would call that a (well established and well accepted) hack. A block device (a "zvol") is faster and better isolated.
zfs storage pool within Proxmox it's comparable to a lvm storage pool as in how it creates the disks for the vm's.
Yes, the comparison does fit. Zfs has much, much, much more features than LVM, but yes, for the application a "zvol" ist just a block device.

Best regards
 
  • Like
Reactions: Venom

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!