NFS4 problems -

Ed Greshko Ed.Greshko at greshko.com
Sat Dec 1 13:34:46 UTC 2012


On 12/01/2012 08:51 PM, Bob Goodwin - Zuni, Virginia, USA wrote:
> On 01/12/12 07:39, Ed Greshko wrote:
>> On 12/01/2012 08:25 PM, Bob Goodwin - Zuni, Virginia, USA wrote:
>>> > On 01/12/12 05:04, Ed Greshko wrote:
>>>> >> This is becoming a bit confusing.....  Everything that I've included in this message has been
>>>> >> information on my "SERVER".  While it appears that you've included information from a "SERVER"
>>>> >> as well as "CLIENT".  I think.....
>>>> >>
>>>> >> BOX8 = SERVER
>>>> >> BOX7 = CLIENT
>>>> >>
>>>> >> Yes?
>>> >
>>> >    Yes, I have done nothing with fstab on the server; is that a problem?
>>> >
>> I'm beginning to think that is where the disconnect lies.  And, why you're using excess space on /.
>>
>> On Box8 could you supply the output of "mount" as well as "ls -l /nfs4exports"
>>
>    [bobg at box8 ~]$ mount
>    /dev/mapper/vg_box8-lv_root on / type ext4 (rw)
>    proc on /proc type proc (rw)
>    sysfs on /sys type sysfs (rw)
>    devpts on /dev/pts type devpts (rw,gid=5,mode=620)
>    tmpfs on /dev/shm type tmpfs
>    (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
>    /dev/sda1 on /boot type ext4 (rw)
>    /dev/mapper/vg_box8-lv_home on /home type ext4 (rw)
>    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
>    sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
>    nfsd on /proc/fs/nfsd type nfsd (rw)
>
>
>    Aha! a typo:
>
>    [bobg at box8 ~]$ ls -l /nfs4exports
>    ls: cannot access /nfs4exports: No such file or directory
>
>    I dropped the "4"
>
>    [bobg at box8 ~]$ ls -l /nfsexports
>    total 40
>    drwxrwxr-x.  2 1000 1000 4096 Nov 30 13:45 check
>    drwxrwxrwx.  2 root root 4096 Nov 28 09:22 data
>    drwxrwxr-x.  3 1000 1000 4096 Nov 30 13:48 Dell
>    drwxrwxr-x.  2 1000 1000 4096 Nov 30 13:50 DigiCam
>    drwxrwxr-x.  8 1000 1000 4096 Nov 30 13:53 Documents
>    drwxrwxr-x.  9 1000 1000 4096 Nov 30 14:03 Download
>    drwxrwxr-x.  2 1000 1000 4096 Nov 30 13:54 evergreene
>    drwxrwxr-x.  5 1000 1000 4096 Nov 30 13:55 gramps
>    drwxrwxrwx.  4 root root 4096 Nov 30 13:45 home
>    drwxrwxr-x. 11 1000 1000 4096 Nov 30 14:17 lectures
>

Yep, you've pretty much misunderstood the information which was being conveyed in the link I originally sent you.  You placed actual data under /nfsexports.

I would.....

unmount the exported file system from all clients.  (umount on box7 for example)

Then on the server I'd move /etc/exports to /etc/exports-orig and run "exportfs -r" and confirm by running "exportfs" that they are no longer exported.

Also on the server I'd proceed to move all the directories out of /nfsexports to /home

cd /nfsexports
mv check data Dell DigiCam Documents Download evergreene gramps home lectures /home

(Yes, you'll end up with a /home/home.   You don't really have any user home's under there to you?)

The I'd set up the directory structure under /nfsexports by doing

cd /nfsexports
mkdir -m 1777 data
mkdir -m 1777 home

Then, still on the server, I would append these lines to /etc/fstab

# bind mounts
/home/data               /nfs4exports/data   none    rw,bind 0 0
/home/home          /nfs4exports/home     none    rw,bind 0 0

Then I would

mount /nfs4exports/data
mount /nfs4exports/home

Then, when you issue the just the "mount" command you should see included....

/home/data  on  /nfs4exports/data  type none (rw,bind)
/home/home on  /nfs4exports/home  type none (rw,bind)

Or something similar....

Then I'd move /etc/exports-orig back to /etc/exports but I would change /nfs4exports back to ro.  And then do "exports -rv". 

Now..... If you just want all of the exported information to be under a single directory on box7 (client) I would do....on box7

mkdir /mnt/box8
mount 192.168.1.8:/nfsexports  /mnt/box8

And, of course, make corresponding changes in the /etc/fstab on box7




-- 
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -- Rick Cook, The Wizardry Compiled


More information about the users mailing list