LXC doesn't start with rootfs on CIFS

murda

Member
Jan 3, 2024
51
4
8
Hi,

I got a free Hetzner Storage Box of 100GB alongside my dedicated server. I've mounted the storage as SMB/CIFS mounted storage, which works fine. But starting containers is problematic.

Please see the attached image. CT 101 was already created, which refused to boot for the same errors as CT 102. At 19:26 I rebooted the server, after which CT 101 started. But as you can see creating a new container and trying to start it fails, with the 2 different error messages subsequently.

1704311023734.png

To verify that CT 102 is present:

CleanShot 2024-01-03 at 20.47.35@2x.png

I've searched the internet for solutions and found the following, but unfortunately running
Bash:
pct fsck 102
hangs for a long time until I exit the process myself:
CleanShot 2024-01-03 at 20.52.58@2x.png
 
I dug some more and it seems like this has been an unsolved issue for several years. I'm not holding my hopes up on getting this fixed, unfortunately.
 
It probably is a non-fixable permission issue. I think it should work with a VM though.

For a VM the users inside the VM don't matter because QEMU is managing the disk image via emulated hardware and QEMU is a root process on the host. If root mounted the share or the permissions allow root to write to it then it should work.

For a container that is not the case. There is no hardware emulation layer for containers. The processes inside read and write to the disk image as whatever user they are. If the container is privileged and root did the mount of the CIFS volume then root may be able to write but not other users. If the container is unprivileged then it won't work at all because root(container) != root(host).

This is my guess as to why it doesn't work. I could be wrong.