[SOLVED] Access zfs data(set) via host shell

ktdt00

New Member
Nov 9, 2021
9
1
3
62
Hopefully what they say about "...no stupid questions..." is true here :)

I can't figure out why my VM disk images can't be interacted with via a host shell?

This....
Code:
root@proxmox:~# zfs list
NAME                       USED  AVAIL     REFER  MOUNTPOINT
data-pool                  432G  1.33T       96K  /data-pool
data-pool/vm-230-disk-0    432G  1.35T      414G  -
rpool                      102G   328G      104K  /rpool
rpool/ROOT                1.95G   328G       96K  /rpool/ROOT
rpool/ROOT/pve-1          1.95G   328G     1.95G  /
rpool/data                 100G   328G       96K  /rpool/data
rpool/data/vm-200-disk-0  1.89G   328G     1.89G  -
rpool/data/vm-210-disk-0  28.4G   328G     28.4G  -
rpool/data/vm-220-disk-0  3.69G   328G     3.69G  -
rpool/data/vm-220-disk-1  53.3G   328G     53.3G  -
rpool/data/vm-230-disk-0  12.9G   328G     12.9G  -

And then this...
Code:
root@proxmox:~# ls -ah /rpool/data/
.  ..

Why can't I see or interact with the files? I've searched and searched and found lots of posts where folks seem able to see the VM disks on mounted ZFS datasets, play with them via qemu, etc. It's a ZFS two drive mirror BTW. Am I just missing something basic?
 
Why can't I see or interact with the files?
Because they are no files on a filesystem. They are block devices called zvols in ZFS terminology. You should google whats the difference between a "dataset" and a "zvol". If you want to access them (make sure the VM isn't running or you will corrupt your disk) you need to mount them first like a physical disk using something like mount -t YourFSusedInThatVirtualDisk /dev/rpool/data/vm-200-disk-0 /mnt/YourMountPoint. And don't forget to unmount them before starting your VM again.
 
Last edited:
  • Like
Reactions: ktdt00

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!