Looking for help setting up mounting SMB shares ( keeping mounted after power loss, reboot)

michaeljkent090

New Member
Mar 16, 2023
14
1
3
Hello!

I have spent the past few weeks getting my new home server up and running. I'm currently looking for advice /help with setting up some sort of system to keep my SMB shares mounted on various Ct's after reboot or power loss.

Currently I have multiple SMB share linked with folder in my MNT folder using

mount -t cifs -o user=SMBUSER //NASIP/SMBSHARE NAME /mnt/LINKEDFOLDERNAME

then

pct set CT# -mp0 /mnt/LINKEDFOLDERNAME,mp#=shared

this has worked great for having my smbs shared to multiple unprivileged containers .etc.

Issue is If I reboot my server or have a power failure I have family that relyo n the server calling me and I have to drop into sehll and reapply the second command across multiple Cts.

Could anyone share some knowledge on how to automate this / do this better?

I'm currently a GUI warrior beginning to learn terminal. So If I have to use terminal please go easy.

Thank you.
 
Can’t you just add the SMB shares to the GUI in Datacenter -> Storage - then add the storage to your CT, that makes it a dependency inside Proxmox instead of messing about with fstab (since systemd that file is synthesized and dependencies like _netdev no longer work)
 
I probably can. I just looked all over and could only seem to find a tutorial on youtube to do it this way. Ill see if I can mange to do it your way in the gui. Thanks!
 
When you setup the storage, you can set the content as to what you want to use the storage for, make sure to select container. You can then use it as a target during container setup.
 
Ive done that Ive mounted it in proxmox as a container. Im just lost at when you say use it as a target during the container setup? So are you saying id have to rebuild all my containers? Im looking to have it mounted to preexisiting cts. Unfortunately my family is no tech literate enough to reconnect to jellyfin.etc.

I have it mounted in proxmox but cant for the life of me access it with containers such as syncthing and jellyfin....