Solved

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

Posted on 2004-09-14
5
478 Views
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...)?

0
Comment
Question by:markofenstein
5 Comments
 
LVL 3

Accepted Solution

by:
ivyfranklin earned 500 total points
Comment Utility
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
 

Author Comment

by:markofenstein
Comment Utility
thank you for your answer but I was able to figure it out by myself.  thanks
0
 
LVL 6

Expert Comment

by:DominicCronin
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 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

11 Experts available now in Live!

Get 1:1 Help Now