Re

I'll add to that debug session that it works if i add spud to exports
line and locally mount /usr/ports :
[EMAIL PROTECTED]:~/ #mount -t nfs spud:/usr/ports /tmp/blah/
[EMAIL PROTECTED]:~/ #touch /tmp/blah/test

And tcpdump log on lo0 :
[EMAIL PROTECTED]:~/ #tcpdump -s 65000 -i lo0 port nfsd or port sunrpc
tcpdump: listening on lo0, link-type LOOP
20:13:08.734530 spud.889 > spud.nfsd: xid 0x74c57a86 124 access fh
33,252/664798720 0002
20:13:08.734847 spud.nfsd > spud.889: xid 0x74c57a86 reply ok 120 access c 0002
20:13:08.734982 spud.889 > spud.nfsd: xid 0x74c57aba 120 getattr fh
33,252/3064333824
20:13:08.735117 spud.nfsd > spud.889: xid 0x74c57aba reply ok 112
getattr REG 644 ids 1000/9 sz 0x0
20:13:08.735230 spud.889 > spud.nfsd: xid 0x74c57ae3 128 lookup fh
33,252/664798720 "test"
20:13:08.735396 spud.nfsd > spud.889: xid 0x74c57ae3 reply ok 236
lookup fh 33,252/3064333824
20:13:08.735684 spud.889 > spud.nfsd: xid 0x74c57bbb 124 access fh
33,252/664798720 0002
20:13:08.735859 spud.nfsd > spud.889: xid 0x74c57bbb reply ok 120 access c 0002
20:13:08.736009 spud.889 > spud.nfsd: xid 0x74c57bd4 148 setattr fh
33,252/3064333824
20:13:08.736208 spud.nfsd > spud.889: xid 0x74c57bd4 reply ok 144 setattr

Landry

On 10/19/07, Landry Breuil <[EMAIL PROTECTED]> wrote:
> On 10/19/07, Jan Stary <[EMAIL PROTECTED]> wrote:
> > > > > Again: set WRKOBJDIR on the client side and you don't need
> > > > > to be writing in the remotely mounted tree at all.
> >
> > > I'm already setting WRKOBJDIR outside nfs-dir, the problem is more for
> > > /usr/ports/packages .. i'd like it to be shared too, to install the
> > > same package on various sparc64 for example. And this dir needs to be
> > > root-writable, as it uses sudo..
> >
> > You also need to set DISTDIR and PKGREPOSITORYBASE
> > - see examples in the FAQ.
>
> I now several workarounds and tweaks like this exists :) I just want
> to understand why this setup doesn't work.
>
> > > I'd put it outside nfs if i don't find a solution, but btw i'm more
> > > interested in understanding why -maproot=root doesn't work in my case
> >
> > Send your complete server:/etc/exports, client:/etc/fstab,
> > verbose log of server:mountd, server:nfsd, and a full (-s 65000) tcpdump
> > of the communication.
>
> server is spud, client for tests is renton (10.246.200.10).
> server:/etc/exports:
> /nfsroot/net_sparc64 -ro allison
> /nfsroot/open_sparc64 -ro swanney
> /usr/ports -maproot=0:0 renton swanney lizzy
>
> client fstab:
> spud:/usr/ports /usr/ports nfs rw,nosuid 0 0
>
> mountd -d output:
> Got line /nfsroot/net_sparc64 -ro allison
> Making new ep fs=0x0,0xfc214a5e
> doing opt -ro allison
> got host allison
> exporting /nfsroot/net_sparc64
> Got line /nfsroot/open_sparc64 -ro swanney
> Found ep fs=0x0,0xfc214a5e
> doing opt -ro swanney
> got host swanney.fr.homeunix.org
> exporting /nfsroot/open_sparc64
> Got line /usr/ports -maproot=0:0 renton swanney lizzy
> Found ep fs=0x0,0xfc214a5e
> doing opt -maproot=0:0 renton swanney lizzy
> got host renton.fr.homeunix.org
> got host swanney.fr.homeunix.org
> got host lizzy.fr.homeunix.org
> exporting /usr/ports
> exporting /usr/ports
> exporting /usr/ports
> unexporting / /
> Getting mount list.
> Here we go.
> Got mount request from 10.246.200.10
> rpcpath: /usr/ports
> Mount successful for /usr/ports by 10.246.200.10.
>
> (here i've ran sudo mount /usr/ports on the client)
>
> renton:~/ $ls -ld /usr/ports
> drwxrwxr-x  47 root  wsrc  1024 Oct 19 19:12 /usr/ports (same on
> client and server)
> renton:~/ $id
> uid=1000(landry) gid=1000(landry) groups=1000(landry), 0(wheel), 9(wsrc)
> renton:~/ $touch /usr/ports/test
> renton:~/
>
> Here i have tcpdump output (same for server and client) for this
> sucessful file creation :
> 19:56:29.030254 renton.695 > spud.nfsd: xid 0xbb06905b (NFSv3) 112
> lookup fh 33,252/664798720 "test"
> 19:56:29.030771 spud.nfsd > renton.695: xid 0xbb06905b reply ok 116
> lookup ERROR: No such file or directory
> 19:56:29.030843 renton.695 > spud.nfsd: xid 0xbb069116 (NFSv3) 112
> lookup fh 33,252/664798720 "test"
> 19:56:29.031099 spud.nfsd > renton.695: xid 0xbb069116 reply ok 116
> lookup ERROR: No such file or directory
> 19:56:29.031131 renton.695 > spud.nfsd: xid 0xbb069170 (NFSv3) 144
> create fh 33,252/664798720 "test"
> 19:56:29.033013 spud.nfsd > renton.695: xid 0xbb069170 reply ok 268
> create fh 33,252/3064333824
> 19:56:29.033097 renton.695 > spud.nfsd: xid 0xbb069202 (NFSv3) 104
> getattr fh 33,252/3064333824
> 19:56:29.033363 spud.nfsd > renton.695: xid 0xbb069202 reply ok 112
> getattr REG 644 ids 1000/9 sz 0x0
>
> Now i try to update attrs, it fails :
> renton:~/ $sudo touch /usr/ports/test
> touch: /usr/ports/test: Permission denied
>
> 19:57:52.066602 renton.695 > spud.nfsd: xid 0xbb0692d4 (NFSv3) 128
> lookup fh 33,252/664798720 "test"
> 19:57:52.067288 spud.nfsd > renton.695: xid 0xbb0692d4 reply ok 236
> lookup fh 33,252/3064333824
> 19:57:52.067380 renton.695 > spud.nfsd: xid 0xbb069303 (NFSv3) 124
> access fh 33,252/664798720 0002
> 19:57:52.067688 spud.nfsd > renton.695: xid 0xbb069303 reply ok 120
> access c 0002
> 19:57:52.067725 renton.695 > spud.nfsd: xid 0xbb0693f4 (NFSv3) 148
> setattr fh 33,252/3064333824
> 19:57:52.068015 spud.nfsd > renton.695: xid 0xbb0693f4 reply ok 144
> setattr ERROR: Permission denied
> 19:57:52.068051 renton.695 > spud.nfsd: xid 0xbb06947e (NFSv3) 124
> access fh 33,252/664798720 0002
> 19:57:52.068299 spud.nfsd > renton.695: xid 0xbb06947e reply ok 120
> access c 0002
> 19:57:52.068326 renton.695 > spud.nfsd: xid 0xbb06952e (NFSv3) 148
> setattr fh 33,252/3064333824
> 19:57:52.068605 spud.nfsd > renton.695: xid 0xbb06952e reply ok 144
> setattr ERROR: Permission denied
>
> Now i try to create another file, it fails :
> renton:~/ $sudo touch /usr/ports/test2
> touch: /usr/ports/test2: Permission denied
>
> 19:58:24.546477 renton.695 > spud.nfsd: xid 0xbb0695bf (NFSv3) 132
> lookup fh 33,252/664798720 "test2"
> 19:58:24.547033 spud.nfsd > renton.695: xid 0xbb0695bf reply ok 116
> lookup ERROR: No such file or directory
> 19:58:24.547166 renton.695 > spud.nfsd: xid 0xbb06960d (NFSv3) 132
> lookup fh 33,252/664798720 "test2"
> 19:58:24.547430 spud.nfsd > renton.695: xid 0xbb06960d reply ok 116
> lookup ERROR: No such file or directory
> 19:58:24.547475 renton.695 > spud.nfsd: xid 0xbb069643 (NFSv3) 164
> create fh 33,252/664798720 "test2"
> 19:58:24.547777 spud.nfsd > renton.695: xid 0xbb069643 reply ok 60
> create ERROR: Permission denied
>
> (btw, as root on server i can touch/create files in /usr/ports)
> I suppose next step is ktrace'ing nfsd, as it has no -d/debug/verbose
> option... i really have no idea what doesn't work. Tried with
> maproot=root and =0 too.
>
> Thanks for any help.
>
> Landry

Reply via email to