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

Creating and Modifying the HP Serviceguard Package Control Script

The package control script needs to be created and modified for both the Primary (Seattle) and Secondary (London) cluster. The following sections describe the process separately for each cluster.

Creating and Modifying the Package Control Script for the Primary Cluster

Perform the following steps on the node seattle1:

  1. Create the HP Serviceguard package control script by using the following command:
    cmmakepkg -s /etc/cmcluster/pri_pkg/pri_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.


    Note   Note    For more information on HP Serviceguard refer to the appropriate documentation available on the HP-UX documentation site.
  2. Edit the package control script using vi or any other editor.

    Refer to the following points for the parameters that you need to change in the control script to configure HP Serviceguard for your environment.

    A sample package control script pri_pkg.cntl is present in the /opt/VRTSvrmcsg/samples/seattle directory.

  • Specifying Disk Group Information
  • The VXVM_DG parameter is used to indicate the disk groups which are used by VVR.
    Example

    VXVM_DG[0]="hrdg"
  • Specifying File System Information
  • File systems that are associated with the specified disk groups are defined as shown below.
    Example

    LV[0]="/dev/vx/dsk/hrdg/hr_dv01 "; FS[0]="/hr_mount01"; \ FS_MOUNT_OPT[0]="-o rw"; FS_UMOUNT_OPT[0]=""; \
    FS_FSCK_OPT[0]=""; FS_TYPE[0]="vxfs"
    LV[1]="/dev/vx/dsk/hrdg/hr_dv02"; FS[1]="/hr_mount02"; \
    FS_MOUNT_OPT[1]="-o rw" ; FS_UMOUNT_OPT[1]=""; \
    FS_FSCK_OPT[1]=""; FS_TYPE[1]="vxfs"
  • Specifying the VVR Recovery Parameter
  • Use this parameter to specify recovery procedure if the RVG fails.
    Specify the VVR 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 seattle1. Note that the IP that you specify must be the virtual IP used by the RLINK.

    IP[0]="192.2.40.74"
    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 pri_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
  • At the beginning of the deactivate_disk_group function add the following lines starting with the comments.

            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 pri_pkg.cntl file available on host seattle2, copy the pri_pkg.cntl file to seattle2:
            # rcp /etc/cmcluster/pri_pkg/pri_pkg.cntl             \
              seattle2:/etc/cmcluster/pri_pkg/pri_pkg.cntl
    Note   Note    Create the /etc/cmcluster/pri_pkg directory on seattle2 if it does not exist.
  2. Create mount points /hr_mount01 and /hr_mount02 on seattle2.
 ^ 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