~/blog/sharing-nfs-with-multiple-proxmox-lxcs
Published on

Sharing NFS share with multiple Proxmox LXCs

167 words1 min read
Authors
  • avatar

Mount the NFS share on the Proxmox

  • Add the NFS share as a storage location in the Proxmox web interface (Datacenter > Storage > Add > NFS)

Configure bind mounts in LXC container

  • Shut down the LXC container to add the mount to
  • Edit the containers configuration file (e.g. /etc/pve/lxc/<container_id>.conf)
  • Add a mp0 line to the configuration, specifying the mount point on the host and the mount point within the container. For example:
# mount the NFS share located at `/mnt/pve/my_nfs_share/` on the Proxmox host to `/mnt/data/` within the LXC container
mp0: /mnt/pve/my_nfs_share/,mp=/mnt/data/
  • Repeat for each LXC container needing access to the NFS share

Start the LXC container

  • Start the LXC container, and verify that the change was successful with df -h