This chapter discusses the following:
To ensure that the Samba resource has been correctly configured, you can test individual actions by executing the scripts. This assumes that all of the dependent resources have already been started. The easiest way to test the new Samba resources is to create a resource group that contains all of the dependent resources but does not contain the new Samba resource. You can then start this resource group and test the individual Samba action scripts.
Each script, located at /var/cluster/ha/resource_types/Samba , requires two arguments, an input file and an output file. The content of the input file is the resource name. The scripts will display 0 if they are successfully executed, or display a positive number that indicates the error type. For more information on error codes, see the IRIS FailSafe Version 2 Programmer's Guide.
In the following example, you can test the Samba resource named samba8. Test each script by starting with the following commands:
$ cd /var/cluster/ha/resource_types/Samba $ echo samba8 > /tmp/ipfile
You can then execute each action script with the following command:
$ ./actionscript /tmp/ipfile /tmp/opfile
where actionscript is one of the following action script names:
(For more information about the action scripts, see “What is FailSafe for Samba?” in Chapter 1.)
$ ./monitor /tmp/ipfile /tmp/opfile
After executing each script, verify that it worked correctly by verifying the output it generates in the /var/cluster/ha/log/script_ hostname file.
To view the individual script actions, you must edit the script and add "set -x" to the action function.
After the scripts have been successfully tested, you can add the Samba resource to the resource group that contains all the dependent resources. You can test the failover policy by using either cmgr or the FailSafe GUI to move the resource group to another node in the cluster. To ensure that the resource group correctly failed over, use the cmgr or GUI to display the resource group states. The following example uses cmgr to test the failover policy:
cmgr> admin online resource_group Samba in cluster eagan cmgr> admin move resource_group Samba in cluster eagan to node cm2 cmgr> admin offline resource_group Samba in cluster eagan