ZFS wheres my data?

posi211

Active Member
Nov 11, 2016
2
0
41
56
so I'm used to looking for my VM in the /var/lib/vz/images On my new install I installed the Proxmox version 5 with ZFS.
How do I get to the location where the VM's are stored.
I was thinking it was in /rpool/data/ but I'm wrong.

Anyone willing to school me?
 
Hello,
the Vms are since Promxox 4 .4 or so in so-called ZFS volumes short ZVOLs . ZFS volumes are datasets that represent a block unit.

In short, your VM disks are no longer in the shap of a file on the file system, but are a block device, so to speak.

Path to the zvols :
Code:
root@fal-pve02 ~ # ls -lah /dev/zvol/rpool/data/
total 0
drwxr-xr-x 2 root root 580 Nov 10 15:28 .
drwxr-xr-x 4 root root 100 Nov  9 22:42 ..
lrwxrwxrwx 1 root root  12 Nov  9 22:42 vm-100-disk-1 -> ../../../zd0
lrwxrwxrwx 1 root root  14 Nov  9 22:42 vm-100-disk-1-part1 -> ../../../zd0p1
lrwxrwxrwx 1 root root  14 Nov  9 22:42 vm-100-disk-1-part2 -> ../../../zd0p2
lrwxrwxrwx 1 root root  13 Nov  9 22:42 vm-101-disk-1 -> ../../../zd32
lrwxrwxrwx 1 root root  15 Nov  9 22:42 vm-101-disk-1-part1 -> ../../../zd32p1
lrwxrwxrwx 1 root root  15 Nov  9 22:42 vm-101-disk-1-part2 -> ../../../zd32p2
lrwxrwxrwx 1 root root  13 Nov  9 22:42 vm-101-disk-2 -> ../../../zd64
lrwxrwxrwx 1 root root  15 Nov  9 22:42 vm-101-disk-2-part1 -> ../../../zd64p1
lrwxrwxrwx 1 root root  13 Nov  9 22:42 vm-102-disk-1 -> ../../../zd16
lrwxrwxrwx 1 root root  15 Nov  9 22:42 vm-102-disk-1-part1 -> ../../../zd16p1
lrwxrwxrwx 1 root root  15 Nov  9 22:42 vm-102-disk-1-part2 -> ../../../zd16p2
lrwxrwxrwx 1 root root  15 Nov  9 22:42 vm-102-disk-1-part5 -> ../../../zd16p5
lrwxrwxrwx 1 root root  14 Nov 10 12:07 vm-103-disk-0 -> ../../../zd160
lrwxrwxrwx 1 root root  14 Nov 10 12:58 vm-104-disk-0 -> ../../../zd176
lrwxrwxrwx 1 root root  13 Nov  9 22:42 vm-105-disk-1 -> ../../../zd96
lrwxrwxrwx 1 root root  15 Nov  9 22:42 vm-105-disk-1-part1 -> ../../../zd96p1
lrwxrwxrwx 1 root root  15 Nov  9 22:42 vm-105-disk-1-part2 -> ../../../zd96p2
lrwxrwxrwx 1 root root  13 Nov  9 22:42 vm-106-disk-0 -> ../../../zd48
lrwxrwxrwx 1 root root  15 Nov  9 22:42 vm-106-disk-0-part1 -> ../../../zd48p1
lrwxrwxrwx 1 root root  15 Nov  9 22:42 vm-106-disk-0-part2 -> ../../../zd48p2
lrwxrwxrwx 1 root root  14 Nov  9 22:42 vm-107-disk-1 -> ../../../zd112
lrwxrwxrwx 1 root root  16 Nov  9 22:42 vm-107-disk-1-part1 -> ../../../zd112p1
lrwxrwxrwx 1 root root  16 Nov  9 22:42 vm-107-disk-1-part2 -> ../../../zd112p2
lrwxrwxrwx 1 root root  13 Nov  9 22:42 vm-108-disk-1 -> ../../../zd80
lrwxrwxrwx 1 root root  15 Nov  9 22:42 vm-108-disk-1-part1 -> ../../../zd80p1
lrwxrwxrwx 1 root root  15 Nov  9 22:42 vm-108-disk-1-part2 -> ../../../zd80p2
lrwxrwxrwx 1 root root  14 Nov 10 15:28 vm-109-disk-0 -> ../../../zd192
 
Hi,

I have also noticed these part-xx ZVOLs on my system. I did neither expand the disks nor did I create snapshots. There are also some ZVOLs where there are part-2 and part-4 but no part-3.

I am just curious: why does ZFS that and does it belong that way ?

Cheers
Michael
 
Zfs list shows only one ZVOL. But why are there several devices for one ZVOL?

At the moment I am testing around with the system because I would like to migrate my XenServer VMs to Proxmox. That means unfortunately I have to export them as VHD, convert them to RAW and then write them to my proxmox VM with DD

e.g.: dd if=/mnt/pve/XEN/VM1.raw of=/dev/rpool/vm-data/vm-102-disk-0 bs=1M

When there are several disks (part-1, part-2) – which one would I write to?
 
You don't need to do that. Just convert your XenServer vdisks to vmdk and ship them over to your PVE host. Then create a new "empty" guest and use the qm tool to import it. I will create a zvol for that on its own. This is the way I have moved my Xen vdisks to PVE using ZFS storage. If you want to be even smarter, update you XenServer Linux guests to include the virtio drivers into the initial ramdisk and then on PVE use the Virtio (SCSI) adaptor, this is really fast…
 
Thanks man! I was searching up and down the web for a import feature like this for proxmox but the only thing I found was this dd idea. The qm importdisk works like a charme.
 

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!