Sun Cluster Software Installation Guide for Solaris OS

Example of How to Enable Data Replication

This section describes how data replication was 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.

How to Enable Replication on the Primary Cluster
  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
    

    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 of the primary cluster to the master volume of the secondary cluster. In addition, this step enables replication to the remote mirror bitmap on volume 4.

    • 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 look like this:


    /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 of the primary disk to be copied to the shadow volume on the same disk. In this example, the master volume is volume 1, the shadow volume is volume 2, and the point-in-time bitmap volume is volume 3.

  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.

How to Enable Replication on the Secondary Cluster
  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