I am trying to get a NFS share accessible by an unprivileged LXC. I've been following the guide here, mounting the NFS share on my host, then bind mounting the host directory to my container.
The problem I am having is that when the mount point is enabled and the NFS share is mounted on the host I get the following error when starting the container:
However, if I unmount the NFS share on the host, even with the bind mount still enabled on the container, the container does start. I can even unmount the NFS share, start the container and remount the NFS share on the host and the container is able to access the data in the NFS share. It seems like it is the process of starting the container that fails, even though the configuration is actually perfectly functional.
Any help on this issue would be greatly appreciated.
Extra info:
The problem I am having is that when the mount point is enabled and the NFS share is mounted on the host I get the following error when starting the container:
Code:
root@pve:~# pct start 101
run_buffer: 571 Script exited with status 1
lxc_init: 845 Failed to run lxc.hook.pre-start for container "101"
__lxc_start: 2046 Failed to initialize container "101"
startup for container '101' failed
However, if I unmount the NFS share on the host, even with the bind mount still enabled on the container, the container does start. I can even unmount the NFS share, start the container and remount the NFS share on the host and the container is able to access the data in the NFS share. It seems like it is the process of starting the container that fails, even though the configuration is actually perfectly functional.
Any help on this issue would be greatly appreciated.
Extra info:
Code:
root@pve:~# cat /etc/pve/lxc/101.conf
arch: amd64
cores: 2
dev0: /dev/dri/renderD128,gid=993
dev1: /dev/dri/card1,gid=44
features: nesting=1,keyctl=1
hostname: jellyfin
memory: 2048
mp0: /mnt/bindmounts/media,mp=/mnt/Media/
net0: name=eth0,bridge=vmbr0,hwaddr=BC:24:11:CA:37:CB,ip=dhcp,type=veth
onboot: 1
ostype: ubuntu
rootfs: local-lvm:vm-101-disk-0,size=16G
swap: 512
tags: community-script;media
timezone: [REDACTED]
unprivileged: 1
Code:
root@pve:~# cat /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
UUID=ABAE-9F76 /boot/efi vfat defaults 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0
192.168.20.8:/Media /mnt/bindmounts/media nfs defaults,_netdev 0 0
Code:
root@pve:~# ls -la /mnt/bindmounts/
total 12
drwxr-xr-x 3 root root 4096 Feb 8 10:19 .
drwxr-xr-x 5 root root 4096 Feb 7 20:49 ..
drwxrwsrwx+ 4 root root 4096 Feb 7 18:13 media