Samba: workstation & server both show mount, but some types of access fail

Posted on 2004-09-14
Last Modified: 2012-06-21
Samba 2.2.7a on RH 9.0
Installed, working partially

Three workstations seem to be working fine. A fourth one, with identical login fails when accessing, even for something as simple as ls /mnt/server1

The same error is repeated over and over, changing only generation # (pid stays same)

   SMB server not responding
   smb_get_length: recv error = 5
   smb_trans2_request: result = -5, setting invalid
   smb_retry: successful, new pid=<same number>, generation=<last_number++>
   smb_proc_readdir_long: error=-5, retrying

and continues until ctrl-c'ed

Just tested this. The ls did as above. A small file copy worked (cp /mnt/server1/foo/bar gotit). Running a program and opening the same file r/w also worked. A cd /mnt/server1/foo also worked, as did cd /mnt/server1... but then ls while in that directory resulted in the error loop again.

Ooops - I figured it out; it turns out the other three w/s exhibit the same problem, but they don't go to the top level of the share at all, so it didn't show up until I did the same test from them. What's happening is that the mounted shared directory itself contained a dead mount to another machine. The problem is cured by unmounting the dead one.

But that brings up another question: is there a way to automagically unmount a share when it disappears (for whatever reason - hardware failure, software failure, wetware failure...)?

Question by:markofenstein

Accepted Solution

ivyfranklin earned 500 total points
ID: 12061037
From the post above it appears that your question is:

Is there a way to automagically unmount a share when it disappears (for whatever reason - hardware failure, software failure, wetware failure...)?

I don't know of any direct solutions to this problem.  The best solution that I know of would be to do all of these mounts through the automounter (aka autofs).  Then after a specified timeout (30 mins perhaps), you could setup the automounter to dismount the directory, and whenever the mount point is accessed, even if it isn't currently mounted (due to timeout, reboot, umount, etc)  the mount point will be automagically remounted without any user intervention.  You can find a brief HOWTO on the automounter at the Linux Documentation Project (  Good luck, and let me know if this works for you.

Author Comment

ID: 12113993
thank you for your answer but I was able to figure it out by myself.  thanks

Expert Comment

ID: 12265608
markofenstein - No offence or anything, but I don't think EE will allow you to leave a question like that. At some point the moderators will be along insisting that the question gets closed, so while I'm here I thought I'd explain how it works. The general aim is that EE should become a repository of good, tried and tested, answers to questions. In this case ivyfranklin has offered a knowledgable suggestion, which in my view would be interesting to anyone coming along here with the same problem.

If you find the answer yourself, it's possible to ask the moderators for a refund of the points (or possibly even a partial refund, but you'd have to ask about that), but the rules say that to do this you should submit the answer that worked for you. Obviously, this makes sense, as then it becomes available for everyone, and in general a tested answer is more useful than a suggestion, however good.

On the other hand, you could simply give the points to ivyfrankin.

If you want a moderator to drop by and help, post a 0 points question in Community Support, giving a link to this question.

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to add a new SAN disk to a linux vmware box 8 29
BIND rate-limit - DNS for web server requests 29 141
Issue to mail 11 74
High Bandwidth Usage 6 31
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now