Proxmox on zfs - direct access to disk partitions ... How it is working ?

Petr Svacina

Well-Known Member
Oct 1, 2018
35
15
48
48
Hi all,

A have a question, on my proxmox instalation I was able to directly mount guest disk partition on the host server.

Let me give you an example:

PVE host 5.X migrated to 6.X:

root@pve:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 1.11T 1.09T 104K /rpool
rpool/ROOT 63.9G 1.09T 96K /rpool/ROOT
rpool/ROOT/pve-1 63.9G 1.09T 63.9G /
rpool/data 1.05T 1.09T 96K /rpool/data
rpool/data/vm-100-disk-0 83.5G 1.09T 83.5G -
rpool/data/vm-100-disk-2 78.1G 1.09T 78.1G -
rpool/data/vm-101-disk-0 909G 1.09T 909G -

So now I want list partitions of the disk vm 101, here it is:

root@pve:~# ls -l /dev/zvol/rpool/data/vm-101-disk-*
lrwxrwxrwx 1 root root 12 Jan 22 08:59 /dev/zvol/rpool/data/vm-101-disk-0 -> ../../../zd0
lrwxrwxrwx 1 root root 14 Jan 22 08:59 /dev/zvol/rpool/data/vm-101-disk-0-part1 -> ../../../zd0p1
lrwxrwxrwx 1 root root 14 Jan 22 08:59 /dev/zvol/rpool/data/vm-101-disk-0-part2 -> ../../../zd0p2

See ? I can see the partition directly, do now I can simple mount them and see the files .. Oki ? No problem ;)

But on the fresh instalation of the PVE 6.x, there is NO partition located in the /dev/zvol ....

PVE 6.X host:

root@pve:~# ls -l /dev/zvol/rpool/data/vm-100-disk-*
lrwxrwxrwx 1 root root 13 Jan 22 15:20 /dev/zvol/rpool/data/vm-100-disk-0 -> ../../../zd80

So my question is: What is changed ? Or do I something wrong ? Thanks a lot.

Peter
 
Last edited:
This has not changed but you must export and import the pool to get the partitions.
Or restart the system.
The problem is the partition scan is done at the import of the pool.
 
Hi, I am stupid. :-) Yeah after the reboot I can see the partitions, maybe I should reboots my PVE server more often :-)

Thanks a lot.
 

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!