Samba Share doesn't mount after "reboot"

Hi all,

Im having the same issue as this NFS mount fails at reboot post but with my samba share - after a power failure, when dietpi starts up, my samba share doesn’t mount.

I noticed this by the fact that Sonarr kept shouting at me saying it cannot find the share…
When looking in DietPi-Drive_Manager, my samba mount wasn’t there. After a refresh, it is there and Sonarr and deluge is happy.

I know the NFS post was sorted with MichaIng saying that this will be addressed in v6.29 - but then I read that the NFS and Samba mounts work differently.

Does that mean that I shouldn’t be experiencing this with a Samba share?

Hi,

you could have a look to /etc/fstab. usually it should have the automount flag. Means, the samba share should be mounted the moment you try to access it. So it’s not there right after boot, but should be if you access it.

Hi Joulinar,

Thanks for the prompt reply :slight_smile:

I have this:

# Please use "dietpi-drive_manager" to setup mounts
#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------
//192.168.0.2/TheMediaShare /mnt/samba cifs username=****,password=****,iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=3.1.1,_netdev,nofail

#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs defaults,size=1023M,noatime,nodev,nosuid,mode=1777 0 0
tmpfs /DietPi tmpfs defaults,size=10m,noatime,nodev,nosuid,mode=1777 0 0
tmpfs /var/log tmpfs defaults,size=50m,noatime,nodev,nosuid,mode=1777 0 0

#----------------------------------------------------------------
# MISC: ecryptfs, vboxsf (VirtualBox shared folder), bind mounts
#----------------------------------------------------------------


#----------------------------------------------------------------
# SWAPFILE
#----------------------------------------------------------------
/var/swap none swap sw 0 0

#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
PARTUUID=cb7b86f7-02 / ext4 noatime,lazytime,rw 0 1
PARTUUID=cb7b86f7-01 /boot vfat noatime,lazytime,rw 0 2

Well you are missing the automount flag. Hmm strange it should be there if you use Drive Manager. Can you try to add this to the end of you mount on /etc/fstab

noauto,x-systemd.automount

Great, will try that and let you know…

Just want to confirm Joulinar, add it with a “,” after “nofail”? so like this:

nofail,noauto,x-systemd.automount

yep that should work. I did a quick test on a demo system and for me it looks like this

//192.168.0.10/Share /mnt/samba cifs username=xxxx,password=xxxxn,iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=3.1.1,_netdev,nofail,noauto,x-systemd.automount

Thanks Joulinar

Rebooted the pi and didn’t have the error in Sonarr.
Went to DietPi-Drive_Manager and the share was there, didn’t have to refresh at all :stuck_out_tongue:

Thanks for the help, appreciate it!!

Stay healthy!!

Same to you. Enjoy Easter

Joulinar, right lets try this again…

This is happening again on my install…
It was all good and ten it started happening again a while ago - I can’t remember the exact date…

I will try your work around from earlier posts - and I am bust upgrading to v7.8.2.

This was merely a heads up… Maybe something changed in the internals and a previous update removed the fix you did ages ago… :man_shrugging:t3:

Ok, so after a reboot the samba share is still in Drive Manager…

We have been having crazy power cuts here, and it became such a pain having to add the samba share 3 times a day sometimes…


Will monitor this and hopefully the last update to v7.8.2 fix something…
Will keep you posted!

Ciao

better have a look into /etc/fstab to check how the mount is setup. And if you have so many power cuts, better to think on a uninterruptible power supply (UPS) to protect your devices.

https://en.wikipedia.org/wiki/Uninterruptible_power_supply