Symantec logo

Implementing decision support

This section describes a procedure for implementing off-host decision support for a volume in a private disk group. The intention is to present an outline of how to set up a replica database. It is beyond the scope of this guide to describe how to configure a database to use this procedure.

 To set up a replica database using the table files that are configured within a volume in a private disk group

  1. Use the following command on the primary host to see if the volume is associated with a version 20 data change object (DCO) and DCO volume that allow instant snapshots and Persistent FastResync to be used with the volume:

    # vxprint -g volumedg -F%instant volume

    This command returns on if the volume can be used for instant snapshot operations; otherwise, it returns off.

    If the volume was created under VxVM 4.0 or a later release, and it is not associated with a new-style DCO object and DCO volume, it must be prepared.

    See "Preparing a volume for DRL and instant snapshots" on page 268.

    If the volume was created before release 4.0 of VxVM, and has any attached snapshot plexes, or is associated with any snapshot volumes, it must be upgraded.

    See "Upgrading existing volumes to use version 20 DCOs" on page 272.

  2. Use the following command on the primary host to check whether FastResync is enabled on a volume:

    # vxprint -g volumedg -F%fastresync volume

    This command returns on if FastResync is enabled; otherwise, it returns off.

    If FastResync is disabled, enable it using the following command on the primary host:

    # vxvol -g volumedg set fastresync=on volume

  3. Prepare the OHP host to receive the snapshot volume that contains the copy of the database tables. This may involve setting up private volumes to contain any redo logs, and configuring any files that are used to initialize the database.
  4. On the primary host, create a new volume in a separate disk group for use as the snapshot volume.

    See "Creating a volume for use as a full-sized instant or linked break-off snapshot" on page 314.

    It is recommended that a snapshot disk group is dedicated to maintaining only those disks that are used for off-host processing.

  5. On the primary host, link the snapshot volume in the snapshot disk group to the data volume:

    # vxsnap -g volumedg -b addmir volume mirvol=snapvol \

      mirdg=snapvoldg

    You can use the vxsnap snapwait command to wait for synchronization of the linked snapshot volume to complete:

    # vxsnap -g volumedg snapwait volume mirvol=snapvol \

      mirdg=snapvoldg

    This step sets up the snapshot volumes, and starts tracking changes to the original volumes.

    When you are ready to create a replica database, proceed to step 6.

  6. On the primary host, suspend updates to the volume that contains the database tables. A database may have a hot backup mode that allows you to do this by temporarily suspending writes to its tables.
  7. Create the snapshot volume, snapvol, by running the following command on the primary host:

    # vxsnap -g volumedg make \

      source=volume/snapvol=snapvol/snapdg=snapvoldg

    If a database spans more than one volume, you can specify all the volumes and their snapshot volumes using one command, as shown in this example:

    # vxsnap -g dbasedg make \

      source=vol1/snapvol=snapvol1/snapdg=sdg \

      source=vol2/snapvol=snapvol2/snapdg=sdg \

      source=vol3/snapvol=snapvol3/snapdg=sdg

    This step sets up the snapshot volumes ready for the backup cycle, and starts tracking changes to the original volumes.

  8. On the primary host, if you temporarily suspended updates to a volume in step 6, release all the database tables from hot backup mode.
  9. On the primary host, deport the snapshot volume's disk group using the following command:

    # vxdg deport snapvoldg

  10. On the OHP host where the replica database is to be set up, use the following command to import the snapshot volume's disk group:

    # vxdg import snapvoldg

  11. The snapshot volume is initially disabled following the join. Use the following commands on the OHP host to recover and restart the snapshot volume:

    # vxrecover -g snapvoldg -m snapvol

    # vxvol -g snapvoldg start snapvol

  12. On the OHP host, check and mount the snapshot volume. The following are sample commands for checking and mounting a file system:

    # fsck -F vxfs /dev/vx/rdsk/snapvoldg/snapvol

    # mount -F vxfs /dev/vx/dsk/snapvoldg/snapvol mount_point

  13. On the OHP host, use the appropriate database commands to recover and start the replica database for its decision support role.

    At a later time, you can resynchronize the snapshot volume' s data with the primary database.

 To refresh the snapshot plexes from the original volume

  1. On the OHP host, shut down the replica database, and use the following command to unmount the snapshot volume:

    # umount mount_point

  2. On the OHP host, use the following command to deport the snapshot volume's disk group:

    # vxdg deport snapvoldg

  3. On the primary host, re-import the snapshot volume's disk group using the following command:

    # vxdg import snapvoldg

  4. The snapshot volume is initially disabled following the join. Use the following commands on the primary host to recover and restart the snapshot volume:

    # vxrecover -g snapvoldg -m snapvol

    # vxvol -g snapvoldg start snapvol

  5. On the primary host, reattach the snapshot volume to its original volume using the following command:

    # vxsnap -g snapvoldg reattach snapvol source=vol \

      sourcedg=volumedg

    For example, to reattach the snapshot volumes svol1, svol2 and svol3:

    # vxsnap -g sdg reattach svol1 \

      source=vol1 sourcedg=dbasedg \

      svol2 source=vol2 sourcedg=dbasedg \

      svol3 source=vol3 sourcedg=dbasedg

    You can use the vxsnap snapwait command to wait for synchronization of the linked snapshot volume to complete:

    # vxsnap -g volumedg snapwait volume mirvol=snapvol

    You can then resume the procedure from step 6.