Showing posts with label nfs. Show all posts
Showing posts with label nfs. Show all posts

Sunday, 10 April 2011

Solaris/OpenIndiana NFS server to Ubuntu NFS host - 4294967294 problem

Error keywords seen:  User and Group set to 4294967294 instead of UID/GID expected

Operating System: Open Indiana oi_148 (Solaris) and Ubuntu 11.04 (Natty Narwhal)

Software: NFS v4


When mounting an nfs shared directory from an OpenIndiana home server, the directory ownership was set to 4294967294:4294967294, despite the ownership on the server being 1000:1000, and the equivalent UID / GID being set up on the client machine.


The solution is to edit the config file /etc/default/nfs-common - the two lines required are:


NEED_STATD="no"
NEED_IDMAPD="yes"



This is enough to change the reported ownership from 4294967294 to 'nobody:nogroup' - which is progress, of a sort.



Our next requirement is to make sure that the nfs client and the nfs server are both using the same domain name.  On the client, change /etc/idmapd.conf so that the domain parameter is correct - in my case, 'homenetwork'.

Domain = homenetwork

Secondly, on the server, make sure that the domainname is correctly set.  As this is running a Solaris(-based) OS, it's very easy - just create or edit the contents of /etc/defaultdomain so that it contains (nothing more than) the correct domain:

homenetwork

And you're done - reboot both sides for luck, and everything should now appear as you expect.

Thursday, 8 January 2009

NFS mount a remote directory with solaris

Let's say we have a directory /hiro on server nakamura, which we need to mount as directory /claire on server bennet. We're going to assume that both servers are aware of the other by name (either as an entry in the /etc/hosts file, or dns, etc.) - but if not, you can replace the server names by ip addresses.

If this is a one-off requirement, then on nakamura, we issue the command:
share -F nfs -o rw,public,anon=root /hiro

This will make the directory /hiro available for nfs-mounting.

On bennet, we issue the command:
mount -F nfs nakamura:/hiro /claire

This will make the /hiro directory from nakamura available as the /claire directory on bennet.


However, all of this is transient, and will be lost on a reboot. To make this permanent, edit /etc/nfs/dfstab on nakamura, and add the line:

share -F nfs -o rw,public,anon=root /hiro

You can now share the directory as before, or by the command shareall

On bennet, edit /etc/vfstab and add in the line:

nakamura:/hiro - /claire nfs - yes rw,hard,bg

You can now mount the directory as before, or by the command mount -a, or mount /claire