Can’t mount storage to LXC Container

yyyy

Member
Nov 28, 2023
68
3
8
Hello

Trying to get ceph storage in an LXC container (not vm), the node already has ceph cluster setup with 3 monitors and 8 osds, on the container it keeps showing error "FATAL: Module rbd not found in directory /lib/modules/6.5.11-4-pve" when trying to load the rbd kernel module sudo modprobe rbd and therefore cannot mount ceph storage, it was working fine on a vm with ubuntu server 22.04 and was able to mount the rbd in the VM but in a CT with ubuntu server 22.04 image it shows this error.modinfo: ERROR: Module alias rbd not found.

I have also tried to create a mount point in the "Resources" tab of the CT for the ceph pool but it shows:


Parameter verification failed. (400)

mp0: unable to hotplug mp0: failed to move 'mp0' into container hierarchy: Permission denied
 
Hello

Trying to get ceph storage in an LXC container (not vm), the node already has ceph cluster setup with 3 monitors and 8 osds, on the container it keeps showing error "FATAL: Module rbd not found in directory /lib/modules/6.5.11-4-pve" when trying to load the rbd kernel module sudo modprobe rbd and therefore cannot mount ceph storage, it was working fine on a vm with ubuntu server 22.04 and was able to mount the rbd in the VM but in a CT with ubuntu server 22.04 image it shows this error.modinfo: ERROR: Module alias rbd not found.

I have also tried to create a mount point in the "Resources" tab of the CT for the ceph pool but it shows:


Parameter verification failed. (400)

mp0: unable to hotplug mp0: failed to move 'mp0' into container hierarchy: Permission denied
I a having the same problem. Have you found any solutions? This is proxmos 8.1.3.
 
you cannot load kernel modules inside a container, you can mount it on the host and do a bindmount into the container
 
Update: Problem solved. This is my first proxmox zfs config and by mistake I was selecting the zfs pool instead of the mountpoint (the Directory).
After fixing, I also changed these flags in the /etc/pve/storage.cfg file so that if I make that mistake it does not use my root vol, like it was doing. I added the last two lines to the mountpoint. Thanks for the tip to Dylan Banque in youtube "ZFS Setup 101".

dir: zfspool_mp
path /mnt/zfspool
content rootdir,vztmpl,snippets,images,backup,iso
prune-backups keep-all=1
shared 0
is_mountpoint 1
mkdir 0
 
Hi,
today I get the same warning (PVE 8.1.4), when I wanted to add another drive (mount point) to a LXC container:
Code:
Parameter verification failed. (400)
mp1: unable to hotplug mp0: failed to move 'mp1' into container hierarchy: Permission denied

My mistake was simply not shutting down the container.
After shutting down it worked as expected, without the "Permission denied"

regards,
m.
 
Last edited:
HI there,
is there any official solution for this?
I am still getting the same error:

Code:
root@raspberrypi:~# pct set 100 -mp0 /mnt/thecu/APPOGGIO,mp=/mnt/thecu/APPOGGIO 
400 Parameter verification failed.                                               
mp0: unable to hotplug mp0: failed to change apparmor profile: Invalid argument 
                                                                                
pct set <vmid> [OPTIONS]
 
the problem simply was i disabled that apparmor security bulls*** for my homelab via kernel cmd globally. proxmox team somehow merged storage with apparmor. so can't work without apparmor. they belive it has to be this way so i was forced to re-enable this.