9

I have quite an odd issue where my nested NFS mounts just disappear randomly from time to time.

The fstab entries look somewhat like this:

nfs:/home /home nfs rw,hard,intr,rsize=32768,noatime,nocto,proto=tcp 0 0
nfs:/bigdir /home/bigdir nfs rw,hard,intr,rsize=32768,noatime,nocto,proto=tcp,bg 0 0

The issue is that from time to time the "/home/bigdir" folder will be empty, even though mtab think that the share is still mounted. nfsstat et. al. do also think the share is still mounted.

Only thing that works is by unmounting, and then (re)mounting the bigdir share.

The server side is a NetApp. The client side is RHEL5.5, 2.6.18-194 kernel (Yes, I know 5.8 is out, but as far as I can see there are no erratas for this particular issue).

I can use various hacks like automount, or mounting it to another path and then using --mount bind, but I would like to fix the underlying issue.

1

You mentioned trying automount. Did you take the /home/bigdir entry out of autofs? I'm wondering if you left it in there by accident and automount is timing it out. I'm not sure how an entry in both fstab and autofs would play out (though I'd guess fstab would win and it would be treated as a static mount).

Also, does df -h show /home/bigdir as mounted as well?

  • Hi, thank you for your answer. I havent tried using automount yet as we do not normally have any needs for it. It was mostly to get some automation for mounting/unmounting the share when not used, it might have helped circumvent the problem. df did indeed show /home/bigdir as well. – espenfjo Jun 29 '12 at 21:50
1

It seems you wouldn't have to mount bigdir from the NFS share also. as you are already mounting home with bigdir nested in it. So then you should just have to

mount /home/bigdir /bigdir

Or even possibly just make a soft link?

  • This is not how NFS works. – womble Jan 4 '18 at 2:57
  • You are right: he would have to add the nohide tag – Octavian Jan 8 '18 at 23:39
  • Nope, nohide is for nested mounts on the server. – womble Jan 9 '18 at 2:29
1

I think the "underlying issue" cannot be corrected. When your /home remounts, for exmple due to connection problems, your nested mount becomes hidden, because the directory where it was mounted to is not exist (). I tink the best solution is to mount the nested share to another point, and use a symlink. This is the way I always do. Btw. crossmnt and nohide would be the best to include on server's exports and mount one share.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.