Samba Share doesn't mount after "reboot" Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
User avatar
finch_6
Posts: 34
Joined: Tue Sep 04, 2018 7:21 pm

Samba Share doesn't mount after "reboot"

Post by finch_6 »

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?
DietPi on a Raspberry Pi 3 B+ running:
- Sonarr
- Deluge
- Jackett
User avatar
Joulinar
Posts: 2093
Joined: Sat Nov 16, 2019 12:49 am

Re: Samba Share doesn't mount after "reboot"

Post by Joulinar »

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.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
finch_6
Posts: 34
Joined: Tue Sep 04, 2018 7:21 pm

Re: Samba Share doesn't mount after "reboot"

Post by finch_6 »

Hi @Joulinar,

Thanks for the prompt reply :)

I have this:

Code: Select all

# 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
Last edited by finch_6 on Wed Apr 08, 2020 2:35 pm, edited 1 time in total.
DietPi on a Raspberry Pi 3 B+ running:
- Sonarr
- Deluge
- Jackett
User avatar
Joulinar
Posts: 2093
Joined: Sat Nov 16, 2019 12:49 am

Re: Samba Share doesn't mount after "reboot"

Post by Joulinar »

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

Code: Select all

noauto,x-systemd.automount
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
finch_6
Posts: 34
Joined: Tue Sep 04, 2018 7:21 pm

Re: Samba Share doesn't mount after "reboot"

Post by finch_6 »

Great, will try that and let you know...
DietPi on a Raspberry Pi 3 B+ running:
- Sonarr
- Deluge
- Jackett
User avatar
finch_6
Posts: 34
Joined: Tue Sep 04, 2018 7:21 pm

Re: Samba Share doesn't mount after "reboot"

Post by finch_6 »

Joulinar wrote: Wed Apr 08, 2020 2:34 pm 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

Code: Select all

noauto,x-systemd.automount
Just want to confirm @Joulinar, add it with a "," after "nofail"? so like this:

Code: Select all

nofail,noauto,x-systemd.automount
DietPi on a Raspberry Pi 3 B+ running:
- Sonarr
- Deluge
- Jackett
User avatar
Joulinar
Posts: 2093
Joined: Sat Nov 16, 2019 12:49 am

Re: Samba Share doesn't mount after "reboot"

Post by Joulinar »

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

Code: Select all

//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
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
finch_6
Posts: 34
Joined: Tue Sep 04, 2018 7:21 pm

Re: Samba Share doesn't mount after "reboot"

Post by finch_6 »

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 :P

Thanks for the help, appreciate it!!

Stay healthy!!
DietPi on a Raspberry Pi 3 B+ running:
- Sonarr
- Deluge
- Jackett
User avatar
Joulinar
Posts: 2093
Joined: Sat Nov 16, 2019 12:49 am

Re: Samba Share doesn't mount after "reboot"

Post by Joulinar »

Same to you. Enjoy Easter
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply