NFS Mounting works for one folder, not for another.
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
NFS Mounting works for one folder, not for another.
I have been having a strange problem with my Fedora Core 2 distro.
In house, I have a RH9.1 Server that shares two directories, /files and /media, using Samba for the windows clients and NFS for the linux ones. A few days ago, I was running FC2 on my laptop, and the NFS mountings worked just fine. Now, however, I have switched the laptop back to XP and have installed FC2 on my main PC.
I have fstab setup to mount both the remote /files and /media directories, and it mounts /media just fine. However, /files won't mount and exits with "Permission Denied".
If I check the kernel messages, it says that I have:
> localhost kernel: nfs: RPC call returned error 101
The directories are virtually identical - the uid and gid are uniform across both, and nfs on the server seems to be setup fine. I can connect via loopback to the nfs server if i'm ssh'ed into it, and view the files, etc.
I wonder if somehow the server hasn't flushed the old /etc/exports file from memory or something, although I have repeatedly restarted nfs. There was a time a few days ago when I restricted the /files directory to the localhost interface, but that's ancient history now and I have restarted the service probably twenty times since then.
OUTPUT OF tail /var/log/messages (server side, relavant portions)
-------------------------------
Jul 3 15:44:54 isengard rpc.mountd: authenticated mount request from 192.168.1.105:759 for /files (/files)
Jul 3 15:44:54 isengard rpc.mountd: getfh failed: Operation not permitted
PERMISSIONS of /files and /media (server side)
---------------------------------
4 drwxrwxrwx 12 root root 4096 Jun 29 13:50 files
4 drwxrwxrwx 10 root root 4096 Jun 15 13:01 media
PERMISSIONS of mount points /files and /media (client side)
----------------------------------
4 drwxrwxrwx 2 root root 4096 Jun 30 16:58 files
4 drwxrwxrwx 10 root root 4096 Jun 15 13:01 media
OUTPUT OF exportfs -ua (server side)
----------------------------------------------------
(null output)
OUTPUT OF exportfs -a (server side)
---------------------------------------------------
exportfs: No 'sync' or 'async' option specified for export "192.168.1.0/255.255.255.0:/mnt/fedora".
Assuming default behaviour ('sync').
NOTE: this default has changed from previous versions
exportfs: No 'sync' or 'async' option specified for export "192.168.1.0/255.255.255.0:/media".
Assuming default behaviour ('sync').
NOTE: this default has changed from previous versions
exportfs: No 'sync' or 'async' option specified for export "192.168.1.0/255.255.255.0:/files".
Assuming default behaviour ('sync').
NOTE: this default has changed from previous versions
exportfs: No 'sync' or 'async' option specified for export "localhost:/files".
Assuming default behaviour ('sync').
NOTE: this default has changed from previous versions
192.168.1.105:/files: Invalid argument
OUTPUT OF showmount -e isengard (client side)
--------------------------------------------------
Export list for isengard:
/media 192.168.1.0/255.255.255.0
/files/FedoraCore 192.168.1.0/255.255.255.0
/home/davidandjustine 192.168.1.0/255.255.255.0
/files 192.168.1.0/255.255.255.0,localhost.localdomain
Could this error be caused because I am already mounting /files/FedoraCore?
Resolution to this Problem: The NFS daemon won't let you attach to a folder when a subfolder is already mounted elsewhere.
As the configuration files noted, I wasn't actively mounting anything in this way, hence my confusion. However, according to the server, I WAS mounted to /files/FedoraCore. The only way I could convice it otherwise was to remove everything in /var/lib/nfs.
Doing so has "broken" RPC, since rmtab is (apparently) not autogenerated if it is missing. However, the mounting now works, and I am happy for the time being, until I get around to installing a new version of NFS and replacing the lost files.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.