NFS Shares
Update Exports
After editing /etc/exports run
exportfs -a
List Exports
# showmount -e
Export list for myserver:
/export/home 10.1.0.0/24
#
Show Clients
On the NFS server run 'showmount' to see mounting clients
# showmount
Hosts on myserver:
10.1.0.15
#
List Protocols/Services
To list local services run:
...
# rpcinfo -p 10.1.0.15
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 44152 status
100024 1 tcp 53182 status
NFSv4
Mounting NFSv4 Shares
The difference in mounting is that you need to provide "nfs4" and transport and port options like this:
mount -t nfs4 -o proto=tcp,port=2049 server:/export/home /mnt
Ensure Running Id Mapper
When using NFSv4 share ensure to have the id mapper running on all clients. On Debian you need to explicitely start it:
service idmapd start
Mapping Users
You might want to set useful NFSv4 default mappings and some explicit mappings for unknown users:
#cat /etc/idmapd.conf
[...]
[Mapping]
Nobody-User = nobody
Nobody-Group = nogroup
[Static]
someuser@otherserver = localuser
Tuning
Tuning NFS Clients
When optimizing for performance try the following client mount option changes:
...
# nfsstat -o fh --sleep=2