12.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.

12.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

12.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