Hi,
Some of my unprivileged LXCs are using data from SMB shares. Because mounting SMB shares inside the LXC isn't possible, I mounted the SMB shares directly to the host (fstab entry) and bind-mounted that mountpoint into my LXC. I changed the user/group remapping and everything works fine...except that I always need to run
What is the right way to auto mount a SMB share to the host at boot?
Like I said editing /etc/fstab doesn't work as I thought. Works fine with VMs (no need to manually run
I also thought about adding a CIFS-Storage using the proxmox GUI but I need to set the UID and GID and the GUI isn't offering options to set that.
This is my fstab entry:
I also encountered problems with CIFS storages (managed by the proxmox GUI) going into "unknown" state if the connection to the NAS is lost. I looked at the logs of my monitoring tool and the NAS was only offline for some minutes but proxmox didn't remount the shares half a day later. So it looks like my proxmox isn't trying to remount a SMB share until I reboot the complete server.
Is there some kind of deamon that I can use to auto mount SMB shares and that will monitor the share and remounts it automatically if a share is available again?
How are you handling SMB shares?
Some of my unprivileged LXCs are using data from SMB shares. Because mounting SMB shares inside the LXC isn't possible, I mounted the SMB shares directly to the host (fstab entry) and bind-mounted that mountpoint into my LXC. I changed the user/group remapping and everything works fine...except that I always need to run
mount -a
first or the shares woundn't be mounted and without the mounted shares the LXCs can't be started.What is the right way to auto mount a SMB share to the host at boot?
Like I said editing /etc/fstab doesn't work as I thought. Works fine with VMs (no need to manually run
mount -a
there) but not on the proxmox host itself.I also thought about adding a CIFS-Storage using the proxmox GUI but I need to set the UID and GID and the GUI isn't offering options to set that.
This is my fstab entry:
Code:
# <file system> <mount point> <type> <options> <dump> <pass>
//192.168.45.1/Ebooks /media/Ebooks cifs auto,rw,credentials=/root/.smb_ebooks,uid=1102,gid=1102,file_mode=0660,dir_mode=0770 0 0
I also encountered problems with CIFS storages (managed by the proxmox GUI) going into "unknown" state if the connection to the NAS is lost. I looked at the logs of my monitoring tool and the NAS was only offline for some minutes but proxmox didn't remount the shares half a day later. So it looks like my proxmox isn't trying to remount a SMB share until I reboot the complete server.
Is there some kind of deamon that I can use to auto mount SMB shares and that will monitor the share and remounts it automatically if a share is available again?
How are you handling SMB shares?
Last edited: