Go to main content

Oracle® Solaris Cluster Geographic Edition Data Replication Guide for ZFS Snapshots

Exit Print View

Updated: February 2017
 
 

Planning Remote Replication Using Oracle Solaris ZFS Snapshot

To configure replication using Oracle Solaris ZFS snapshot, you must use the configuration file and the setup script delivered in the package ha-cluster/geo/replication/zfs-snapshot for setting up protection groups. The setup script uses the parameters in the configuration file to configure the Oracle Solaris ZFS snapshot replication. The setup script performs the following operations to set up the replication:

  1. Creates the protection group.

  2. Creates the replication component.

  3. Adds the application resource groups to the protection group.

You must use the configuration file and the setup script to do the following:

  • Add more snapshot replication components to an existing ZFS snapshot replication protection group.

  • Create more such protection groups.

  • Modify the properties of an existing ZFS snapshot replication component.

This section contains the following information:

Guidelines for Remote Replication Using Oracle Solaris ZFS Snapshot

Note the following guidelines and restrictions when planning your Oracle Solaris ZFS snapshot remote replication configuration:

  • Supported versions of Oracle Solaris ZFS snapshot software – Because Oracle Solaris ZFS snapshots is an inherent part of Oracle Solaris. OSCGE ZFS snapshot replication feature has no extra restrictions related to Oracle Solaris versions other than what is mandated by the corresponding release of Oracle Solaris Cluster software.

  • Restriction for zone clusters as partner members – Zone clusters are supported as members of a Geographic Edition partnership having Oracle Solaris ZFS snapshot protection groups. However, you must perform certain configuration actions in the global zone and this information is covered in the corresponding procedures throughout this guide.

  • Restriction for synchronous replication – Replication using Oracle Solaris ZFS snapshot is asynchronous. Therefore, this data replication feature in Oracle Solaris Geographic Edition does not support synchronous replication, which does not consider data to be committed to stable storage until it is committed to stable storage on both the primary and secondary storage systems.

  • Quorum devices – Do not configure a replicated volume as a quorum device. Locate any quorum devices on a shared unreplicated volume or use a quorum server.

  • Replication user – Configure a root or non-root user to perform replication using Oracle Solaris ZFS snapshot.

  • SSH setup – Set up SSH public/private keys and passphrase for the replication user on a cluster. Ensure that the replication user on a cluster has the same SSH passphrase protecting the user's private key on all nodes of the same cluster. For more information, see Use Case: Setting Up Replication User and SSH.

For guidelines and requirements related to Oracle Solaris ZFS snapshot, refer to the Oracle Solaris ZFS documents at Managing ZFS File Systems in Oracle Solaris 11.3.

Overview of the Oracle Solaris ZFS Snapshot Remote Replication Configuration File

Oracle Solaris ZFS snapshot remote replication with Geographic Edition is developed with the script-based plug-in module of Geographic Edition. Your ZFS snapshots replication configuration must comply with all rules of the script-based plug-in. For each protection group, you must provide a script-based plug-in configuration file on each node. For more information, see How to Create and Configure an Oracle Solaris ZFS Snapshot Protection Group.

Additionally, the replication configuration file zfs_snap_geo_config is shipped with OSCGE ZFS snapshot replication software. Creation of the replication protection group for Geographic Edition is an automated process that takes the ZFS snapshots replication configuration file as input and performs the necessary actions. This file provides the parameters that are used to create a protection group, replication component, and replication options. The zfs_snap_geo_register setup script uses the configuration file to configure the replication. The essential content of this file consists of the following key=value pairs:

PS

Name of the partnership.

PG

Name of the protection group.

REPCOMP

Name of the replication component. This name is used to create a resource group named REPCOMP-snap-rg and a resource named REPCOMP-snap-rs. An entry for this replication component must also be found in the file pointed to by CONFIGFILE.

REPRS

Name of the replication status resource that monitors snapshots replication.

REPRG

Name of the replication status resource group to contain the replication resource.

DESC

Description for the protection group.

APPRG

Name of the application resource group.

CONFIGFILE

Path to the script-based plug-in configuration file.

LOCAL_REP_USER

Name of the replication user on the local cluster.

REMOTE_REP_USER

Name of the replication user on the remote cluster.

LOCAL_PRIV_KEY_FILE

Path to the file that holds the SSH private key of the local replication user on the local cluster nodes. Leave this parameter empty to use the default path used by ssh-add.

REMOTE_PRIV_KEY_FILE

Path to the file that holds the SSH private key of the remote replication user on the remote cluster nodes. Leave this parameter empty to use the default path used by ssh-add.

LOCAL_ZPOOL_RS

Name of the HAStoragePlus resource in the application managing the ZFS pool on the local cluster.

REMOTE_ZPOOL_RS

Name of the HAStoragePlus resource in the application managing the ZFS pool on the remote cluster.

LOCAL_LH

Logical hostname on local cluster to be used as hostname for replication.

REMOTE_LH

Logical hostname on remote cluster to be used as hostname for replication.


Note -  If an application resource group is failover and manages multiple zpools, one local_lh and one remote_lh is required for one such application resource group. If an application resource group is scalable, one local_lh and one remote_lh should be specified for each zpools managed by the application resource group.
LOCAL_DATASET

ZFS dataset on the local cluster that is put under replication

REMOTE_DATASET

ZFS dataset on the remote cluster that is put under replication. If you do not provide a value for the ZFS dataset on the remote cluster, it uses the LOCAL_DATASET value as the default value.

REPLICATION_INTERVAL

Interval between ZFS snapshot replication cycles in seconds. The default value is 120. Minimum value is 0.

NUM_OF_SNAPSHOTS_TO_STORE

Number of successfully replicated snapshots to keep on the local and remote sides. The default value is 2. Minimum value is 1.


Note -  Use a low value for NUM_OF_SNAPSHOTS_TO_STORE. Storing more replication snapshots increases the duration of the replication cycle and also space consumption in the ZFS pools on the partner clusters.
REPLICATION_STREAM_PACKAGE

Specifies whether the replication should use replication stream package. The default value is FALSE.

SEND_PROPERTIES

Specifies whether ZFS dataset properties must be part of the snapshot streams. The default value is TRUE.

INTERMEDIARY_SNAPSHOTS

Specifies whether to send intermediary snapshots during incremental replication. The default value is FALSE.

RECURSIVE

Specifies whether to replicate the entire hierarchy of the local dataset. The default value is TRUE.

MODIFY_PASSPHRASE

Specifies whether to modify the replication user SSH passphrases, during an attempt to modify an existing replication component. The default value is FALSE.


Note -  Only one parameter out of RECURSIVE and INTERMEDIARY_SNAPSHOTS can be TRUE at the same time. Only one parameter out of RECURSIVE and REPLICATION_STREAM_PACKAGE can be TRUE at the same time.

For more information, see Chapter 12, Script-Based Plug-Ins in Oracle Solaris Cluster 4.3 Geographic Edition System Administration Guide.

Geographic Edition Properties for Oracle Solaris ZFS Snapshot Replication

This section describes the properties that can be modified for Oracle Solaris ZFS snapshot remote replication.

The following table lists the general properties.

Property Type
Properties
General protection group properties
  • RoleChange_ActionCmd

  • Timeout

  • External_Dependency_Allowed

  • RoleChange_ActionArgs

You can run the zfs_snap_geo_register script with the changed configuration file to modify properties that are specified in the configuration file. For more information, see How to Modify an Oracle Solaris ZFS Snapshot Replication Component. To change general protection group properties, use the geopg set-prop command.

Remote Replication Layer Process for Validating the Application Resource Groups and Remote Replication Entities

During protection group validation, the Oracle Solaris ZFS snapshot remote replication layer validates the replication entities such as resource groups and resources relevant to the replication setup. The Geographic Edition software creates the replication resource group and its resources, if they do not already exist. If a resource group or resource of the same name already exists, the Geographic Edition software might modify its properties. The software cannot create a new resource group or a resource of the same name if one already exists. The software also validates the affinity and dependency from the application to the replication infrastructure as required to include it in the replication setup. For more information about the resource groups, resources, and their affinities and dependencies, see Overview of Data Replication Using Oracle Solaris ZFS Snapshot and Use Cases for Oracle Solaris ZFS Snapshot Replication.

Ensure that the Auto_start_on_new_cluster property is set to FALSE on the application resource group.

If the partner cluster is a zone cluster, ensure that the replication logical hostname resource group and resource in the global zone has the correct affinity and dependency. For information about affinity and dependency, see How to Create and Configure an Oracle Solaris ZFS Snapshot Protection Group. Also, ensure that the Auto_start_on_new_cluster property is set to TRUE on that logical hostname resource group.

During protection group validation, the Oracle Solaris ZFS snapshot remote replication layer validates the replication configuration. It verifies and modifies the replication configuration to ensure that the following configuration conditions are met:

  • Application resource groups in the protection group have the Auto_start_on_new_cluster property set to False.

  • Appropriate resource group affinities, resource properties, and dependencies exist on the various resource groups and resources that are part of the protection group.

When you bring a protection group online, the application resources groups participating in that protection group are brought online only on the protection group's primary cluster. Setting the Auto_start_on_new_cluster property to False prevents the Oracle Solaris Cluster Resource Group Manager (RGM) from automatically starting the application resource groups. In this case, the startup of resource groups is reserved for the Geographic Edition software.

Application resource groups must be online only on the primary cluster when the protection group is activated.


Caution

Caution  -  Do not change, remove, or take offline infrastructure or replication resource groups and resources. Use only Geographic Edition commands to administer infrastructure and replication resource groups and resources that are internal entities managed by Geographic Edition software. Altering the configuration or state of these entities directly with Oracle Solaris Cluster commands might result in unrecoverable failure.


At creation time, when the validation is complete, the Geographic Edition software adds the application resource group to the protection group if not added already.