12.9 Adding NFS Export for a Clustered Pool Resource

You can add NFS support for a clustered NSS volume by adding an exportfs(8) command to the load script and unload script for a clustered pool resource. Basically, the order in load script should be NSS, NFS, IP, and NCP. The order is reversed in the unload script.

Before you use the exportfs(8) command in resource scripts, ensure that you install the nfs-kernel-server package on all of the cluster nodes in the resource’s preferred nodes list. This contains the support utilities for the kernel nfsd daemon. It is not installed by default. You can use the YaST > Software > Software Management tool to find and install the package.

Figure 12-1 Using YaST Software Management to Install the nfs-kernel-server Package

12.9.1 Sample NFS Load Script

. /opt/novell/ncs/lib/ncsfuncs

# Activate the NSS pool and mount its volume
exit_on_error nss /poolact=POOL_16
exit_on_error ncpcon mount VOL_161=224

# Start the NFS service
exit_on_error rcnfsserver start

# Export the volume for NFS
exit_on_error exportfs -o rw,sync,no_root_squash,fsid=216 *:/media/nss/VOL_161

exit_on_error add_secondary_ipaddress

exit_on_error ncpcon bind --ncpservername=CLUS1_POOL_16_SERVER --ipaddress=

exit 0

12.9.2 Sample NFS Unload Script

. /opt/novell/ncs/lib/ncsfuncs

ignore_error ncpcon unbind --ncpservername=CLUS1_POOL_16_SERVER --ipaddress=

ignore_error del_secondary_ipaddress

#Unexport a volume for NFS
ignore_error exportfs -u *:/media/nss/VOL_161 

# Deactivate the pool and volume
ignore_error nss /pooldeact=POOL_16

exit 0