Sun Cluster System Administration 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 StorageTek Availability Suite software commands sndradm and iiadm. For more information about these commands, see the Sun StorageTek Availability documentation.

This section contains the following procedures:

ProcedureHow to Enable Replication on the Primary Cluster

  1. Access nodeA as superuser or assume a role that provides solaris.cluster.read RBAC authorization.

  2. Flush all transactions.


    nodeA# lockfs -a -f
    
  3. Confirm that the logical host names lhost-reprg-prim and lhost-reprg-sec are online.


    nodeA# clresourcegroup status
    nodeC# clresourcegroup status
    

    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:

      • For Sun StorEdge Availability Suite software:


        nodeA# /usr/opt/SUNWesm/sbin/sndradm -n -e lhost-reprg-prim \
        /dev/vx/rdsk/devgrp/vol01 \
        /dev/vx/rdsk/devgrp/vol04 lhost-reprg-sec \
        /dev/vx/rdsk/devgrp/vol01 \
        /dev/vx/rdsk/devgrp/vol04 ip sync
        
      • For Sun StorageTek Availability Suite software:


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

      • For Sun StorEdge Availability Suite software:


        nodeA# /usr/opt/SUNWesm/sbin/sndradm -n -E lhost-reprg-prim \
        /dev/vx/rdsk/devgrp/vol01 \
        /dev/vx/rdsk/devgrp/vol04 lhost-reprg-sec \
        /dev/vx/rdsk/devgrp/vol01 \
        /dev/vx/rdsk/devgrp/vol04 ip sync
        
    • For Sun StorageTek Availability Suite software:


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

    • For Sun StorEdge Availability Suite software:


      nodeA# /usr/opt/SUNWesm/sbin/sndradm -n -a on lhost-reprg-prim \
      /dev/vx/rdsk/devgrp/vol01 \
      /dev/vx/rdsk/devgrp/vol04 lhost-reprg-sec \
      /dev/vx/rdsk/devgrp/vol01 \
      /dev/vx/rdsk/devgrp/vol04 ip sync
      
    • For Sun StorageTek Availability Suite software:


      nodeA# /usr/sbin/sndradm -n -a on lhost-reprg-prim \
      /dev/vx/rdsk/devgrp/vol01 \
      /dev/vx/rdsk/devgrp/vol04 lhost-reprg-sec \
      /dev/vx/rdsk/devgrp/vol01 \
      /dev/vx/rdsk/devgrp/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.

    • For Sun StorEdge Availability Suite software:


      nodeA# /usr/opt/SUNWesm/sbin/sndradm -P
      
    • For Sun StorageTek Availability Suite software:


      nodeA# /usr/sbin/sndradm -P
      

    The output should resemble the following:


    /dev/vx/rdsk/devgrp/vol01 ->
    lhost-reprg-sec:/dev/vx/rdsk/devgrp/vol01
    autosync: off, max q writes:4194304, max q fbas:16384, mode:sync,ctag:
    devgrp, 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.

    • For Sun StorEdge Availability Suite software:


      nodeA# /usr/opt/SUNWesm/sbin/iiadm -e ind \
      /dev/vx/rdsk/devgrp/vol01 \
      /dev/vx/rdsk/devgrp/vol02 \
      /dev/vx/rdsk/devgrp/vol03
      nodeA# /usr/opt/SUNWesm/sbin/iiadm -w \
      /dev/vx/rdsk/devgrp/vol02
      
    • For Sun StorageTek Availability Suite software:


      nodeA# /usr/sbin/iiadm -e ind \
      /dev/vx/rdsk/devgrp/vol01 \
      /dev/vx/rdsk/devgrp/vol02 \
      /dev/vx/rdsk/devgrp/vol03
      nodeA# /usr/sbin/iiadm -w \
      /dev/vx/rdsk/devgrp/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.

    • For Sun StorEdge Availability Suite software:


      nodeA# /usr/opt/SUNWesm/sbin/sndradm -I a \
      /dev/vx/rdsk/devgrp/vol01 \
      /dev/vx/rdsk/devgrp/vol02 \
      /dev/vx/rdsk/devgrp/vol03
      
    • For Sun StorageTek Availability Suite software:


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

    This step associates the point-in-time snapshot with the remote mirror volume set. Sun StorageTek 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

Complete the procedure How to Enable Replication on the Primary Cluster.

  1. Access nodeC as superuser.

  2. Flush all transactions.


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

    • For Sun StorEdge Availability Suite software:


      nodeC# /usr/opt/SUNWesm/sbin/sndradm -n -e lhost-reprg-prim \
      /dev/vx/rdsk/devgrp/vol01 \
      /dev/vx/rdsk/devgrp/vol04 lhost-reprg-sec \
      /dev/vx/rdsk/devgrp/vol01 \
      /dev/vx/rdsk/devgrp/vol04 ip sync
      
    • For Sun StorageTek Availability Suite software:


      nodeC# /usr/sbin/sndradm -n -e lhost-reprg-prim \
      /dev/vx/rdsk/devgrp/vol01 \
      /dev/vx/rdsk/devgrp/vol04 lhost-reprg-sec \
      /dev/vx/rdsk/devgrp/vol01 \
      /dev/vx/rdsk/devgrp/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 Sun StorEdge Availability Suite or /var/adm for Sun StorageTek Availability Suite for information about the status of the clusters.

  4. Enable independent point-in-time snapshot.

    • For Sun StorEdge Availability Suite software:


      nodeC# /usr/opt/SUNWesm/sbin/iiadm -e ind \
      /dev/vx/rdsk/devgrp/vol01 \
      /dev/vx/rdsk/devgrp/vol02 \
      /dev/vx/rdsk/devgrp/vol03
      nodeC# /usr/opt/SUNWesm/sbin/iiadm -w \
      /dev/vx/rdsk/devgrp/vol02
      
    • For Sun StorageTek Availability Suite software:


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

    • For Sun StorEdge Availability Suite software:


      nodeC# /usr/opt/SUNWesm/sbin/sndradm -I a \
      /dev/vx/rdsk/devgrp/vol01 \
      /dev/vx/rdsk/devgrp/vol02 \
      /dev/vx/rdsk/devgrp/vol03
      
    • For Sun StorageTek Availability Suite software:


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

Go to Example of How to Perform Data Replication.