Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-09-14
5
Medium Priority
?
486 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 3

Accepted Solution

by:
ivyfranklin earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

636 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