Top
PRIMECLUSTER  Installation and Administration Guide 4.4
FUJITSU Software

H.2.4 Building Cluster Applications

For details on how to configure cluster applications on the guest OS, see "Chapter 6 Building Cluster Applications."

If using the I/O fencing function, when configuring cluster applications, you must set up the I/O fencing function for the cluster application where the Gds resources or the Fsystem resources are registered.

H.2.4.1 Setting Up I/O Fencing Function

This section explains how to set up the I/O fencing function for all cluster applications to which Gds resources or Fsystem resources are registered.

Perform the following to set up the I/O fencing function:

1. Creating Cmdline resources and setting up Online and Offline scripts
  1. In the Cmdline resource settings, add the Start script, the Stop script, and the Check script in the following format:

    <Start script>

    /opt/SMAW/bin/hvsgpr -c

    <Stop script>

    /opt/SMAW/bin/hvsgpr -u

    <Check script>

    /opt/SMAW/bin/hvsgpr -m

    To create Cmdline resources, see, "6.7.3.1 Setting Up Cmdline Resources."

  2. In the attribute settings of the Cmdline resources, set the AutoRecover attribute to disabled ("0"). Do not change the default settings for other attributes.

2. Setting up userApplication scripts
  1. In the cluster application settings, add the PreOnline and OfflineDone scripts in the following format.

    <PreOnline script>

    /opt/SMAW/bin/hvsgpr -r

    <OfflineDone script>

    /opt/SMAW/bin/hvsgpr -o

    1. Select "(PreOnlineScript=)" of "Machines+Basics."

      Consistency check ...
      
      Machines+Basics (app1:consistent)
       1) HELP
       2) -
       3) SAVE+EXIT
       4) REMOVE+EXIT
       5) AdditionalMachine
       6) AdditionalConsole
       7) Machines[0]=vm21RMS
       8) Machines[1]=vm22RMS
       9) (PreCheckScript=)
      10) (PreOnlineScript=)
      11) (PostOnlineScript=)
      12) (PreOfflineScript=)
      13) (OfflineDoneScript=)
      14) (FaultScript=)
      15) (AutoStartUp=yes)
      16) (AutoSwitchOver=HostFailure|ResourceFailure|ShutDown)
      17) (PreserveState=no)
      18) (PersistentFault=0)
      19) (ShutdownPriority=)
      20) (OnlinePriority=)
      21) (StandbyTransitions=ClearFaultRequest|StartUp|SwitchRequest)
      22) (LicenseToKill=no)
      23) (AutoBreak=yes)
      24) (AutoBreakMaintMode=no)
      25) (HaltFlag=yes)
      26) (PartialCluster=0)
      27) (ScriptTimeout=)
      Choose the setting to process:10
    2. Select "FREECHOICE" and enter the full path of the PreOnline script.

      1) HELP
      2) RETURN
      3) NONE
      4) FREECHOICE
      Enter the command line to start prior to the application becoming ONLINE:4
              >> /opt/SMAW/bin/hvsgpr -r
    3. Select "(OfflineDoneScript=)" of "Machines+Basics."

      Consistency check ...
      
      Machines+Basics (app1:consistent)
       1) HELP
       2) -
       3) SAVE+EXIT
       4) REMOVE+EXIT
       5) AdditionalMachine
       6) AdditionalConsole
       7) Machines[0]=vm21RMS
       8) Machines[1]=vm22RMS
       9) (PreCheckScript=)
      10) (PreOnlineScript='/opt/SMAW/bin/hvsgpr~-r')
      11) (PostOnlineScript=)
      12) (PreOfflineScript=)
      13) (OfflineDoneScript=)
      14) (FaultScript=)
      15) (AutoStartUp=yes)
      16) (AutoSwitchOver=HostFailure|ResourceFailure|ShutDown)
      17) (PreserveState=no)
      18) (PersistentFault=0)
      19) (ShutdownPriority=)
      20) (OnlinePriority=)
      21) (StandbyTransitions=ClearFaultRequest|StartUp|SwitchRequest)
      22) (LicenseToKill=no)
      23) (AutoBreak=yes)
      24) (AutoBreakMaintMode=no)
      25) (HaltFlag=yes)
      26) (PartialCluster=0)
      27) (ScriptTimeout=)
      Choose the setting to process:13
    4. Select "FREECHOICE" and enter the full path of the OfflineDone script.

      1) HELP
      2) RETURN
      3) NONE
      4) FREECHOICE
      Enter the command line to start prior to the application becoming ONLINE:4
              >> /opt/SMAW/bin/hvsgpr -o
  2. In the attribute settings of the cluster application, if the HaltFlag attribute is set to enabled ("1"), add the Fault script in the following format.

    <Fault script>

    /opt/SMAW/bin/hvsgpr -f

    1. Select "(FaultScript=)" of "Machines+Basics."

      Consistency check ...
      
      Machines+Basics (app1:consistent)
       1) HELP
       2) -
       3) SAVE+EXIT
       4) REMOVE+EXIT
       5) AdditionalMachine
       6) AdditionalConsole
       7) Machines[0]=vm21RMS
       8) Machines[1]=vm22RMS
       9) (PreCheckScript=)
      10) (PreOnlineScript='/opt/SMAW/bin/hvsgpr~-r')
      11) (PostOnlineScript=)
      12) (PreOfflineScript=)
      13) (OfflineDoneScript='/opt/SMAW/bin/hvsgpr~-o')
      14) (FaultScript=)
      15) (AutoStartUp=yes)
      16) (AutoSwitchOver=HostFailure|ResourceFailure|ShutDown)
      17) (PreserveState=no)
      18) (PersistentFault=0)
      19) (ShutdownPriority=)
      20) (OnlinePriority=)
      21) (StandbyTransitions=ClearFaultRequest|StartUp|SwitchRequest)
      22) (LicenseToKill=no)
      23) (AutoBreak=yes)
      24) (AutoBreakMaintMode=no)
      25) (HaltFlag=yes)
      26) (PartialCluster=0)
      27) (ScriptTimeout=)
      Choose the setting to process:14
    2. Select "FREECHOICE" and enter the full path of the Fault script.

      1) HELP
      2) RETURN
      3) NONE
      4) FREECHOICE
      Enter the command line to start prior to the application becoming ONLINE:4
              >> /opt/SMAW/bin/hvsgpr -f

When specifying any command other than hvsgpr command in PreOnline script, OfflineDone script, and Fault script at the same time, specify the command as any one of the following examples shows:

The table below shows how the command can be specified in each script and the notes on specifying the command.

Separate the command by double-ampersand (&&).

Separate the command by semicolon (;).

Create the script that runs more than one commands, and then specify that command.

PreOnline script

Y (*1)

-

Y (*2)

OfflineDone script

-

Y

Y

Fault script

-

Y

Y

Y: Allowed -: Not allowed

(*1) Specify hvsgpr command as the first executed command.
The second or later command is not executed if hvsgpr command has ended abnormally.
(*2) When hvsgpr command has ended abnormally, the script's exit code must be the same with hvsgpr's exit code.