Bind mounts and unpriviledged lxc: how to mount share under /mnt/bindmounts

kiloxpor

New Member
May 5, 2021
8
0
1
50
Hi,

I am trying to give an unpriviledged lxc container access to a NFS share (a folder in my synology nas). This NFS share is mounted in my proxmox host under /mnt/pve/share automatically when I add it through the gui in datacenter/storage/add/NFS. However, according the the documentation here "for security reasons, bind mounts should only be established using source directories especially reserved for this purpose, e.g., a directory hierarchy under /mnt/bindmounts."

But how do I mound the NFS share under /mnt/bindmounts instead of the current or default /mnt/pve?

Thanks.
 
Last edited:
I think PVE will always mount stuff to /mnt/pve. If you want to mount it somewhere else you could add a line to your /etc/fstab or create a systemd service so the NFS share gets mounted at boot under the path you specify.
 
  • Like
Reactions: kiloxpor
I think PVE will always mount stuff to /mnt/pve. If you want to mount it somewhere else you could add a line to your /etc/fstab or create a systemd service so the NFS share gets mounted at boot under the path you specify.
Thanks a lot for the reply. I went the systemd route and it works :)