PVE 4.0 LXC on ZFS-Storage fails

merseburger

Renowned Member
Jan 4, 2015
12
0
66
Hallo,

mein englisch ist leider etwas eingeschlafen.

Ich habe das Upgrade auf die Version 4.0 durchgeführt. Nun wollte ich mal schauen wie die Geschichte mit LXC ausschaut. Habe ein Container über das Webinterface angelegt und erhalte einen Fehler bezüglich des mountpoints.

Als Storage habe ZFS gewählt und auch im Webinterface diesen für Container freigegeben.

Im Webinterface erscheint folgender Fehler:

Code:
mount: special device /rpool/subvol-101-disk-1 does not exist
mounting container failed - command 'mount -o bind /rpool/subvol-101-disk-1 /var/lib/lxc/101/rootfs/' failed: exit code 32
extracting archive '/var/lib/vz/template/cache/debian-8.0-standard_8.0-1_amd64.tar.gz'
Total bytes read: 533012480 (509MiB, 96MiB/s)
Detected container architecture: amd64
Creating SSH host key 'ssh_host_dsa_key' - this may take some time ...
Creating SSH host key 'ssh_host_key' - this may take some time ...
Creating SSH host key 'ssh_host_rsa_key' - this may take some time ...
Creating SSH host key 'ssh_host_ed25519_key' - this may take some time ...
Creating SSH host key 'ssh_host_ecdsa_key' - this may take some time ...
TASK OK

Aus der daemon.log entnehme ich folgenden aufälligen Eintrag

Code:
Oct  7 06:32:43 pve pvedaemon[16322]: mounting container failed - command 'mount -o bind /rpool/subvol-101-disk-1 /var/lib/lxc/101/rootfs/' failed: exit code 32

Auch manuell über das Terminal komme ich zu keiner Lösung

Code:
pct create 101 /var/lib/vz/template/cache/debian-8.0-standard_8.0-1_amd64.tar.gz  -storage images
mount: special device /rpool/subvol-101-disk-1 does not exist
mounting container failed - command 'mount -o bind /rpool/subvol-101-disk-1 /var/lib/lxc/101/rootfs/' failed: exit code 32
extracting archive '/var/lib/vz/template/cache/debian-8.0-standard_8.0-1_amd64.tar.gz'
Total bytes read: 533012480 (509MiB, 84MiB/s)
Detected container architecture: amd64
Creating SSH host key 'ssh_host_ecdsa_key' - this may take some time ...
Creating SSH host key 'ssh_host_dsa_key' - this may take some time ...
Creating SSH host key 'ssh_host_key' - this may take some time ...
Creating SSH host key 'ssh_host_ed25519_key' - this may take some time ...
Creating SSH host key 'ssh_host_rsa_key' - this may take some time ...

Scheinbar wird der mountpoint nicht richtig angelegt

Code:
zfs list

NAME                      USED  AVAIL  REFER  MOUNTPOINT
rpool                     301G   598G   104K  /mnt
rpool/ROOT               24.6G   598G    96K  /mnt/ROOT
rpool/ROOT/pve-1         24.6G   598G  24.6G  /
rpool/subvol-101-disk-1    96K  4.00G    96K  /mnt/subvol-101-disk-1
rpool/swap               4.25G   602G   186M  -
rpool/swapreal           8.50G   606G    88K  -
rpool/vm-100-disk-3       264G   834G  27.7G  -

Ich hoffe ihr oder wir kommen zu einer Problemlösung
 
Last edited:
Hi,
please write in English, because outer wise nobody is able to help you.
 
Hello, my English is unfortunately fallen asleep a little. I have upgraded to version 4.0. Now I wanted to see how the story looks with LXC. Have a container created through the web interface and get an error with respect to the mount points. As Storage ZFS have chosen and those released also in the web interface for container. The following error appears in the web interface:

Code:
mount: special device /rpool/subvol-101-disk-1 does not exist
mounting container failed - command 'mount -o bind /rpool/subvol-101-disk-1 /var/lib/lxc/101/rootfs/' failed: exit code 32
extracting archive '/var/lib/vz/template/cache/debian-8.0-standard_8.0-1_amd64.tar.gz'
Total bytes read: 533012480 (509MiB, 96MiB/s)
Detected container architecture: amd64
Creating SSH host key 'ssh_host_dsa_key' - this may take some time ...
Creating SSH host key 'ssh_host_key' - this may take some time ...
Creating SSH host key 'ssh_host_rsa_key' - this may take some time ...
Creating SSH host key 'ssh_host_ed25519_key' - this may take some time ...
Creating SSH host key 'ssh_host_ecdsa_key' - this may take some time ...
TASK OK

From daemon.log I gather following eye-catching entry

Code:
Oct  7 06:32:43 pve pvedaemon[16322]: mounting container failed - command 'mount -o bind /rpool/subvol-101-disk-1 /var/lib/lxc/101/rootfs/' failed: exit code 32

Manually to get from the terminal to any solution

Code:
pct create 101 /var/lib/vz/template/cache/debian-8.0-standard_8.0-1_amd64.tar.gz  -storage images
mount: special device /rpool/subvol-101-disk-1 does not exist
mounting container failed - command 'mount -o bind /rpool/subvol-101-disk-1 /var/lib/lxc/101/rootfs/' failed: exit code 32
extracting archive '/var/lib/vz/template/cache/debian-8.0-standard_8.0-1_amd64.tar.gz'
Total bytes read: 533012480 (509MiB, 84MiB/s)
Detected container architecture: amd64
Creating SSH host key 'ssh_host_ecdsa_key' - this may take some time ...
Creating SSH host key 'ssh_host_dsa_key' - this may take some time ...
Creating SSH host key 'ssh_host_key' - this may take some time ...
Creating SSH host key 'ssh_host_ed25519_key' - this may take some time ...
Creating SSH host key 'ssh_host_rsa_key' - this may take some time ...

is apparently the mountpoint not applied properly

Code:
zfs list

NAME                      USED  AVAIL  REFER  MOUNTPOINT
rpool                     301G   598G   104K  /mnt
rpool/ROOT               24.6G   598G    96K  /mnt/ROOT
rpool/ROOT/pve-1         24.6G   598G  24.6G  /
rpool/subvol-101-disk-1    96K  4.00G    96K  /mnt/subvol-101-disk-1
rpool/swap               4.25G   602G   186M  -
rpool/swapreal           8.50G   606G    88K  -
rpool/vm-100-disk-3       264G   834G  27.7G  -

I hope you or we come to a problem-solving
 
Last edited:
The problem are the mount points in zfs.
you map it to /mnt and not to /rpool where pct is aspect it.
you should change the mountpoint, because if you create a new subvol the mount point is inhered from root.
 
I think this is a bug in proxmox then. Where do I change this mountpoint? In my case:

rpool/ROOT/pve-1/subvol-201-disk-1 96K 8.00G 96K /subvol-201-disk-1

command 'mount -o bind /rpool/ROOT/pve-1/subvol-201-disk-1 /var/lib/lxc/201/rootfs/' failed: exit code 32
 
Well it seems that you have to use a storage repo that uses ROOT as the ZFS pool, otherwise lxc fail to start as they can't find the mountpoint.

Y7ARoP9.png
 

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!