1 |
On 08/05/2011 03:51 AM, victor romanchuk wrote: |
2 |
> |
3 |
>> I'm trying to be a good gentoo netizen by nfs-sharing /usr/portage between |
4 |
>> my three local gentoo machines, and failing :( |
5 |
>> |
6 |
>> After weeks of fiddling, I discovered today that my problems come from |
7 |
>> using a 32-bit machine to serve my two 64-bit NFS clients(!) |
8 |
>> |
9 |
>> (I'll mention up front that NFSv3 works perfectly -- only NFSv4 is bad.) |
10 |
>> |
11 |
> |
12 |
> this is due to different authentication methods used in nfs3 and nfs4 and does |
13 |
> not rely on installation arch (32/64bit). you have to tune up nfs4 |
14 |
> infrastructure. on both client and server make sure you have |
15 |
> |
16 |
> - nfs4 and inotify support in kernel |
17 |
> - net-fs/nfs-utils installed with nfs4 support |
18 |
> - grep NFS_NEEDED_SERVICES /etc/conf.d/nfs shows 'NFS_NEEDED_SERVICES="rpc.idmapd"' |
19 |
> - grep Domain /etc/idmapd.conf shows 'Domain = <your local domain>' |
20 |
|
21 |
That was a good hint, thanks. I finally figured out by trial and error that the |
22 |
correct gentoo way to start idmapd is by starting /etc/init.d/nfsmount on the |
23 |
client. That fixed the bad uid/gid numbers I was seeing. |
24 |
|
25 |
But, I still have a permissions problem I can't figure out. |
26 |
|
27 |
The exported /usr/portage mounts okay on the client with rw privileges, but I still |
28 |
get a "read-only filesystem" error when I try to write to it. |
29 |
|
30 |
Again by trial and error I discovered that restarting the nfs server fixes the write |
31 |
problem, but with a gotcha: the first write to the mounted NFS filesystem hangs for |
32 |
about a minute before it finally succeeds. Everything works normally after that. |
33 |
|
34 |
That first write process hangs in a D+ state, apparently waiting for something to |
35 |
time out after a minute or so. |
36 |
|
37 |
Any idea what could cause that? |
38 |
|
39 |
Many thanks! |