Tuesday, November 15, 2011

HPUX: NFS Configuration

An HP-UX 10.x system is an NFS client by default. It can become as NFS server either through SAM or through modifications
to /etc/rc.config.d/nfsconf.
Set the following variable to 1:
   NFS_SERVER=1                    #  Is this machine a server?
Set the number of nfsd processes with the NUM_NFSD and nfs bio with NUM_NFSIOD variables:
   NUM_NFSD=30
    NUM_NFSIO=16
NOTE: The number of nfsd processes you need depends on several factors.


The /etc/exports file is processed automatically at boot time. Entries in /etc/exports look something like this:
/reports -access=sun.ucs.indiana.edu, rw=teak.uwsg.indiana.edu
/usr/man -ro,access=chrome:copper:zinc,root=chrome

If the /etc/exports file is modified the exportfs command must be run for the changes to take effect immediately.exportfs -u can be used to remove file systems from the export list.


See if the NFS client can see the exports list of the NFS Server: 

# /usr/sbin/showmount -e nfs-server 

For example:

# /usr/sbin/showmount -e nfs-server 

To see this example, go to 
ftp://ftp.hp.com/pub/enterprise/programming_code/c00867456_rpcinfo_examples.txt

Verify the export list is correct. If not, log into the server and examine the /etc/exports file. If it contains entries that you do not see in the showmount -e listing, then re-export them as follows:

# /usr/sbin/exportfs -av 

For example: 

# /usr/sbin/exportfs -av re-exported /home

To see the re-export example, go to 
ftp://ftp.hp.com/pub/enterprise/programming_code/c00867456_exportfs_example.txt

See what files the NFS Client has mounted from the NFS Server: 

NOTE: CAUTION! If you use "bdf" it causes an NFS "fsinfo" request to the NFS Server, which can cause the bdf command to hang if there are any problems! Use the "mount" command instead.