NFSv4 between Linux and Solaris

2007 October 7
by Dick

Openoffice on Ubuntu had been pissing me off no end – hanging on startup, etc.
Google pointed the finger at NFSv3
(which is how I share out a ZFS home directory from my Solaris box ).
Apparently it’s happier on NFSv4
(setantae describes it as ‘NFS without the shitty bits), so it’s time to revisit that.

the Solaris end

Solaris 10 (and up) defaults to NFS4, so the only things to do are:

  1. check your NFSv4 domain (== your DNS domain, unless you changed it)
  2. backup the homedir in case linux goes batshit and eats all your por^W mission-critical data
   zfs snapshot tank/home/username@pre-nfsv4

the linux end

sudo apt-get install nfs-common
echo 'NEED_IDMAPD=yes' >> /etc/default/nfs-common

there’s no home for you here

When I remounted my home directory all hell broke loose.
Ubuntu defaults to an NFS domain of ‘localhost’ for some reason.
The mismatch means NFS can’t tell who you are, so it punts and all your files
are suddenly owned by nobody:nobody. You can’t login.

No harm done (so long as you have another account :) ):

echo 'Domain = yourdomain.com' >> /etc/idmapd.conf
sudo /etc/init.d/nfs-common restart

then remount your shares. Everything should look ok now. OO works, at least.

No comments yet

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS