Prevent bind mount from being managed by Proxmox?

Bubbagump210

Member
Oct 1, 2020
53
33
23
45
I have an LXC container where I want to decouple the rootfs and a bind mount. I want to be able to backup, restore, and snapshot the rootfs completely separate from the bind mount. The bind mount I will then manage separately. The reasons being

* The bind mount is huge. Backups via PBS take forever as LXC doesn't have a dirty bitmap concept. Therefore I want to backup the bind mount via other means - ZFS replication.
* I want the rootfs to be able to be snapshotted and rolled back with out messing with bind mount so as to not mix the rootfs and bind mount ZFS snapshot dependencies.

Is it possible to have Proxmox mount the bind mount into the container but do none of the other management tasks with it?
 
Last edited:
In my experience, if the container mount point is not on a Storage managed by Proxmox, it is not managed by Proxmox. I just use a directory on the Proxmox host as a container mount point in the configuration file (/etc/pve/lxc/100.conf) like this: mp0: /zfs_mount_point_on_host,mp=/directory_in_container,size=0T. I have not tested this with with snapshots and such but back-ups only back-up the riootfs.
 
Last edited:
That is what I am using currently and it does snapshot the bind mount unfortunately. Also, when I restore the rootfs it appears to clobber the exiting bind mount with a new one based on the definition in the lxc.conf. Avoiding backup is easy as that is a check box in the GUI or by omitting backup=1 in the mp line. Its the snapshot and clobbering on restore part I can't find an answer on.
 
  • Like
Reactions: leesteken
For my containers that use a mount point to a directory on the host (I think it is called a bind mount point in the Wiki), I cannot make snapshots. It tells me "The current guest configuration does not support taking new snapshots" in the Snapshot tab of the container. At least it prevents me from clobbering the mount point.
I guess you want to use snapshot and a bind mount point? Maybe add something like lxc.mount.entry: /host_path local_path none bind 0 0 to the configuration file? This works for the /dev/dvb/ for TV-tuners for example (with also a lxc.cgroup2.devices.allow and lxc.idmap).

EDIT: It seems to work. Just changed a mp0: /xyz,mp=/abc to lxc.mount.entry: /xyz abc none bind 0 0 and it mounted fine and allows snapshots.
 
Last edited:
  • Like
Reactions: Bubbagump210

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!