On 08/05/2011 03:51 AM, victor romanchuk wrote:
> 
>> I'm trying to be a good gentoo netizen by nfs-sharing /usr/portage between
>> my three local gentoo machines, and failing :(
>>
>> After weeks of fiddling, I discovered today that my problems come from
>> using a 32-bit machine to serve my two 64-bit NFS clients(!)
>>
>> (I'll mention up front that NFSv3 works perfectly -- only NFSv4 is bad.)
>>
> 
> this is due to different authentication methods used in nfs3 and nfs4 and does
> not rely on installation arch (32/64bit). you have to tune up nfs4
> infrastructure. on both client and server make sure you have
> 
> - nfs4 and inotify support in kernel
> - net-fs/nfs-utils installed with nfs4 support
> - grep NFS_NEEDED_SERVICES /etc/conf.d/nfs shows 
> 'NFS_NEEDED_SERVICES="rpc.idmapd"'
> - grep Domain /etc/idmapd.conf shows 'Domain = <your local domain>'

That was a good hint, thanks.  I finally figured out by trial and error that the
correct gentoo way to start idmapd is by starting /etc/init.d/nfsmount on the
client.  That fixed the bad uid/gid numbers I was seeing.

But, I still have a permissions problem I can't figure out.

The exported /usr/portage mounts okay on the client with rw privileges, but I 
still
get a "read-only filesystem" error when I try to write to it.

Again by trial and error I discovered that restarting the nfs server fixes the 
write
problem, but with a gotcha:  the first write to the mounted NFS filesystem 
hangs for
about a minute before it finally succeeds.  Everything works normally after 
that.

That first write process hangs in a D+ state, apparently waiting for something 
to
time out after a minute or so.

Any idea what could cause that?

Many thanks!


Reply via email to