Proxmox supports the creation of custom mountpoints inside a lxc container straight from the proxmox container .conf file:
locate your container conf file under /etc/pve/lxc/<ID>.conf
and add the following:
mp0:/mount/point/on/host,mp=/mount/point/on/lxc
mp1:/another/mount/point/on/host,mp=/another/mount/point/on/lxc
thats it!
edit: another way, in the same file, as pointed out in the comments is:
lxc.mount.entry: /bkup bkup none bind,create=dir,optional 0 0
This method works with migrations!
Note: Do not put a ‘/’ before the target
People who use pve-zsync or have problems regarding the backup of the container might want to check out this alternative.
5 Comments