[SOLVED] lxc add mount local directories not working?

RobFantini

Famous Member
May 24, 2012
2,018
104
133
Boston,Mass
Hello

at pve > resources > Add mount point , the option to type in a directory such as /bkup does not work.


Has adding a local directory changed from before?

pve vervision:
Code:
# pveversion -v
proxmox-ve: not correctly installed (running kernel: 4.15.18-18-pve)
pve-manager: 5.4-11 (running version: 5.4-11/6df3d8d0)
pve-kernel-4.15: 5.4-6
pve-kernel-4.15.18-18-pve: 4.15.18-44
pve-kernel-4.15.18-17-pve: 4.15.18-43
pve-kernel-4.13.4-1-pve: 4.13.4-26
corosync: 2.4.4-pve1
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: 1.2-2
libjs-extjs: 6.0.1-2
libpve-access-control: 5.1-11
libpve-apiclient-perl: 2.0-5
libpve-common-perl: 5.0-53
libpve-guest-common-perl: 2.0-20
libpve-http-server-perl: 2.0-13
libpve-storage-perl: 5.0-44
libqb0: 1.0.3-1~bpo9
lvm2: 2.02.168-pve6
lxc-pve: 3.1.0-3
lxcfs: 3.0.3-pve1
novnc-pve: 1.0.0-3
proxmox-widget-toolkit: 1.0-28
pve-cluster: 5.0-37
pve-container: 2.0-39
pve-docs: 5.4-2
pve-edk2-firmware: 1.20190312-1
pve-firewall: 3.0-22
pve-firmware: 2.0-6
pve-ha-manager: 2.0-9
pve-i18n: 1.1-4
pve-libspice-server1: 0.14.1-2
pve-qemu-kvm: 3.0.1-4
pve-xtermjs: 3.12.0-1
pve-zsync: 1.7-4
qemu-server: 5.0-54
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
zfsutils-linux: 0.7.13-pve1~bpo2
 
Well here I am unable to enter in a directory name.

Note - It could be that entering a directory name has not been possible for a long time. I vaguely remember that the following needed to be done from cli to the .conf:
Code:
lxc.mount.entry: /bkup/  bkup/  none bind,create=dir,optional 0 0

it has been years since I last tried to set mount points.
 
Note - It could be that entering a directory name has not been possible for a long time. I vaguely remember that the following needed to be done from cli to the .conf:
Code:
lxc.mount.entry: /bkup/ bkup/ none bind,create=dir,optional 0 0
it has been years since I last tried to set mount points.

That is the "LXC way", so this will always work (if entered correctly as for every lxc command).

Maybe you do not have the "correct backend storage" for the dialog? I'm running on ZFS here and the 'add mountpoint' option will add a mpX option to my configuration file that looks very ZFS specific:

Code:
mp0: zfs:subvol-1240-disk-1,mp=/var/lib/docker,size=16G
 
I'll look in to "correct backend storage" .

So I guess will need to enter the directory /bkup as a storage item then use as a mountpoint - I'll try that when back home.

thanks as always!
 
why doesn't it work exactly? can you take a screenshot of the mountpoint add window while this happens?
 
why doesn't it work exactly? can you take a screenshot of the mountpoint add window while this happens?

Hello Oguz,

I am traveling now and will send that to you on the weekend.

You could try this. try sharing /root or another directory that is not defined at pve storage.

thank you for the response.
 
it works for me. either you are having a weird bug or explaining your problem not so well.. in any case, i'll wait for your screenshot and we can see what's going wrong.
 
the type of mount I use is not available at pve web interface.

it may never have been, or was a long time ago.

so I had set these up manually 4 years ago , and when the time came to deal with because backup/restore does not set these up, i had forgotten it was a manual set up, and a possible bug that restore does not set these up

i use in .conf:
Code:
lxc.mount.entry: /ht/Shared  ht/Shared  none bind,create=dir,optional 0 0
lxc.mount.entry: /tv  tv  none bind,create=dir,optional 0 0
that per
Code:
man lxc.container.conf
...
# this section:

   MOUNT POINTS
       The mount points section specifies the different places to be mounted. These mount points will be  private  to  the
       container  and  won't  be  visible by the processes running outside of the container. This is useful to mount /etc,
       /var or /home for examples.
 
hi,

these kind of mounts are called `bind mount`.

and when the time came to deal with because backup/restore does not set these up, i had forgotten it was a manual set up, and a possible bug that restore does not set these up

in my tests, bind mounts were restored correctly (the ones that don't exist on host also were restored correctly)

maybe you should update

edit: maybe related with this bug[0], it's fixed in the newer versions

[0]: https://bugzilla.proxmox.com/show_bug.cgi?id=2270
 

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!