Previous  |  Next  >  
Product: Volume Replicator Guides   
Manual: Volume Replicator 4.1 Support for HP Serviceguard Administrator's Guide   

Creating and Modifying the Package Control Script for the Secondary Cluster

Perform the following steps on the node london1:

  1. Create the HP Serviceguard package control script by using the following command:
    cmmakepkg -s /etc/cmcluster/sec_pkg/sec_pkg.cntl

    You can also do this using SAM.

    The control script that is generated by the cmmakepkg command is created with the parameters set to default values. Customize this script to suit your requirements. Edit the package control script as indicated by the comments in that file.

  2. Edit the package control script, sec_pkg.cntl using vi or any other editor.

    After the file is open edit the parameters. Refer to the following points for a description of some of the parameters that you need to change in the control script to configure HP Serviceguard for your environment.

    A sample package control file is present in the /opt/VRTSvrmcsg/samples/london directory.

  • Specifying Disk Group Information
  • The VXVM_DG parameter is used to specify the name of the disk groups used by VVR.
    Example

    VxVM_DG[0]="hrdg"
  • Specifying File System Information
  • Do not specify any information here as the volumes under the Secondary RVG do not need to be mounted.
  • Specifying the VVR Recovery Parameter
  • Use this parameter to specify the RVG recovery procedure to be used if the RVG fails at any point in time.
    Specify the RVG recovery statement just before the volume recovery section in the script.
    Example

    VXRVG="/opt/VRTSvrmcsg/vvr.sh activate \$DiskGroup"
  • Specifying the IP and Subnet
  • Use these parameters to specify the IP and subnet address of the host london1. Note that the IP that you specify must be the virtual IP used by the RLINK.

    IP[0]="192.2.40.53"
    SUBNET[0]="192.2.40.0"
  • Specifying the service name information
  • The service name must be the same as defined in the HP Serviceguard configuration file sec_pkg.conf.
    Example

    SERVICE_NAME[0]="VVR"
    SERVICE_CMD[0]="/opt/VRTSvrmcsg/vvr.sh monitor ${VxVM_DG[@]}"
    SERVICE_RESTART[0]=-r "3"
  • Modifying the activate_disk_group function
  • Add the following lines starting with the comments at the end of the activate_disk_group function.

            function activate_disk_group
            {
            :
            :
            :
            for I in ${VXVM_DG[@]}
            do
              print "$(date '+%b %e %X') - \"$(hostname)\": Importing disk group $I."

                     # If the disk group is already imported on this node,
                      # check_dg will return 10. Then we can skip the vxdg import
                      # since that would fail anyway.
                      check_dg $I
                      retval=$?
                      if (( retval > 0 )) && (( retval != 10 )); then
                              let 0
                              test_return 22
                      fi
                     if (( retval != 10 )); then
                              vxdg -tfC import $I
                      fi
                      test_return 23

                      DiskGroup=$I

                      eval $VXRVG             # Add this line for VVR recovery
                      test_return 24          # Add this line

                      eval $VXVOL
                      test_return 24
             done
  • Modifying the deactivate_disk_group function
  • Add the following lines starting with the comments at the beginning of the deactivate_disk_group function.

            function deactivate_disk_group
            {

            /opt/VRTSvrmcsg/vvr.sh halt ${VXVM_DG[@]} # Add this line to stop RVG(s)
            test_return 25                      # Add this line

            for I in ${CVM_DG[@]}
            do
            .............
            .............

            }

  1. To make the sec_pkg.cntl file available on host london2, copy the sec_pkg.cntl file to london2:
            # rcp /etc/cmcluster/sec_pkg/sec_pkg.cntl 
              london2:/etc/cmcluster/sec_pkg/sec_pkg.cntl
    Note   Note    Create the /etc/cmcluster/sec_pkg directory on london2 if it does not exist.

Proceed to the following section to start the package.

 ^ Return to Top Previous  |  Next  >  
Product: Volume Replicator Guides  
Manual: Volume Replicator 4.1 Support for HP Serviceguard Administrator's Guide  
VERITAS Software Corporation
www.veritas.com