• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 487
  • Last Modified:

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

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...)?

0
markofenstein
Asked:
markofenstein
1 Solution
 
ivyfranklinCommented:
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 (http://www.tldp.org/HOWTO/Automount.html).  Good luck, and let me know if this works for you.
0
 
markofensteinAuthor Commented:
thank you for your answer but I was able to figure it out by myself.  thanks
0
 
DominicCroninCommented:
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.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now