Go to main content

Oracle® Solaris Cluster Data Replication Guide for ZFS Snapshots

Exit Print View

Updated: October 2018
 
 

How to Modify an Oracle Solaris ZFS Snapshot Replication Component

Before You Begin

Ensure that the following conditions are met:

  1. Assume the root role or assume a role that is assigned the Geo Management RBAC rights profile.

    For more information about RBAC, see Securing Disaster Recovery Framework Software in Installing and Configuring the Disaster Recovery Framework for Oracle Solaris Cluster 4.4.


    Note -  If you use a role with Geo Management RBAC rights, ensure that the /var/cluster/geo ACLs are correct on each node of both partner clusters. If necessary, assume the root role on the cluster node and set the correct ACLs.
    # chmod A+user:username:rwx:allow /var/cluster/geo

    The /var/cluster/geo directory must have the correct access control lists (ACL) applied for compatibility between the Geo Management RBAC rights profile and Oracle Solaris ZFS snapshot software.


  2. The script-based plug-in evaluation rules for the replication component is correct in the file that is already associated with the protection group. The protection group configuration output of geopg show will display which file is associated with the protection group.

    For more information about configuration files, see configuration_file Property in Administering the Disaster Recovery Framework for Oracle Solaris Cluster 4.4.

  3. Update the ZFS snapshots configuration file with the changed information for an existing replication component. For the parameters that you do not want to modify, specify the same values that exist in the replication component.

    Note -  You must specify existing values for unchanged parameters and new values for the parameters to be modified. Hence, it is recommended to save the configuration file after you create the replication component, so that you can edit required values when you want to modify the replication component.
    1. If you have a saved copy of the configuration file used to create the replication component, use that file. Otherwise, make a copy of the /opt/ORCLscgrepzfssnap/etc/zfs_snap_geo_config replication configuration file to a different location, such as /var/tmp/geo/zfs_snapshot/zfs_snap_geo_config.
      # cp /opt/ORCLscgrepzfssnap/etc/zfs_snap_geo_config /var/tmp/geo/zfs_snapshot
    2. Edit this replication configuration file with updates for the existing replication component. Fill in the existing values for unchanged parameters and new values for the parameters that require to be modified.

    For example, if you want to modify the REPLICATION_INTERVAL to 180 and NUM_OF_SNAPSHOTS_TO_STORE to 1 for an existing replication component repcom1 in a protection group pg1 configured between clusters paris and newyork. If the replication configuration file to use for repcom1 is /var/tmp/geo/zfs_snapshot/zfs_snap_geo_config, then set these new values in that file, keeping all other parameters unchanged.

    PS=paris-newyork 
    PG=pg1
    REPCOMP=repcom1 
    REPRS=repcom1-repstatus-rs
    REPRG=pg1-repstatus-rg 
    DESC="Protect app1-rg1 using ZFS snapshot replication"
    APPRG=app1-rg1 
    CONFIGFILE=/var/tmp/geo/zfs_snapshot/sbp_conf
    LOCAL_REP_USER=zfsuser1 
    REMOTE_REP_USER=zfsuser2 
    LOCAL_ZPOOL_RS=par-app1-hasp1
    REMOTE_ZPOOL_RS=ny-app1-hasp1 
    LOCAL_LH=paris-lh 
    REMOTE_LH=newyork-lh
    LOCAL_DATASET=srcpool1/app1-ds1 
    REMOTE_DATASET=targpool1/app1-ds1-copy
    REPLICATION_INTERVAL=180 
    NUM_OF_SNAPSHOTS_TO_STORE=1
    REPLICATION_STREAM_PACKAGE=false 
    SEND_PROPERTIES=true 
    INTERMEDIARY_SNAPSHOTS=false
    RECURSIVE=true 
    MODIFY_PASSPHRASE=false 
  4. On the node of the local partner having the changed replication configuration file, run the zfs_snap_geo_register script to modify the replication component.

    Use the zfs_snap_geo_register script with the modified configuration file.

    # /opt/ORCLscgrepzfssnap/util/zfs_snap_geo_register -f /var/tmp/geo/zfs_snapshot/zfs_snap_geo_config

    The command modifies the replication component in a protection group on the local cluster. If the partner cluster contains a protection group with the same name, the command also propagates the new configuration to the partner cluster.

    You can perform this procedure from either cluster. However, if you are using a saved configuration file that was used to create replication component from the primary cluster, perform this procedure on the primary cluster since the values in the file will be appropriate from the primary cluster.

  5. Check that the new parameters reflect in the configuration of the replication component on each partner cluster.

    For example, you can type the following command on one node of paris cluster and one node of newyork cluster:

    # geopg show pg1
    ..... 
         SBP Script-based plug-in configurations: 
                          repcom1 
                   .....
                          repcom1_create_config_args :
        ......,REPLICATION_INTERVAL=180,NUM_OF_SNAPSHOTS_TO_STORE=1,...... 

    You can also check the relevant extension properties of the replication agent resource associated with the replication component to check that the new values have been set correctly. For information about extension properties of replication agent resource type ORCL.ZFSSnapRepAgent, see Disaster Recovery Framework Properties for Oracle Solaris ZFS Snapshot.

    For example, you can type the following command on one node of paris cluster and one node of newyork cluster to check if the configuration is updated.

    # /usr/cluster/bin/clresource show -p REPLICATION_INTERVAL -p  NUM_OF_SNAPSHOTS_TO_STORE repcom1-snap-rs 
        === Resources === 
        Resource:         repcom1-snap-rs 
             --- Standard and extension properties --- 
             Num_of_snapshots_to_store:         1 
          Class:                                extension
          Description:             The number of replication snapshots to keep. 
          Per-node:                False
    
        Type:                      int 
          Replication_interval:    180 
          Class:                   extension
          Description:             The interval in seconds between ZFS snapshot replication cycles.
          Per-node:                False
        Type:                      int

    Note -  If you only modify parameters that correspond to those extension properties of replication agent resource type ORCL.ZFSSnapRepAgent that can be tuned anytime, then such modification attempt will not disable the replication agent resource when modifying such extension properties. But if you modify any parameters that correspond to extension properties that can be tuned when the resource is disabled, then such modification attempt will disable the replication agent resource, modify its properties, and then bring it back online if it was online earlier.