One way to set up the DST pool cluster resource is to cluster-enable both pools to create separate cluster resources. You copy the commands from the secondary pool resource scripts to the primary pool resource scripts in the proper load and unload order. The primary pool cluster resource manages the two pools and volumes.
The advantages of creating two cluster pool resources are:
You can copy and paste the lines of code you need from one script to the other.
The NCP Server object’s name for the secondary volume is automatically renamed to use the cluster name instead of the node hostname. In a migration scenario, you can later remove the shadow relationship and start using the secondary pool immediately as an independent pool cluster resource. Ensure that the volume ID on the volume is unique across all nodes.
The disadvantages of this approach are:
The static IP address that is assigned to the secondary cluster pool resource is consumed but not used while the pool is in the shadow relationship.
The secondary cluster pool resource appears with a status of
and is not used.IMPORTANT:After you modify the primary pool cluster resource, you use this resource to manage the secondary pool and volume. Do not bring the secondary resource online.
Use the information in the following sections to set up the DST pool cluster resource.
For this method, you need two NSS volumes, each in its own clustered-enabled pool. For instructions for creating the clustered pools and the NSS volumes, see Configuring Cluster Resources for Shared NSS Pools and Volumes in the OES 2 SP3: Novell Cluster Services 1.8.8 Administration Guide for Linux.
The cluster load scripts elsewhere in this section assume the following setup for NSS volumes in the clustered DST volume pair. Ensure that you use the actual information from your setup.
Parameter |
Primary Cluster Resource |
Secondary Cluster Resource |
---|---|---|
Server hostname for node 1 |
server38 |
server38 |
Cluster server name for node 1 |
NCS1 |
NCS1 |
Pool name |
POOL1 |
ARCPOOL1 |
NSS volume name |
VOL1 |
ARCVOL1 |
Cluster resource virtual server name |
NCS1-POOL1-SERVER |
NCS1-ARCPOOL1-SERVER (not used after you set up the primary resource for DST) |
Cluster resource IP address |
10.10.10.38 You use the IP address for the primary pool’s cluster resource for the shadow volume. |
10.10.10.48 (not used after you set up the primary resource for DST) |
Volume ID |
254 |
253 (not used after you set up the primary resource for DST) |
When the primary volume has a state of ncpcon mount command in the cluster resource load script.
, its NCP volume ID represents the DST shadow volume pair of volumes. A second NCP volume ID is not assigned to the secondary volume while it is in the shadow volume relationship. You use only the ID on the primary volume in theIMPORTANT:In the cluster load and unload scripts, the add_secondary_ipaddress and del_secondary_ipaddress commands refer to the cluster resource’s IP address that is “secondary” to the node’s IP address. It is not related to the DST volume’s terminology.
After you create two clustered pools, view the scripts. Each of the two NSS pool cluster resources has its own set of load, unload, and monitor scripts. Save the script information for the secondary pool to a text file.
In iManager, select
, then select .Select the name link of the cluster you want to manage.
If the cluster is not in your customized list, you can add it now. Click
, browse to select the cluster, then click .On the Cluster Manager page, click the
link of the primary cluster resource to go to the Cluster Pool Properties page, then click the tab view the load, unload, and monitor scripts.You can view the scripts for only one server at a time in the browser. View the properties of each resource in separate browsers to compare the scripts side-by-side.
The following table provides sample load, unload, and monitor scripts for the POOL1-SERVER resource for the primary clustered pool named POOL1. Novell CIFS can be configured as an advertising protocol when you set up the primary cluster pool.
Primary Pool Cluster Resource Scripts |
---|
Load Script #!/bin/bash . /opt/novell/ncs/lib/ncsfuncs exit_on_error nss /poolact=POOL1 exit_on_error ncpcon mount VOL1=254 exit_on_error add_secondary_ipaddress 10.10.10.38 exit_on_error ncpcon bind --ncpservername=NCS1-POOL1-SERVER --ipaddress=10.10.10.38 #This line is added if Novell CIFS is used as an advertising protocol #novcifs --add ’--vserver=".cn=NCS1-POOL1-SERVER.ou=ncs.o=novell.t=AVALON_TREE."’ --ip-addr=10.10.10.38 exit 0 |
Unload Script
#!/bin/bash
. /opt/novell/ncs/lib/ncsfuncs
#This line is added if Novell CIFS is used as an advertising protocol
#novcifs --remove --vserver=virtualserverFDN --ip-addr=virtualserverip
ignore_error ncpcon unbind --ncpservername=NCS1-POOL1-SERVER --ipaddress=10.10.10.38
ignore_error del_secondary_ipaddress 10.10.10.38
ignore_error nss /pooldeact=POOL1
exit 0
|
Monitor Script #!/bin/bash . /opt/novell/ncs/lib/ncsfuncs exit_on_error status_fs /dev/pool/POOL1 /opt/novell/nss/mnt/.pools/POOL1 nsspool exit_on_error status_secondary_ipaddress 10.10.10.38 exit_on_error ncpcon volume VOL1 exit_on_error rcnovell-cifs monitor exit 0 |
The following are sample load and unload scripts for the ARCPOOL1-SERVER resource for the secondary clustered pool named ARCPOOL1.
Secondary Pool Cluster Resource Scripts |
---|
Load Script #!/bin/bash . /opt/novell/ncs/lib/ncsfuncs exit_on_error nss /poolact=ARCPOOL1 exit_on_error ncpcon mount ARCVOL1=253 exit_on_error add_secondary_ipaddress 10.10.10.48 exit_on_error ncpcon bind --ncpservername=NCS1-ARCPOOL1-SERVER --ipaddress=10.10.10.48 exit 0 |
Unload Script #!/bin/bash . /opt/novell/ncs/lib/ncsfuncs ignore_error ncpcon unbind --ncpservername=NCS1-ARCPOOL1-SERVER --ipaddress=10.10.10.48 ignore_error del_secondary_ipaddress 10.10.10.48 ignore_error nss /pooldeact=ARCPOOL1 exit 0 |
Sample Primary Monitor Script #!/bin/bash . /opt/novell/ncs/lib/ncsfuncs exit_on_error status_fs /dev/pool/ARCPOOL1 /opt/novell/nss/mnt/.pools/ARCPOOL1 nsspool exit_on_error status_secondary_ipaddress 10.10.10.48 exit_on_error ncpcon volume ARCVOL1 exit 0 |
Copy information from the secondary resource’s scripts into a text file, and save the file.
You will work from this copy to add lines to the primary pool cluster resource.
At the bottom of the Scripts page, click
to return to the Cluster Manager page.Continue with Section 13.5.3, Adding Commands for the Secondary Clustered Pool and Volume to the Primary Pool Cluster Resource.
The clustered DST shadow volume is defined and managed in the primary pool cluster resource. You must add lines from the secondary pool cluster resource scripts and modify the mount command to define the DST shadow volume.
In iManager, select
, then select .Select the name link of the cluster you want to manage.
Offline the primary cluster resource. The secondary cluster resource should still be offline.
On the Cluster Manager page, select the check box next to the resource.
Click
.Click the name link of the primary pool cluster resource to view its Cluster Pool Properties page, then click the
tab.On the
> page, modify the load script for the primary cluster resource.Use the following sample load script as a guide for where to add the lines for each of the items.
Sample DST Pool Resource Load Script #!/bin/bash . /opt/novell/ncs/lib/ncsfuncs # activate the secondary pool exit_on_error nss /poolact=ARCPOOL1 # activate the primary pool exit_on_error nss /poolact=POOL1 # Optional delay to allow time for pools to activate before mounting the volume sleep 10 #comment out the original volume mount command #exit_on_error ncpcon mount VOL1=254 # Use the ncpcon mount command to create the shadow volume on mount exit_on_error ncpcon mount VOL1=254,shadowvolume=ARCVOL1 exit_on_error add_secondary_ipaddress 10.10.10.38 exit_on_error ncpcon bind --ncpservername=NCS1-POOL1-SERVER --ipaddress=10.10.10.38 #This line is added if Novell CIFS is used as an advertising protocol #novcifs --add ’--vserver=".cn=NCS1-POOL1-SERVER.ou=ncs.o=novell.t=AVALON_TREE."’ --ip-addr=10.10.10.38 # If shadowfs is used, wait for shadowfs to start #for (( c=1; c<=10; c++ )) do # if [ ! -d /media/shadowfs/VOLUME/._NETWARE ]; then sleep 5; fi #done exit 0 |
Add a line to activate the secondary pool before the primary pool activation.
exit_on_error nss /poolact=ARCPOOL1
(Optional) Add a sleep command after the pool activation commands to allow both pools time to be activated before you mount the shadow volume pair.
For example:
sleep 10
Vary the time (in seconds) according to what is needed for your system.
IMPORTANT:If wait times are added to the load script or unload script, ensure that you increase the script timeout settings accordingly. Otherwise, the script might time out while you are waiting for the action.
Comment out (or remove) the individual mount command for the primary NSS volume by placing a pound sign (#) at the beginning of the line.
For example:
#exit_on_error ncpcon mount VOL1=254
Add the shadow volume mount command to the primary load script. This line provides the primary volume, and assigns the secondary volume to shadow the primary.
exit_on_error ncpcon mount VOL1=254,shadowvolume=ARCVOL1
If you are using shadowfs to provide the merged file tree view for SMB/CIFS users or for Linux services like rsync, you must allow time in the load script after mounting the shadow volume to allow shadowfs to become active before continuing.
Use one of the following approaches to add a wait time:
Add a sleep 10 command after mount command, and vary it manually until it allows sufficient wait time for shadowfs to start.
# If shadowfs is used, wait for shadowfs to start sleep 10
Add a script that varies the wait time by checking to ensure that shadowfs is started.
For example:
# If shadowfs is used, wait for shadowfs to start for (( c=1; c<=10; c++ )) do if [ ! -d /media/shadowfs/VOLUME/._NETWARE ]; then sleep 5; fi done
IMPORTANT:If wait times are added to the load script or unload script, ensure that you increase the script timeout settings accordingly. Otherwise, the script might time out while you are waiting for the action.
Click
to save your changes.The changes do not take effect until the shadow volume cluster resource is brought online.
On the
> page, modify the unload script for the primary cluster resource.Use the following sample unload script as a guide for where to add the lines for each of the items.
Sample DST Pool Resource Unload Script #!/bin/bash . /opt/novell/ncs/lib/ncsfuncs # This line is added if Novell CIFS is used as an advertising protocol #novcifs --remove ’--vserver=".cn=NCS1-POOL1-SERVER.ou=ncs.o=novell.t=AVALON_TREE."’ --ip-addr=10.10.10.38 # If shadowfs is used, unload the volume in FUSE #ignore_error fusermount -u /media/shadowfs/VOL1 ignore_error ncpcon unbind --ncpservername=NCS1-POOL1-SERVER --ipaddress=10.10.10.38 ignore_error del_secondary_ipaddress 10.10.10.38 # Deactivate the primary pool ignore_error nss /pooldeact=POOL1 # Deactivate the secondary pool ignore_error nss /pooldeact=ARCPOOL1 exit 0 |
If you use shadowfs to provide a merged file tree view to Samba users or for Linux file protocols, you must unmount the FUSE-mounted file systems that are displayed in the /media/shadowfs/VOLUME directory. Add the following line just before the unbind command in the unload script:
#unload the volume in FUSE # Include the following line only if shadowfs is used ignore_error fusermount -u /media/shadowfs/VOLUME
Copy the pool deactivation command from the secondary pool’s unload script into the primary pool’s unload script after the line to deactive the primary pool.
ignore_error nss /pooldeact=ARCPOOL1
IMPORTANT:Ensure that you deactivate the primary pool before deactivating the secondary pool.
Click
to save your changes.The changes do not take effect until the shadow volume cluster resource is brought online.
On the
> page, modify the monitor script for the primary cluster resource.Use the following sample monitor script as a guide for where to add the lines for each of the items.
Sample DST Pool Resource Monitor Script #!/bin/bash . /opt/novell/ncs/lib/ncsfuncs # Check the status of the secondary pool exit_on_error status_fs /dev/pool/ARCPOOL1 /opt/novell/nss/mnt/.pools/ARCPOOL1 nsspool # Check the status of the primary pool exit_on_error status_fs /dev/pool/POOL1 /opt/novell/nss/mnt/.pools/POOL1 nsspool exit_on_error status_secondary_ipaddress 10.10.10.38 # Check the status of the primary volume. Do not check secondary volume. exit_on_error ncpcon volume VOL1 # This line is added if Novell CIFS is used as an advertising protocol #exit_on_error rcnovell-cifs monitor exit 0 |
Copy the pool status check command from the secondary pool’s monitor script into the primary pool’s monitor script before the line to check the status of the primary pool.
Do not add a check for the secondary volume.
Click
to save your changes.The changes do not take effect until the shadow volume cluster resource is brought online.
Click
to save all your changes and return to the Cluster Manager page.Online the primary pool cluster resource. On the Cluster Manager page, select the check box next to the primary cluster resource, then click
.Leave the secondary resource offline.
Verify that the primary cluster resource is running by going to the
page.The primary cluster resource is
. The secondary cluster resource is reported as because you are managing that cluster resource through the primary load script.Verify that the shadow volume (VOL1) is mounted in NCP and is shadowed:
On the first node in the cluster, log in to Novell Remote Manager for Linux as the root user.
Select ARCPOOL1 and the NSS volume ARCVOL1 are listed under , but the secondary NSS volume is not listed under .
, then verify that the secondary poolSelect
> , then verify that the primary volume is listed under , and that its status is .Select
> , click , then verify that the parameter is turned off for the secondary volume, and turned on for the primary volume.You can also look for the EXCLUDE_VOLUME entry in the /etc/opt/novell/ncp2nss.conf file.
Continue with Section 13.8, Configuring Shadow Volume Policies for the Clustered DST Volume Pair.