Problems reconnecting to samba shares

Yodl007

New Member
Hello guys and girls, i have a following beginner problem:

I have 2 machines both running Linux, one is my main machine, the other one is used for storage, downloading, etc. I have multiiple samba shares on this machine. And the machine is NOT always on - i suspend it when i don't need it. On my main machine I have those samba shares mounted via fstab at boot.

The main problem is this:
A lot of the times after i put the second machine through the motions (sometimes running, other times suspended) the shares are not mounted on the first main machine (when the second machine is running ofcourse) and the aplication i tried to connect to them (Nemo, SMPlayer,...) freezes completely and needs to be killed.

Are there switches i need to use when mounting via fstab that:
- specifies the timeout and retries so my whole machine does not lock up if i accidentally try to access those mounts when the second machine is off,
- tries to remount the samba shares if that happens.

Or there is some other solution to this?

The entries in my fstab currently look like this:

//IP/ShareName /mnt/Folder1 cifs username=xxxxxxx,password=xxxxxx,x-systemd.automount 0 0

I didn't have the same problem with windows reconecting to those shares (one in a while the problem apparead - about once evey 3 months and puting windows machine to sleep and resuming again solved it).
 


wizardfromoz

Super Moderator
Staff member
Gold Supporter
G'day @Yodl007 and welcome to linux.org :)

I do not use Samba myself, so cannot answer your question, but I am moving this Thread (with a re-direct) to General Server, where it may attract more qualified answers.

Good luck

Chris Turner
wizardfromoz
 

Yodl007

New Member
Thank you! So noone is having the same issue ? :(

To add another symptom: Not only are shares not accesible and the app used to go to them freezes, the parent folder /mnt/same thing happens when i try to acces the parent folder of shares (/mnt/).

I also tried to tweak the fstab but no changes:

/192.168.0.2/SHARENAME1 /mnt/SHARENAME1 cifs vers=3.0,uid=1000,gid=1000,credentials=/etc/smb-credentials 0 0
 

TechnoJunky

Silver Member
Silver Supporter
I don't exactly have an answer for you. But it sounds like the issue really resides with your Linux computers rather than Windows. In your OP you say you don't have that problem with windows reconnecting. So I'm assuming the reason you're using Samba is because you need it to connect as well. I don't use Samba so I can't say for sure what is happening, but I do have an NFS server and don't experience what you're referring to with it. One possible solution is to setup NFS on that server also and have it point to the same share. Use Samba for your Windows computer(s) and NFS for the Linux ones. NFS has better performance than Samba. If you're interested, this is the article/instructions I used to set it up on my network https://www.howtoforge.com/how-to-configure-a-nfs-server-and-mount-nfs-shares-on-ubuntu-14.04. And this is in my fstab
'ServerName:/mnt/md1 /mnt/nfs nfs auto,rw,user,sync,suid,dev,exec 0 0'.
 

Members online


Latest posts

Top