Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Networking

Solaris 10 NFS Server Configuration

Submitted by on August 16, 2013 – 2:01 pm

As far as NFS servers go, I think the best platform in terms of performance and stability is Solaris running on SPARC architecture. Perhaps this has something to do with the fact that NFS was created for Solaris. Over the years I’ve been working with NFS servers on AIX, HP-UX, Linux, BSD, etc. It always worked better on Solaris.

Edit the /etc/default/nfs. Here’s a basic configuration that should work for Solaris 10:

NFSD_LISTEN_BACKLOG=256
NFSD_PROTOCOL=ALL
NFSD_SERVERS=64
LOCKD_LISTEN_BACKLOG=256
LOCKD_SERVERS=128
LOCKD_RETRANSMIT_TIMEOUT=5
GRACE_PERIOD=90
NFS_SERVER_VERSMIN=2
NFS_SERVER_VERSMAX=4
NFS_CLIENT_VERSMIN=2
NFS_CLIENT_VERSMAX=4
NFS_SERVER_DELEGATION=on

Edit /etc/hosts.deny and comment out the “ALL:   ALL” line. Here’s what the default Solaris 10 hosts.deny looks like with this line commented out:
# Copyright (c) 2002 by Sun Microsystems, Inc.
# All rights reserved.
#
#ident  "@(#)hosts.deny 1.1     02/12/04     SMI"
#
# This file is supplied as part of the Solaris Security Toolkit and
# is used to deny access to specific services as part of the Solaris 9
# TCP Wrappers implementation.  This file should be customized based
# on individual site needs.
#
#ALL:   ALL

Edit the /etc/dfs/dfstab file to add your NFS exports. Here are some examples with explanations:
# Export directory /backup to clients "client1" and "client2" with root access
share -o root=client1:client2 /backup
Export directory /nfsshare to all clients on 192.168.*.* with root access
share -o root=@192.168.0.0 /nfsshare

Enable NFS server:
svcadm -v enable network/nfs/server

Check status of NFS services:
for svc in mapid cbd status nlockmgr client server rquota; do echo "${nfsstatus}" | grep "/${svc}:"; done

Sample output:
root@nfsmaster# for svc in mapid cbd status nlockmgr client server rquota; do echo "${nfsstatus}" | grep "/${svc}:"; done
online         Aug_15   svc:/network/nfs/mapid:default
online         Aug_15   svc:/network/nfs/cbd:default
online         Aug_15   svc:/network/nfs/status:default
online         Aug_15   svc:/network/nfs/nlockmgr:default
online         Aug_15   svc:/network/nfs/client:default
online         13:52:32 svc:/network/nfs/server:default
online         Aug_15   svc:/network/nfs/rquota:default

Show exported shares:
share | awk '{print $2"t"$3}'

Show active NFS clients:
netstat | grep ^`hostname` | grep .nfsd | awk '{print $2}' | grep -v .nfsd | awk -F'.' '{print $1}' | sort | uniq

 

Print Friendly, PDF & Email

Leave a Reply