You spun up a new Proxmox LXC and after hours of configuring bind mounts, permissions, uid/gid mapping, etc. it finally works! But now you face a new problem:
The current guest configuration does not support taking new snapshots
This is because Proxmox only supports taking snapshots if all attached drives support snapshots. Since your bind mount does not support snapshots/Proxmox does not know what to do with it, you can not take snapshots for the LXC.. Unless?
In this post, we will show you how to successfully allow LXCs with bind mounts to be able to take snapshot backups.
Allow LXC with Bind Mounts to Snapshot
To circumvent this issue, load up your favorite text editor and edit your LXC config file
Now replace the following line:
With this line:
lxc.mount.entry: /host/path local/path none bind 0 0
PLEASE NOTE the leading backslash is missing from local/path!!!
This will tell Proxmox to ignore this mount. This format is usually used for sharing a Host GPU with an LXC (alongside lxc.cgroup2.devices.allow and lxc.idmap) but we can use it to tell Proxmox to ignore this bind mount as well 🙂
Just beware of when you migrate this LXC to a new node without the same mount location!!
That’s it! You have successfully allowed your LXC with Bind Mounts to Snapshot!
Now you can go on with your life and do other things like Install Proxmox Backup Server 2 on an LXC Container.