Sun Cluster Software Installation Guide for Solaris OS

Example of How to Enable Data Replication

This section describes how data replication is enabled for the example configuration. This section uses the Sun StorEdge Availability Suite software commands sndradm and iiadm. For more information about these commands, see the Sun Cluster 3.0 and Sun StorEdge Software Integration Guide.

This section contains the following procedures:

ProcedureHow to Enable Replication on the Primary Cluster

Steps
  1. Access nodeA as superuser.

  2. Flush all transactions.


    nodeA# /usr/sbin/lockfs -a -f
    
  3. Confirm that the logical hostnames lhost-reprg-prim and lhost-reprg-sec are online.


    nodeA# /usr/cluster/bin/scstat -g
    nodeC# /usr/cluster/bin/scstat -g
    

    Examine the state field of the resource group.

  4. Enable remote mirror replication from the primary cluster to the secondary cluster.

    This step enables replication from the master volume on the primary cluster to the master volume on the secondary cluster. In addition, this step enables replication to the remote mirror bitmap on vol04.

    • If the primary cluster and secondary cluster are unsynchronized, run this command:


      nodeA# /usr/opt/SUNWesm/sbin/sndradm -n -e lhost-reprg-prim \
      /dev/vx/rdsk/devicegroup/vol01 \
      /dev/vx/rdsk/devicegroup/vol04 lhost-reprg-sec \
      /dev/vx/rdsk/devicegroup/vol01 \
      /dev/vx/rdsk/devicegroup/vol04 ip sync
      
    • If the primary cluster and secondary cluster are synchronized, run this command:


      nodeA# /usr/opt/SUNWesm/sbin/sndradm -n -E lhost-reprg-prim \
      /dev/vx/rdsk/devicegroup/vol01 \
      /dev/vx/rdsk/devicegroup/vol04 lhost-reprg-sec \
      /dev/vx/rdsk/devicegroup/vol01 \
      /dev/vx/rdsk/devicegroup/vol04 ip sync
      
  5. Enable autosynchronization.


    nodeA# /usr/opt/SUNWesm/sbin/sndradm -n -a on lhost-reprg-prim \
    /dev/vx/rdsk/devicegroup/vol01 \
    /dev/vx/rdsk/devicegroup/vol04 lhost-reprg-sec \
    /dev/vx/rdsk/devicegroup/vol01 \
    /dev/vx/rdsk/devicegroup/vol04 ip sync
    

    This step enables autosynchronization. When the active state of autosynchronization is set to on, the volume sets are resynchronized if the system reboots or a failure occurs.

  6. Verify that the cluster is in logging mode.


    nodeA# /usr/opt/SUNWesm/sbin/sndradm -P
    

    The output should resemble the following:


    /dev/vx/rdsk/devicegroup/vol01 ->
    lhost-reprg-sec:/dev/vx/rdsk/devicegroup/vol01
    autosync: off, max q writes:4194304, max q fbas:16384, mode:sync,ctag:
    devicegroup, state: logging

    In logging mode, the state is logging, and the active state of autosynchronization is off. When the data volume on the disk is written to, the bitmap file on the same disk is updated.

  7. Enable point-in-time snapshot.


    nodeA# /usr/opt/SUNWesm/sbin/iiadm -e ind \
    /dev/vx/rdsk/devicegroup/vol01 \
    /dev/vx/rdsk/devicegroup/vol02 \
    /dev/vx/rdsk/devicegroup/vol03
    nodeA# /usr/opt/SUNWesm/sbin/iiadm -w \
    /dev/vx/rdsk/devicegroup/vol02
    

    This step enables the master volume on the primary cluster to be copied to the shadow volume on the same cluster. The master volume, shadow volume, and point-in-time bitmap volume must be in the same device group. In this example, the master volume is vol01, the shadow volume is vol02, and the point-in-time bitmap volume is vol03.

  8. Attach the point-in-time snapshot to the remote mirror set.


    nodeA# /usr/opt/SUNWesm/sbin/sndradm -I a \
    /dev/vx/rdsk/devicegroup/vol01 \
    /dev/vx/rdsk/devicegroup/vol02 \
    /dev/vx/rdsk/devicegroup/vol03
    

    This step associates the point-in-time snapshot with the remote mirror volume set. Sun StorEdge Availability Suite software ensures that a point-in-time snapshot is taken before remote mirror replication can occur.

Next Steps

Go to How to Enable Replication on the Secondary Cluster.

ProcedureHow to Enable Replication on the Secondary Cluster

Before You Begin

Ensure that you completed steps in How to Enable Replication on the Primary Cluster.

Steps
  1. Access nodeC as superuser.

  2. Flush all transactions.


    nodeC# /usr/sbin/lockfs -a -f
    
  3. Enable remote mirror replication from the primary cluster to the secondary cluster.


    nodeC# /usr/opt/SUNWesm/sbin/sndradm -n -e lhost-reprg-prim \
    /dev/vx/rdsk/devicegroup/vol01 \
    /dev/vx/rdsk/devicegroup/vol04 lhost-reprg-sec \
    /dev/vx/rdsk/devicegroup/vol01 \
    /dev/vx/rdsk/devicegroup/vol04 ip sync
    

    The primary cluster detects the presence of the secondary cluster and starts synchronization. Refer to the system log file /var/opt/SUNWesm/ds.log for information about the status of the clusters.

  4. Enable independent point-in-time snapshot.


    nodeC# /usr/opt/SUNWesm/sbin/iiadm -e ind \
    /dev/vx/rdsk/devicegroup/vol01 \
    /dev/vx/rdsk/devicegroup/vol02 \
    /dev/vx/rdsk/devicegroup/vol03
    nodeC# /usr/opt/SUNWesm/sbin/iiadm -w \
    /dev/vx/rdsk/devicegroup/vol02
    
  5. Attach the point-in-time snapshot to the remote mirror set.


    nodeC# /usr/opt/SUNWesm/sbin/sndradm -I a \
    /dev/vx/rdsk/devicegroup/vol01 \
    /dev/vx/rdsk/devicegroup/vol02 \
    /dev/vx/rdsk/devicegroup/vol03
    
Next Steps

Go to Example of How to Perform Data Replication.