NFSv4 from Linux to ZFS under Solaris

If you’re seeing this, this article isn’t quite done yet. Still setting things up right.

Fedora client, Nexenta Server.

On the linux side, start rpcidmapd and set it to start on boot.

service rpcidmapd start
chkconfig --levels 345 rpcidmapd on

Wherever your DNS is, make sure your forward and reverse are set up correctly. No, really, make sure.

$ host my.linux.host.fqdn
my.linux.host.fqdn has address 1.2.3.4
$ host 1.2.3.4
4.3.2.1.in-addr.arpa domain name pointer my.linux.host.fqdn.

Make sure dnsdomainname returns correctly on the linux host. You need to have my.linux.host.fqdn first on the line with 127.0.0.1 in /etc/hosts. This sets the NFSv4 domain name. Restart rpcidmapd if you needed to fix this. If this is wrong your files will all show as nobody:nobody on the mount (at this point everybody in the mailing lsit archives gives up and goes back to the crummy NFSv3). Make sure linux’s dnsdomainname matches the output of Solaris’s:

cat /var/run/nfs4_domain

Now, share under zfs:

zfs set sharenfs=rw=my.linux.host.fqdn,root=my.linux.host.fqdn pool/vol/subvol

mount under linux:

mount -t nfs4 solarismachine:/vol/subvol /mnt/localmount/ -o rw,intr,hard,proto=tcp,port=2049

Then set up a root nfs mount by:

blah, blah, blah, todo, todo, todo