Solved

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

Posted on 2004-09-14
5
482 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
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 (http://www.tldp.org/HOWTO/Automount.html).  Good luck, and let me know if this works for you.
0
 

Author Comment

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

Expert Comment

by:DominicCronin
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.
0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

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

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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

733 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