Sunday, December 11, 2011

Mounting Linux NFS shares in Solaris 10


First, export a filesystem on your Linux box (add it to the exports file, and exportfs). Make sure the kernel-nfs server service is started.
# /etc/init.d/nfs-kernel-server start
Edit your exports file:
# ed /etc/exports
i
/home/cmihai 192.168.1.13/24(rw,no_root_squash,subtree_check,async)
w
q
Export the filesystem:
# exportfs
/home/cmihai 192.168.1.13/24
# showmount -e
Export list for loonix:
/home/cmihai 192.168.1.13/24

On your Solaris 10 box, run:
# showmount -e loonix
export list for loonix:
/home/cmihai 192.168.1.13/24
It should give you results consistent with the results you got on your Linux machine.
Trying to mount the share as NFSv4 will fail (Linux NFSv4 isn't compatible with Solaris NFSv4).
# mount loonix:/home/cmihai /storage
nfs mount: mount: /storage: Not owner
So we're going to mount the share as NFSv3:
# mount -o vers=3 loonix:/home/cmihai /storage
# mount
/storage on loonix:/home/cmihai remote/read/write/setuid/devices/vers=3/xattr/dev=4840010 on Tue Mar 18 14:59:06 2008