How can I mount a my VM ZFS dataset?

jramireziesgb

New Member
Jun 19, 2018
1
0
1
50
Hi, I have a Proxmox VE Server since September 2018 and it has several containers and a virtual machine. The thing is that I can see the datasets with:

# zfs list
NAME USED AVAIL REFER MOUNTPOINT
poolZFS 578G 1.19T 112K /poolZFS
poolZFS/subvol-101-disk-1 1.64G 6.36G 1.64G /poolZFS/subvol-101-disk-1
poolZFS/subvol-102-disk-1 957M 3.07G 957M /poolZFS/subvol-102-disk-1
poolZFS/subvol-103-disk-1 2.13G 1022G 2.07G /poolZFS/subvol-103-disk-1
poolZFS/vm-100-disk-1 573G 1.70T 55.6G -

And I can go to any of those mountpoints to see its files. But the last line shows that "poolZFS/vm-100-disk-1" dataset isn't mount. I've tried to mount it with:

# zfs mount poolZFS/vm-100-disk-1
cannot open 'poolZFS/vm-100-disk-1': operation not applicable to datasets of this type

But I got this error message.

So, how could I proceed to mount it? Is it possible?

Thank you
 
Proxmox uses ZFS zvols when it creates virtual disks on ZFS storage. If you want to mount them inside of Proxmox, you can find them in /dev/mapper/poolname/zvolname.

So you your instance you might do,

mount /dev/mapper/poolZFS/vm-100-disk-1 /mnt/temp

Make sure you turn off the VM first, of course. If the file system on that virtual disk is NTFS, you'll want to install the ntfs-3g package.
 
having issues with a boot loop with a vm and wanting to mount the zfs to see if it ran out of space or something


root@pvevb:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
TEST 6.54M 33.4G 279K /TEST
rpool 85.7G 155G 104K /rpool
rpool/ROOT 2.92G 155G 96K /rpool/ROOT
rpool/ROOT/pve-1 2.92G 155G 2.92G /
rpool/data 82.6G 155G 104K /rpool/data
rpool/data/subvol-102-disk-0 839M 7.18G 839M /rpool/data/subvol-102-disk-0
rpool/data/vm-100-disk-0 56K 155G 56K -
rpool/data/vm-100-disk-1 27.5G 155G 27.5G -
rpool/data/vm-100-disk-4 168K 155G 56K -
rpool/data/vm-100-disk-5 54.2G 155G 27.6G -

root@pvevb:~# zfs mount rpool/data/vm-100-disk-1
cannot open 'rpool/data/vm-100-disk-1': operation not applicable to datasets of this type

root@pvevb:~# cd /dev/mapper/

root@pvevb:/dev/mapper# ls
control


I also tried

root@pvelaptop:/dev/zvol/rpool/data# mount /dev/zvol/rpool/data/vm-100-disk-1 /mnt/vm100-d1
mount: /mnt/vm100-d1: wrong fs type, bad option, bad superblock on /dev/zd16, missing codepage or helper program, or other error.
root@pvelaptop:/dev/zvol/rpool/data# mount -t zfs /dev/zvol/rpool/data/vm-100-disk-1 /mnt/vm100-d1
filesystem '/vm-100-disk-1' cannot be mounted, unable to open the dataset


no idea why proxmox keeps making a mess of the vm's and why its partitions keep increasing ?

root@pvevb:/dev/zvol/rpool/data# zfs list -t all
NAME USED AVAIL REFER MOUNTPOINT
TEST 6.54M 33.4G 279K /TEST
rpool 85.7G 155G 104K /rpool
rpool/ROOT 2.92G 155G 96K /rpool/ROOT
rpool/ROOT/pve-1 2.92G 155G 2.92G /
rpool/data 82.5G 155G 104K /rpool/data
rpool/data/subvol-102-disk-0 839M 7.18G 839M /rpool/data/subvol-102-disk-0
rpool/data/vm-100-disk-0 56K 155G 56K -
rpool/data/vm-100-disk-0@wtf 0B - 56K -
rpool/data/vm-100-disk-0@__replicate_100-7_1669510921__ 0B - 56K -
rpool/data/vm-100-disk-0@__replicate_100-6_1669510936__ 0B - 56K -
rpool/data/vm-100-disk-1 27.5G 155G 27.5G -
rpool/data/vm-100-disk-1@wtf 15.2M - mount /dev/loop27.5G -
rpool/data/vm-100-disk-1@__replicate_100-7_1669510921__ 0B - 27.5G -
rpool/data/vm-100-disk-1@__replicate_100-6_1669510936__ 0B - 27.5G -
rpool/data/vm-100-disk-4 168K 155G 56K -
rpool/data/vm-100-disk-4@__replicate_100-5_1667125829__ 56K - 56K -
rpool/data/vm-100-disk-4@__replicate_100-7_1669486981__ 56K - 56K -
rpool/data/vm-100-disk-4@__replicate_100-7_1669489320__ 0B - 56K -
rpool/data/vm-100-disk-4@__replicate_100-6_1669489533__ 0B - 56K -
rpool/data/vm-100-disk-5 54.2G 155G 27.6G -
rpool/data/vm-100-disk-5@__replicate_100-5_1667125829__ 23.8G - 28.5G -
rpool/data/vm-100-disk-5@__replicate_100-7_1669486981__ 2.57G - 27.6G -
mount /dev/looprpool/data/vm-100-disk-5@__replicate_100-7_1669489320__ 2.98M - 27.6G -
rpool/data/vm-100-disk-5@__replicate_100-6_1669489533__ 0B - 27.6G -




fdisk -l /dev/zvol/rpool/data/vm-100-disk-1
Disk /dev/zvol/rpool/data/vm-100-disk-1: 32 GiB, 34359738368 bytes, 67108864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 8192 bytes
I/O size (minimum/optimal): 8192 bytes / 8192 bytes
Disklabel type: gpt
Disk identifier: 21163B14-6BCE-4403-BB52-85B823BDD97D

Device Start End Sectors Size Type
/dev/zvol/rpool/data/vm-100-disk-1p1 2048 67583 65536 32M EFI System
/dev/zvol/rpool/data/vm-100-disk-1p2 67584 116735 49152 24M Linux filesystem
/dev/zvol/rpool/data/vm-100-disk-1p3 116736 641023 524288 256M Linux filesystem
/dev/zvol/rpool/data/vm-100-disk-1p4 641024 690175 49152 24M Linux filesystem
/dev/zvol/rpool/data/vm-100-disk-1p5 690176 1214463 524288 256M Linux filesystem
/dev/zvol/rpool/data/vm-100-disk-1p6 1214464 1230847 16384 8M Linux filesystem
/dev/zvol/rpool/data/vm-100-disk-1p7 1230848 1427455 196608 96M Linux filesystem
/dev/zvol/rpool/data/vm-100-disk-1p8 1427456 67108830 65681375 31.3G Linux filesystem


root@pvevb:/dev/zvol/rpool/data# losetup -f /dev/zvol/rpool/data/vm-100-disk-1
root@pvevb:/dev/zvol/rpool/data# mount /dev/loop0 /mnt/vm100-d1
mount: /mnt/vm100-d1: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
root@pvevb:/dev/zvol/rpool/data# mount -t zfs /dev/loop0 /mnt/vm100-d1
filesystem '/dev/loop0' cannot be mounted, unable to open the dataset
 
Last edited:
"vm-100-disk-1" sounds like it is a zvol and not a dataset. So it is a block device and not a filesystem and therefore can't be mounted by ZFS. If you want to mount a zvol you will have to mount the filesystem that is partitioned on top of that zvol. You can refer to zvols like you would do to a normal HDD/SSD. You will find them under "/dev/zvol/rpool/vm-100-disk-1".

And for the next time, please put your console output in CODE-Tags. That makes it much easier to read those tables when the formating isn't lost.
 

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!