Proxmox Bind Mounts for LXC Containers

Linux Containers (LXCs) are used for lightweight, efficient Linux environments that need full OS features. They share the host’s kernel and are great for resource-constrained servers. Hard drives cannot be passed through to LXCs. They are mounted on the host then use a Bind Mount to make them available to the LXC. The LXC .conf file (e.g. /etc/pve/lxc/100.conf) defines the mount point (e.g. mp0: /mnt/storage,mp=/mnt/storage).

By default, LXCs are created as unprivileged and file permissions show owner as nobody:nobody. Change the owner on the host to 100000:10000 (chown -R 100000:100000 /mnt/storage). Use ‘chmod -R 755 /mnt/storage’ to ensure read/write access.

The best practice for datacenter storage is to mount the drive on the host and use ‘directory’ when adding storage to datacenter.