nfsv4/nfs mapid nobody domain @#%$@#%!@$

July 26th, 2006 Stephen Lau

i hit an annoying bug today, and resolved it thanks to some help from Rick. basically, i had two machines both running NFSv4. the server was setup to share/export a dir, and when I tried to mount it on the client, i’d see all the perms stomped down to be owned by nobody:nobody, ex:

app2# ls -la /mnt
total 10
drwxr-xr-x   2 nobody   nobody         3 Jul 26 09:35 .
drwxr-xr-x  23 root     root        1024 Jul 25 11:47 ..
-rw-r--r--   1 nobody   nobody         6 Jul 26 09:35 foo

very annoying.

looking through nfs(4) and nfsmapid(4) helped somewhat in that they pointed me to check the domainname. since my machines weren’t using NIS, i looked at the resolv.conf for DNS resolution.

my server had a string domain opensolaris.org in /etc/resolv.conf, but my client didn’t. so i added domain opensolaris.org to the client, but still no effect.

what i didn’t know was the presence of /var/run/nfs4_domain which is the NFSv4 domain that the machine has decided it belongs to. looking at that file clued me in that the domain it was picking up was actually listed in my search list in /etc/resolv.conf.

so what i needed to do was re-order search so that it had the same domainname listed in the server’s /etc/resolv.conf domain listed FIRST in the search list. alternatively, rick pointed out that if there was no search list, then it would have used my domain setting correctly.

so here is what my server /etc/resolv.conf ended up looking like:

domain foobar
nameserver x.x.x.x
nameserver x.x.x.x

and my client’s /etc/resolv.conf:

domain foobar
search foobar, helloworld, qwerty
nameserver x.x.x.x
nameserver x.x.x.x

and all is well in NFS world again….

[tags: OpenSolaris]


Leave a Comment

Required

Required, hidden



Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to comments via RSS Feed

Search

Pages


New Photos

2008-07-24 The After After Party @ OpenSourcery by Stephen Lau2008-07-24 Beerforge (The Songbird Party) by Stephen Lau
2008-07-24 OSCON Day 2 at the Booth by Stephen Lau2008-07-23 John Plocher vs. Jörg Schilling Sumo Wrestle by Stephen Lau
2008-07-23 OSCON Day 1 by Stephen Lau2008-07-22 OSCON Day 0 by Stephen Lau
2008-07-21 Bummin' Around Portland by Stephen Lau2008 Photos of Char-siu by Koshi by Stephen Lau
2008-07-05 Climbing Six Toe Rock at Castle Crags by Stephen Lau2008-06-28 Neighbourhood Beagles by Stephen Lau

Categories