Hello! I've created a new LXC and mounted my external USB HDD drives via bindmount. The LXC is privileged (at least I unticked `unprivileged container` at creation).
I created a system user who has absolutely no access to the mounted drives - can't even chown -> it says it's a read-only filesystem. The `root` user has access however.
The drives are mounted like this:
I don't really know what else to do? I read bindmounts wouldn't work for an unprivileged container, but it's privileged? Weirdly I also had to follow this guide to install tailscale in an unprivileged container: https://tailscale.com/kb/1130/lxc-unprivileged/
Edit: cat /etc/pve/lxc/103.conf
I created a system user who has absolutely no access to the mounted drives - can't even chown -> it says it's a read-only filesystem. The `root` user has access however.
Code:
$# chown -R emby /media/drive2
changing ownership of '/media/drive2/...': Read-only file system
The drives are mounted like this:
Code:
mp0: /dev/sdb2,mp=/media/drive1,mountoptions=noatime
mp1: /dev/sdc2,mp=/media/drive2,mountoptions=noatime
mp2: /dev/sdd2,mp=/media/drive3,mountoptions=noatime
mp3: /dev/sde1,mp=/media/drive4,mountoptions=noatime
I don't really know what else to do? I read bindmounts wouldn't work for an unprivileged container, but it's privileged? Weirdly I also had to follow this guide to install tailscale in an unprivileged container: https://tailscale.com/kb/1130/lxc-unprivileged/
Edit: cat /etc/pve/lxc/103.conf
Code:
arch: amd64
cores: 4
hostname: media
memory: 4096
mp0: /dev/sdb2,mp=/media/drive1,mountoptions=noatime
mp1: /dev/sdc2,mp=/media/drive2,mountoptions=noatime
mp2: /dev/sdd2,mp=/media/drive3,mountoptions=noatime
mp3: /dev/sde1,mp=/media/drive4,mountoptions=noatime
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=xxx,ip=dhcp,ip6=dhcp,type=veth
ostype: ubuntu
rootfs: local-lvm:vm-103-disk-0,size=16G
swap: 512
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file
lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
Last edited: