create_siteguard_script

Associates scripts (pre-script, post-script, and storage script) with the Site Guard configuration.

Format

emcli create_siteguard_script
      -system_name=<name>
      -operation=<name>
      -script_type=<type>
      [-host_name=[<name1;name2;...>]
      -path=<path_of_script>
      [-all_hosts=true|false]
      [-role=Primary|Standby]

[ ]  indicates that the parameter is optional.

Options

  • system_name

    Name of the system.

  • operation

    Name of the operation. Examples: Switchover, Failover, Start, or Stop.

  • script_type

    Type of script, which can be Mount, UnMount, Pre-Script, Post-Script, Failover, or Switchover.

  • host_name

    Name of the host where this script will run. You can specify this option more than once.

  • path

    Path to the script.

  • all_hosts

    Allows the script to run on all the hosts in the system. This optionoverrides the host_name.

  • role

    Configures the script based on the system role. By default, the script is configured for both primary and standby roles for a given system.

Examples

Example 1

emcli create_siteguard_script
      -system_name="BISystem1"
      -operation="Switchover"
      -script_type="Pre-Script"
      -path="/tmp/prescript"
      -all_hosts="true"
      -role="Primary"

Example 2

emcli create_siteguard_script
      -system_name="BISystem1"
      -operation="Switchover"
      -script_type="Pre-Script"
      -path="/tmp/prescript"
      -host_name="BIHOST1"
      -host_name="BIHOST2"