Hello everyone,
I am new on Proxmox. I installed it last week after tips from a colleague. I previously used LXC via LXD on a stock Debian. So I am not totaly a newbie about container. On my previous installation, I shared a host directory with a Nextcloud LXC container. The goal is to backup the data from the host and from a separate physical disk than the OS and containers disk. It worked on LXC/LXD.
Yesterday, I tried to do the same on Proxmox. I followed :
https://forum.proxmox.com/threads/mount-host-directory-into-lxc-container.66555/
https://pve.proxmox.com/wiki/Unprivileged_LXC_containers#Using_local_directory_bind_mount_points
I succesfully had the mount point betwee, host and LXC container, no problem on that.
But the UID/GID mapping failed, and so the LXC container did not reboot. I had to suppress my configuration to have the container booting.
What I would like to have is :
I tried a lot of things in the file /etc/pve/lxc/101.conf, such as
I am also pretty lost with files subuid and subgid, and tried to comment the root line to put
Any help to really understand what's wrong and what I must did will be appreciate. Thanks by advance.
I am new on Proxmox. I installed it last week after tips from a colleague. I previously used LXC via LXD on a stock Debian. So I am not totaly a newbie about container. On my previous installation, I shared a host directory with a Nextcloud LXC container. The goal is to backup the data from the host and from a separate physical disk than the OS and containers disk. It worked on LXC/LXD.
Yesterday, I tried to do the same on Proxmox. I followed :
https://forum.proxmox.com/threads/mount-host-directory-into-lxc-container.66555/
https://pve.proxmox.com/wiki/Unprivileged_LXC_containers#Using_local_directory_bind_mount_points
I succesfully had the mount point betwee, host and LXC container, no problem on that.
But the UID/GID mapping failed, and so the LXC container did not reboot. I had to suppress my configuration to have the container booting.
What I would like to have is :
Host | Container | |
Mount point | /data/data_nextcloud | /var/data_nextcloud |
Mount point owner | user with UID 1000 GID 1000 | www-data with UID 33 GID 33 |
I tried a lot of things in the file /etc/pve/lxc/101.conf, such as
Code:
# uid map: from uid 0 map 1005 uids (in the ct) to the range starting 100000 (on the host), so 0..1004 (ct) → 100000..101004 (host)
lxc.idmap = u 0 100000 33
lxc.idmap = g 0 100000 33
# we map 1 uid starting from uid 1005 onto 1005, so 1005 → 1005
lxc.idmap = u 1000 33 1
lxc.idmap = g 1000 33 1
# we map the rest of 65535 from 1006 upto 101006, so 1006..65535 → 101006..165535
lxc.idmap = u 34 101006 64530
lxc.idmap = g 34 101006 64530
I am also pretty lost with files subuid and subgid, and tried to comment the root line to put
my_host_user:1000:1
Any help to really understand what's wrong and what I must did will be appreciate. Thanks by advance.