Previous  |  Next  >  
Product: Volume Replicator Guides   
Manual: Volume Replicator 4.1 Administrator's Guide   

Performing Off-Host Processing Tasks

VVR enables you to integrate application preparation tasks, IBC messaging, and off-host processing tasks using the single command vradmin ibc. The vradmin ibc command simplifies the off-host processing task by providing scripts for application-specific tasks. The vradmin ibc command uses IBC Messaging and executes a set of user-defined scripts to perform the required off-host processing task. You are not required to remember the sequence in which to perform these tasks. The vradmin ibc command simplifies the off-host processing process by performing the following operations:

  • Executes application-specific scripts and the scripts to be used for off-host processing in the required sequence.
  • Executes these scripts on the appropriate host, that is, Primary or the Secondary.
  • Inserts the IBC message at the appropriate time.

Tasks to Perform for Off-Host Processing

Following is the typical sequence of tasks that must be performed to use IBC Messaging for off-host processing:

  1. Prepare the Secondary for off-host processing. For example, create snapshot plexes on the data volumes on the Secondary (prefreeze task).
  2. Register an application name for sending and receiving IBC messages on the Primary and the Secondary. Prepare to receive the IBC message on the Secondary.
  3. Quiesce the application on the Primary (quiesce task).
  4. Send the IBC message from the Primary to the Secondary.
  5. Unquiesce the application on the Primary (unquiesce task).
  6. Perform the off-host processing task on the Secondary after the Secondary receives the IBC message and replication freezes (onfreeze task). Note that the updates to the Secondary data volume is frozen while the off-host processing task is in progress.
  7. Unfreeze the Secondary after the off-host processing task completes.
  8. Perform additional tasks on the Secondary after replication has resumed. For example, reattaching the snapshot volumes to the original data volumes on the Secondary (postfreeze task).
  9. Unregister the application on both the Primary and the Secondary.

The single command vradmin ibc can be used to perform this sequence of tasks. To use the vradmin ibc command, you need to provide scripts named prefreeze, quiesce, unquiesce, onfreeze, postfreeze to perform the tasks in step 1, step 3, step 5, step 6, and step 8 respectively. The vradmin ibc command uses these scripts with IBC Messaging to perform these tasks in sequence. For more information about the user-defined scripts, see Understanding the Scripts Used for the vradmin ibc Command.

You can also use the vxibc commands to perform off-host processing operations. For details on using the available vxibc commands, see Using the In-Band Control Messaging Utility vxibc and the IBC Programming API.

Using the IBC Messaging Command vradmin ibc

The vradmin ibc command enables you to perform off-host processing operation in a single command.

Prerequisites for Using vradmin ibc Command

    Checkmark  The Primary RLINK that points to the Secondary host participating in the vradmin ibc command must be in the CONNECT state.

    Checkmark  The onfreeze script must exist on each Secondary host participating in the vradmin ibc command.

    Checkmark  Make sure each user-defined script to be used in the vradmin ibc command exits with a status of 0 on successful completion and a status of nonzero on unsuccessful completion.

    Checkmark  The user-defined scripts must have execute permissions for root user.


    Caution  Caution    The vradmin ibc executes scripts using root privileges. If the scripts can be modified by a non-privileged user, there is a potential security risk. To prevent this, ensure that you have the proper access privileges set on the scripts used with the vradmin ibc command.

  To perform an off-host processing task on one or more Secondary RVGs in an RDS

  1. Make sure the RLINKs are in the CONNECT state. If the RLINKs are not in the CONNECT state, use the vradmin startrep command to start replication.
  2. Create the user-defined scripts for this off-host processing task.
    1. Create the following directory on all hosts participating in the vradmin ibc command:

    2.     /etc/vx/vvr/ibc_scripts/task_name

        where task_name is the name of the off-host processing task and is the same as the task_name argument used in the vradmin ibc command.

    3. Create the appropriate scripts for the required off-host processing task and copy the scripts in the directory created in step a. See Understanding the Scripts Used for the vradmin ibc Command.
  3. Run the following command from any host in the RDS:
            # vradmin -g diskgroup ibc rvg_name task_name [sechost]...
    The argument diskgroup represents the disk group that contains the RVG on the local host.
    The argument rvg_name is the name of the RVG on the local host and represents its RDS.
    The argument task_name is the name of the off-host processing task and is the same as the name of the directory created in step a.
    The argument sechost is the name of the Secondary host as displayed in the output of the vradmin printrvg command. The argument sechost is optional if the RDS contains only one Secondary. To perform the task on multiple Secondary hosts, specify a space-separated list with the name of each Secondary to be included. Use the -all option to perform the task on all the Secondary hosts in the RDS.

Example–Creating a Snapshot on the Secondary Using the vradmin ibc Command

This example shows how to create a snapshot of the data volumes on the Secondary london using the vradmin ibc command. The RVG hr_rvg, which belongs to the disk group hrdg, has been created on the Primary and Secondary. This example also assumes that Secondary data volumes have associated snapshot plexes. It uses the application name dss_app.

  1. Create the following directory on Secondary host:
      /etc/vx/vvr/ibc_scripts/dss_app
  2. Create the onfreeze script in the /etc/vx/vvr/ibc_scripts/dss_app directory on the Secondary host by including the following command to create the snapshot of the data volumes on the Secondary:
      #!/bin/sh
      /usr/sbin/vxrvg -g hrdg snapshot hr_rvg
  3. On the Primary, put the application using the Primary data volumes in the quiesce mode.
  4. Create the snapshot by running the following command on any host in the RDS:
      # vradmin -g hrdg ibc hr_rvg dss_app london
  5. On the Primary, take the application out of quiesced mode to resume it.

Understanding the Scripts Used for the vradmin ibc Command

The vradmin ibc command executes the user-defined scripts: prefreeze, quiesce, unquiesce, onfreeze, and postfreeze. Note that the onfreeze script is mandatory and must be present on the Secondary. The scripts prefreeze, quiesce, unquiesce, and postfreeze are optional. However, if you provide the quiesce script, you must provide the unquiesce script and vice versa. You must name the user-defined scripts prefreeze, quiesce, unquiesce, onfreeze, or postfreeze.


Note   Note    A user-defined script can either be a shell script or a binary.

Location of the scripts

The scripts must reside in the /etc/vx/vvr/ibc_scripts/task_name directory on the Primary and the Secondary host. Note that task_name is the name of the off-host processing task and is the same as the task_name argument used in the vradmin ibc command. For example, if the off-host processing task is Decision Support Systems (DSS), you can choose a task name of dss; or if the off-host processing task is Backup, you can choose the task name of backup.

Host Directory Name of Script

Primary

/etc/vx/vvr/ibc_scripts/task_name

quiesce

Primary

/etc/vx/vvr/ibc_scripts/task_name

unquiesce

Secondary

/etc/vx/vvr/ibc_scripts/task_name

onfreeze

Secondary

/etc/vx/vvr/ibc_scripts/task_name

prefreeze

Secondary

/etc/vx/vvr/ibc_scripts/task_name

postfreeze

When the vradmin ibc command executes each script, it passes the following arguments to the script:

Parameter Description

Argument 1

Name of the disk group of the Primary RVG.

Argument 2

Name of the Primary RVG.

Argument 3

The task_name specified in the vradmin ibc command.

Remaining Arguments

Names of the RLINKs participating in the vradmin ibc command.

The following section describes how each script is used with the vradmin ibc command:

  • The prefreeze script
  • Use this script on the Secondary to prepare for the tasks to be performed in the onfreeze script while the replication to Secondary is frozen. For example, if you want to take a snapshot of the Secondary data volumes while the replication on the Secondary is frozen, the prefreeze script can be used to add snapshot plexes to the Secondary data volumes to prepare for the snapshot command.
  • The quiesce script
  • The vradmin ibc command executes the quiesce script on the Primary before it sends the IBC message to the Secondary. Use this script to quiesce the application running on the Primary RVG and to make the Primary data volumes consistent at the application level. The vradmin ibc command injects an IBC message in a small amount of time, and hence the duration for which the application remains quiesced is small.
  • The unquiesce script
  • The vradmin ibc command executes this script on the Primary after it sends the IBC message to the Secondary. Use this script to resume the application running on the Primary if the application was quiesced.
  • The onfreeze script
  • The vradmin ibc command executes this script on the Secondary while replication on the Secondary is frozen after receiving the IBC message from the Primary. Use this script to perform the required off-host processing operation, for example, taking a snapshot of the Secondary data volumes.
  • The postfreeze script
  • The vradmin ibc command executes this script on the Secondary after it executes the onfreeze script and after the replication on the Secondary is unfrozen. For example, if a snapshot of the Secondary data volumes was taken in the onfreeze script, this script can be used to reattach the snapshot volumes to the Secondary data volumes.

Sample Scripts

The /etc/vx/vvr/ibc_scripts directory contains the following sample script directories:


sample_db_snapshot
sample_vxfs_snapshot
sample_so_snapshot

These sample scripts show how to use the user-defined scripts with the vradmin ibc command. Refer to the README file provided in /etc/vx/vvr/ibc_scripts directory for instructions on how to use the sample scripts to perform off-host processing tasks.


Note   Note    Sample scripts are provided for reference. Customize the sample scripts to suit your requirements.
 ^ Return to Top Previous  |  Next  >  
Product: Volume Replicator Guides  
Manual: Volume Replicator 4.1 Administrator's Guide  
VERITAS Software Corporation
www.veritas.com