zfs pool - vm disk not visible

chris1284

New Member
Dec 15, 2023
14
0
1
hi,

i have created a zpool as storage and moved a container there, this is shown in gui and shell.

container.png

also i have moved 2 vm disk to the pool. these are not visible in shell.

vm.png

what is the reason? is this an error or are the disk really stored to the pool?
 
Last edited:
It creates zvols (block devices) for VMs and datasets (filesystems) for LXCs. You don't want to mount the zvols on the host as mounting a block device twice will corrupt its data. And you won't see it with ls as a zvol isn't a file. Think of it like a LV in case you are familiar with LVM or like a physical partition which ls won't show too.
 
Last edited:
  • Like
Reactions: chris1284
It creates zvols (block devices) for VMs and datasets (filesystems) for LXCs. You don't want to mount the zvols on the host as mounting a block device twice will corrupt its data. And you won't see it with ls as a zvol isn't a file. Think of it like a LV in case you are familiar with LVM or lik a physical partition which ls won't show too.
thank you. does it depends on the format of the disk that they are stored as zvols?? all my disk are raw. if i would have, for example, a vmware file to import as .qcow2, how is it stored on zfs?
 
You can't store qcow2 on a "ZFS" type storage as qcow2 are files and zvols got no filesystem so they can't store files. I you want to store VM disks as qcow2 you would need to use a "Directory" type storage (which could point to an mountpoint of an ZFS dataset). Would be better to use qm import to import that qcow2 and convert it into a zvol. Only good reason I could think of why it might be beneficial to use qcow2 on top of ZFS would be in case you want snapshots where you would be able to freely roll back and forth between different restore points.

PS: Dont use qcow2 just to avoid to learn how to properly work with ZFS. Its a good thing that there are no image files. This means you can skip that nested filesystem, another layer of CoW and all that unnecessary overhead these would cause.
 
Last edited:
  • Like
Reactions: chris1284

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!