Go to main content

Oracle® Solaris Cluster Geographic Edition Data Replication Guide for Oracle Solaris Availability Suite

Exit Print View

Updated: July 2014, E39670-01
 
 

Managing Fallback Snapshots Manually

Fallback snapshots are described in Protecting Data on Replicated Volumes From Resynchronization Failure. The easiest way to enable a fallback snapshot for a volume is to use the automatic configuration procedures described in Automatically Enabling Fallback Snapshots. However, if a device group is added to a protection group without configuring automatic fallback snapshots for its volumes, they can still be configured manually. This section describes the procedures for manually enabling, disabling and modifying a fallback snapshot for a volume in such a device group.

The Snapshot_volume Property

One replication resource group, containing one replication resource, is automatically created for a device group on each cluster when it is added to a protection group, as described in Availability Suite Replication Resource Groups. The Snapshot_volume property of the replication resource can be used to configure fallback snapshots for its device group. The Snapshot_volume property is a string array, so it can be set to as many fallback snapshot configurations as you have volumes in the device group.

You can enable a fallback snapshot on any of the volumes configured on the device group by appending an entry to those already assigned to the Snapshot_volume property. Each entry is a string of the format:

master_vol:shadow_vol:bitmap_shadow_vol

The variable master_vol is set to the full path name of the secondary volume, shadow_vol is set to the full path name of the compact dependent shadow volume that serves as a fallback snapshot for the secondary volume, and bitmap_shadow_vol is set to the full path name of the bitmap volume for the shadow volume. The three fields are separated by colons, and no spaces are permitted anywhere in the entry.


Note -  The Snapshot_volume property is set on the replication resource associated with a device group, not on the device group itself. To view the value of the Snapshot_volume property, you must therefore use the clresource show command on the replication resource device-group-rep-rs.

Manually Enabling Fallback Snapshots

To manually enable a fallback snapshot, the replicated volume must already be configured and added to a protection group as described in How to Add a Data Replication Device Group to an Availability Suite Protection Group. You must also prepare two volumes on each cluster to use for the fallback snapshot as described in Availability Suite Volume Sets.

Because the Snapshot_volume property can contain multiple values in the format master_vol:shadow_vol:bitmap_shadow_vol, you append a new entry to those already assigned to the property by using the += (plus-equal) operator, as shown in this example:

-p Snapshot_volume+=/dev/md/rdsk/avsset/d100:/dev/md/rdsk/avsset/d102:/dev/md/rdsk/avsset/d103

In this entry the replicated volume is /dev/md/avsset/rdsk/d100, in the device group avsset. The fallback snapshot uses the shadow volume /dev/md/avsset/rdsk/d102. Its bitmap shadow volume is /dev/md/avsset/rdsk/d103.

Example 5  Manually Enabling a Fallback Snapshot

This example configures fallback snapshots on both clusters for a replicated volume /dev/md/avsset/rdsk/d100 in the Availability Suite device group avsset. For simplicity, this example assumes that you are enabling fallback snapshots for the replicated volume on both clusters. It also assumes the same path names for the replicated volume, the shadow volume and the bitmap shadow volume on both clusters. In practice you can use different volume names on each cluster in a partnership as long as the volumes on any one cluster are in the same device group, and the device group to which they belong has the same name on both clusters.

In this example a fallback snapshot on each cluster is configured by using the compact dependent shadow volume /dev/md/avsset/rdsk/d102 and the bitmap shadow volume /dev/md/avsset/rdsk/d103. The protection group of the replicated volume is avspg. The device group avsset is created by using Solaris Volume Manager software, but any type of device group supported by the Geographic Edition software can be used with fallback snapshots.

Perform Steps 1 and 2 of the following procedure on one node of either cluster. Perform Step 3 on one node of both clusters. Perform Step 4 on one node of the cluster that is currently secondary for the device group.

  1. Perform this step on one node of either cluster.

    Verify which cluster is the current primary and which is the current secondary for the device group containing the volume for which you are enabling a fallback snapshot:

    phys-newyork-1# /usr/sbin/sndradm -P
  2. Perform this step on one node of either cluster.

    Identify the resource group used for the replication of the device group avsset. It will have a name of the form protection-group-rep-rg and it will contain a resource named device-group-rep-rs, as described in Availability Suite Replication Resource Groups. In this example the replication resource group is called avspg-rep-rg, and the replication resource is called avsset-rep-rs.

    phys-newyork-1# geopg list
  3. Perform this step on one node of each cluster on which you want to configure fallback snapshots.

    Append the entry /dev/md/avsset/rdsk/d100:/dev/md/avsset/rdsk/d102:/dev/md/avsset/rdsk/d103 to the Snapshot_volume property on the resource avsset-rep-rs. Do not put spaces adjacent to the colons, and ensure that you include the + sign in the operator:

    phys-newyork-1# clresource set -g avspg-rep-rg
    -p Snapshot_volume+=/dev/md/avsset/rdsk/d100:/dev/md/avsset/rdsk/d102:/dev/md/avsset/rdsk/d103
    avsset-rep-rs
  4. To enable the fallback snapshot, perform this step on one node of the cluster that is currently secondary for the device group.

    Attach the snapshot volume to the secondary replicated volume. In this command you will again specify the master volume, shadow volume, and bitmap shadow volume, separated by spaces:

    phys-newyork-1# /usr/sbin/sndradm -C avsset -I a /dev/md/avsset/rdsk/d100
    /dev/md/avsset/rdsk/d102 /dev/md/avsset/rdsk/d103

Manually Disabling Fallback Snapshots

A Snapshot_volume property can contain multiple entries, one for each replicated volume in its associated device group. If you want to disable the fallback snapshot for just one of the replicated volumes in a device group, you must identify the exact entry for that volume and explicitly remove it by using the -= (minus-equal) operator as shown in this example:

-p Snapshot_volume-=/dev/md/rdsk/avsset/d100:/dev/md/rdsk/avsset/d102:/dev/md/rdsk/avsset/d103

You can locate the specific entry for the fallback snapshot you want to disable by using the clresource show command on the device-group-rep-rs resource.

Example 6  Manually Disabling a Fallback Snapshot

This example disables the fallback snapshot for the secondary replicated volume /dev/md/avsset/rdsk/d100. This fallback snapshot was enabled in Example 5, Manually Enabling a Fallback Snapshot. Perform Steps 1 and 2 of the following procedure on one node of either cluster. Perform Steps 3 and 4 on one node of both clusters. Perform Step 5 on one node of the cluster that is currently secondary for the device group.

  1. Perform this step on one node of either cluster.

    Verify which cluster is the current primary and which is the current secondary for the device group containing the volume for which you are disabling a fallback snapshot:

    phys-newyork-1# /usr/sbin/sndradm -P
  2. Perform this step on one node of either cluster.

    Identify the resource group used for the replication of the device group avsset. It will have a name of the form protection-group-rep-rg and it will contain a resource named device-group-rep-rs, as described in Availability Suite Replication Resource Groups. In this example the replication resource group is called avspg-rep-rg, and the replication resource is called avsset-rep-rs.

    phys-newyork-1# geopg list
  3. Perform this step on one node of each cluster.

    Locate the entry you want to delete from those configured on the Snapshot_volume property of the replication resource:

    phys-newyork-1# clresource show -p Snapshot_property avsset-rep-rs
  4. Perform this step on one node of each cluster.

    Unconfigure the Snapshot_volume property. The operator -= removes the specified value from the property. Ensure that you include the - sign in the operator, and that you specify the Snapshot_volume entry exactly as it appears in the output of the clresource show command:

    phys-newyork-1# clresource set \
    -p Snapshot_volume-=/dev/md/avsset/rdsk/d100:/dev/md/avsset/rdsk/d102:/dev/md/avsset/rdsk/d103 \
    avsset-rep-rs
  5. Perform this step on one node of the cluster that is currently secondary for the device group.

    Detach the snapshot volume from the replicated data volume. In this command you will again specify the master volume, shadow volume and bitmap shadow volume, separated by spaces:

    phys-newyork-1# /usr/sbin/sndradm -C avsset -I d /dev/md/avsset/rdsk/d100
    /dev/md/avsset/rdsk/d102 /dev/md/avsset/rdsk/d103

Manually Modifying Fallback Snapshots

To manually modify a fallback snapshot, delete the entry you want to change from the Snapshot_volume property, then add the new entry. Follow the procedures that are described in Manually Disabling Fallback Snapshots and in Manually Enabling Fallback Snapshots.