2005-05-19 01:13:45

by Thomas Mann

[permalink] [raw]
Subject: nfs v4 exports

hello,

i use gentoo linux and i exported this directories

root@Server puchu # exportfs -v
/home/puchu Tux(rw,wdelay,insecure,root_squash,no_subtree_check,fsid=0)
/mnt/backup Tux(rw,wdelay,insecure,root_squash,no_subtree_check,fsid=0)


but when i do (a on the client)

mount -t nfs4 server:/ /mnt/server

i can only see the content of /home/puchu....

with wrong group and owner ...think its the nobody user...explained in man
exports...but the gid and guid is the same on the client and on the server
for all files

user: puchu
groups: users
gid: 100
uid: 1000

what can i do about this?

greets puchu



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2005-05-19 01:31:20

by Trond Myklebust

[permalink] [raw]
Subject: Re: nfs v4 exports

to den 19.05.2005 Klokka 03:14 (+0200) skreiv Rauch Wolke:
> hello,
>
> i use gentoo linux and i exported this directories
>
> root@Server puchu # exportfs -v
> /home/puchu Tux(rw,wdelay,insecure,root_squash,no_subtree_check,fsid=0)
> /mnt/backup Tux(rw,wdelay,insecure,root_squash,no_subtree_check,fsid=0)
>
>
> but when i do (a on the client)
>
> mount -t nfs4 server:/ /mnt/server
>
> i can only see the content of /home/puchu....

What did you expect to see?

Firstly, you can only have one directory with fsid=0.
Secondly, you can only export a single directory tree.
Lastly, you have to export mount points that you want to allow the
client to cross using the "nohide" option.

IOW: if you do something like

mkdir /home/puchu/backup
mount --bind /mnt/backup /home/puchu/backup

and then set /etc/exports to

/home/puchu Tux(rw,wdelay,insecure,root_squash,no_subtree_check,fsid=0)
/home/puchu/backup Tux(rw,wdelay,insecure,root_squash,no_subtree_check,nohide,fsid=1)

then your client will see both directories...

> with wrong group and owner ...think its the nobody user...explained in man
> exports...but the gid and guid is the same on the client and on the server
> for all files

You also need to set up idmapd on both client and server. See for
instance
http://www.vanemery.com/Linux/NFSv4/NFSv4-no-rpcsec.html

Cheers,
Trond



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs