LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   NFS doesn't export everything (https://www.linuxquestions.org/questions/linux-networking-3/nfs-doesnt-export-everything-225770/)

ejoftheweb 09-02-2004 12:32 PM

NFS doesn't export everything
 
I have two boxes at home, one (the client, my workstation) running Mandrake 10, the other (the server) running Gentoo 2004.2.

The server is headless and I use ssh to get a command line on it, that works fine. (I also use webmin).

I run NFS on the server and have exported the root directory (rw) so I can mount its filesystem under
/mnt/server in my workstation - I've put the appropriate entry in /etc/fstab, and mount and umount behave as expected. So far so good (if not terribly secure, but it's all local).

Now, I open two shells, one on the client, the other via ssh on the server.

In the client shell if I type

ls -l /mnt/server I get (almost) the same listing as typing ls -l / in the server shell - so the filesystem is mounted and browseable, up to a point.

But when I look into the subdirectories, it is very different. Actually there is a clue in the root listing because the number of files in each directory is different depending on whether it is viewed via the NFS mount or directly through the ssh shell.

Permissions doesn't seem to be the problem, because there are two files with identical ownership and permissions in the directory concerned - one shows up via NFS, the other doesn't.

The only line in /etc/exports on the server reads:


Code:

/      192.168.0.3(insecure,no_root_squash,rw)
I'm baffled but suspect there is something obvious I'm missing.

bobwall 09-02-2004 04:54 PM

Is that file on a different file system? I think NFS by default doesn't export files that reside on another file system from the root. (i.e. doesn't export /drive_c if /drive_c is on an ntfs partition).

ejoftheweb 09-02-2004 05:30 PM

Thanks, bobwall...

The server filesystem is entirely ext3, but the directory I'm most concerned with (/opt on the server) is on a different partition... so maybe nfs doesn't recognise that /dev/hde8 is mounted on /opt ... it would explain the baffling inconsistency.

So, next question, how do I get nfsd on the server to recognise the filesystem as described in the server's /etc/fstab? Is there an option to set?

If anyone reading this has the answer readily to hand I'd be very grateful for an overnight reply (it's way past my bedtime here) which would save me some time googling for it tomorrow morning ... when I really should be working.

bobwall 09-02-2004 05:41 PM

try adding nohide to the mount options in fstab

bobwall 09-02-2004 05:44 PM

BTW, nohide is not a very good. See http://linux.about.com/library/cmd/blcmdl5_exports.htm

ejoftheweb 09-03-2004 03:29 AM

Thanks for this bobwall.

After reading up I've no reconfigured it so that each server mount point is exported separately and it seems to work, for now at least and on what I need to do, if not as simply and as elegantly as I'd hoped...


All times are GMT -5. The time now is 04:11 PM.