13.10 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 13-1 Using YaST Software Management to Install the nfs-kernel-server Package

13.10.1 Sample NFS Load Script

#!/bin/bash
. /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

# 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 192.168.188.16

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

exit 0

13.10.2 Sample NFS Unload Script

#!/bin/bash
. /opt/novell/ncs/lib/ncsfuncs

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

ignore_error del_secondary_ipaddress 192.168.188.16

#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