Changing the replication settings for a Secondary

When you add a Secondary to an RDS, the default replication attributes of the Secondary are set to synchronous=off, latencyprot=off, srlprot=autodcm, packet_size=8400 and bandwidth_limit=none.

To display the default replication settings for the Secondary, use the following form of the vxprint command:

vxprint -g diskgroup -Pl

If you are using the UDP protocol, this form of the vxprint command also shows the default packet size.

You can set up the replication mode, latency protection, SRL protection, transport protocol, packet size, and the bandwidth used by VVR using the replication attributes, such as synchronous, latencyprot, and srlprot. These attributes are of the form attribute=value. Each attribute setting could affect replication and must be set up with care.

The vradmin set command enables you to change the replication settings between the Primary and a Secondary. This command can be issued from any host in the RDS. It enables you to perform the following tasks:

The vradmin set command changes the corresponding attributes on both the Primary and Secondary RLINK. The attributes synchronous, latencyprot, and srlprot are only active on the Primary RLINK; however, the Secondary attributes are already set up and ready for use if the Primary role is transferred to the Secondary.

Setting the mode of replication for a Secondary

You can set up VVR to replicate to a Secondary in synchronous or asynchronous mode by setting the synchronous attribute of the RLINK to override, or off respectively.

Setting the synchronous attribute to override puts the RLINK in synchronous mode. During normal operation, VVR replicates in synchronous mode, but if the RLINK becomes inactive due to a disconnection or administrative action, VVR switches temporarily to asynchronous mode and continues to receive updates from the application and store them in the SRL. After the connection is restored and the SRL is completely drained, the RLINK automatically switches back to synchronous mode. Most system administrators set the synchronous attribute to override.

The vradmin command does not allow you to set the synchronous attribute to fail. Use the vxedit command to set the attribute synchronous=fail. For more information on using the vxedit command, refer to the vxedit manual page.

Caution:

To enable asynchronous mode of replication

To set the replication to asynchronous mode, set the synchronous attribute to off.

# vradmin -g diskgroup set local_rvgname sec_hostname 
synchronous=off

The argument local_rvgname is the name of the RVG on the local host and represents its RDS.

The argument sec_hostname is the name of the Secondary host displayed in the output of the vradmin printrvg command. If the RDS contains only one Secondary, the argument sec_hostname is optional.

Example - Setting the mode of replication to asynchronous for an RDS

To set the mode of replication to asynchronous for the RDS hr_rvg between the Primary seattle and the Secondary london, issue the following command on any host in the RDS:

# vradmin -g hrdg set hr_rvg london synchronous=off

To enable synchronous mode of replication

To set the synchronous attribute of the RLINK to override, use the following command:

# vradmin -g diskgroup set local_rvgname sec_hostname \
        synchronous=override
Example - Setting the mode of replication to synchronous for an RDS

To set the mode of replication to synchronous for the RDS hr_rvg between the Primary seattle and the Secondary london, issue the following command on any host in the RDS:

# vradmin -g hrdg set hr_rvg london synchronous=override
Setting the latency protection for a Secondary

The vradmin set command enables you to set the latencyprot attribute to override, fail, or off; it also enables you to specify a latency_high_mark and a latency_low_mark, which indicate when the protection becomes active or inactive.

Set the latencyprot attribute to enable latency protection between a Primary and a Secondary.

Note:

Before enabling latency protection, be sure you understand how latency protection works when the Primary and Secondary are connected or disconnected.

To enable latency protection

  1. Set the latencyprot attribute of the corresponding RLINKs on the Primary and Secondary.

    To set the latencyprot attribute to override:

    # vradmin -g diskgroup set local_rvgname sec_hostname \
            latencyprot=override

    To set the latencyprot attribute to fail:

    #    vradmin -g diskgroup set local_rvgname sec_hostname \
           latencyprot=fail
  2. Set the latency_high_mark and the latency_low_mark attributes:
    # vradmin -g diskgroup set local_rvgname sec_hostname \
            latency_high_mark=high_mark
    # vradmin -g diskgroup set local_rvgname sec_hostname \
            latency_low_mark=low_mark

    The argument local_rvgname is the name of the RVG on the local host and represents the RDS.

    The argument sec_hostname is the name of the Secondary host as displayed in the output of the vradmin printrvg command.

    Note that the value of latency_high_mark must be greater than the value of latency_low_mark. We recommend that the difference between the value of latency_high_mark and the value of latency_low_mark be a small number, for example, 50.

To disable latency protection

Setting the latencyprot attribute to off disables latency protection. This does not limit the number of waiting updates in the SRL.

To set the latencyprot attribute to off:

# vradmin -g diskgroup set local_rvgname sec_hostname 
    latencyprot=off

The argument local_rvgname is the name of the RVG on the local host and represents the RDS.

The argument sec_hostname is the name of the Secondary host as displayed in the output of the vradmin printrvg command.

Setting the SRL overflow protection for a Secondary

VVR provides the following modes of SRL overflow protection: autodcm, dcm, override, fail, and off.

To enable SRL overflow protection

  • Set the srlprot attribute of the corresponding RLINK to either autodcm, dcm, override, or fail.
    • To set the srlprot attribute to autodcm, use the following command:

      # vradmin -g diskgroup set local_rvgname sec_hostname \
              srlprot=autodcm
    • To set the srlprot attribute to dcm, use the following command:

      # vradmin -g diskgroup set local_rvgname sec_hostname \
              srlprot=dcm
    • To set the srlprot attribute to override, use the following command:

       # vradmin -g diskgroup set local_rvgname sec_hostname \
              srlprot=override
    • To set the srlprot attribute to fail, use the following command:

       # vradmin -g diskgroup set local_rvgname sec_hostname \
              srlprot=fail
    • To set the srlprot attribute to off, use the following command:

       # vradmin -g diskgroup set local_rvgname sec_hostname \
              srlprot=off

    The argument local_rvgname is the name of the RVG on the local host and represents the RDS.

    The argument sec_hostname is the name of the Secondary host as displayed in the output of the vradmin printrvg command.

Setting the network transport protocol for a Secondary

The value specified for the protocol attribute determines the protocol that will be used to communicate between the hosts. You can specify one of the following values for the protocol attribute.

  • UDP - The hosts communicate using the UDP/IP protocol.

    VVR automatically calculates the checksum for each data packet it replicates.

  • TCP - The hosts communicate using the TCP/IP protocol, which is the default. If a protocol is not specified, then TCP is used as the protocol of communication between hosts.

    If you specify TCP, the VVR checksum is automatically disabled. VVR relies on the TCP checksum mechanism instead. Also, if a node in a replicated data set is using a version of VVR earlier than 5.1 SP1, VVR calculates the checksum regardless of the network protocol.

  • STORAGE - Used for bunker replication. The Primary host and the bunker SRL communicate using STORAGE protocol. If the storage is directly accessible by the Primary, for example, DAS or NAS, set the protocol to STORAGE. If the bunker is replicating over IP, the protocol can be set to UDP or TCP.

Note:

UDP, TCP, and STORAGE are case sensitive.

To set the network protocol

  • To set the protocol for RDSs in disk group of version 120 or above, the following vradmin command can be used:
    # vradmin -g diskgroup set local_rvgname sec_hostname \
            protocol=protocol_name

    The argument protocol_name is the name of the protocol that the Primary will use to replicate to the Secondary. The protocol can be set to either TCP or UDP.

Setting the packet size for a Secondary

The packet size determines the number of bytes in a packet that are sent to the Secondary host. The packet size can be changed using the packet_size attribute for UDP mode only. If the protocol is set to TCP, the data is sent using the TCP stream.

To set the packet_size

# vradmin -g diskgroup set local_rvgname sec_hostname \
        packet_size=n

The argument local_rvgname is the name of the RVG on the local host and represents the RDS.

The argument sec_hostname is the name of the Secondary host as displayed in the output of the vradmin printrvg command.

The argument n represents the packet size in bytes.

The minimum value for the packet_size is 1300 bytes.

The maximum value of the packet_size is 65464 bytes.

Example - Setting the packet size between the Primary and Secondary

To set the packet size between the Primary host seattle and the Secondary host london to 1400 bytes, issue the following command on any host in the RDS:

# vradmin -g hrdg set hr_rvg london packet_size=1400
Setting the bandwidth limit for a Secondary

Use the bandwidth_limit attribute of the vradmin set command to set the limit on the network bandwidth used to replicate from the Primary to the Secondary. If bandwidth_limit is set to none, then VVR uses the available network bandwidth. The default value is none. To limit the network bandwidth used by VVR when synchronizing volumes that are not part of an RDS, use the bandwidth_limit attribute of the vradmin syncvol command.

To control the network bandwidth used for replication

To limit the bandwidth used for replication between the Primary and a Secondary in an RDS, issue the following command on any host in the RDS. In the command, you can either use the units of bandwidth kbps, mbps, or gbps, or abbreviate the units of bandwidth to k, m, g, respectively. The default unit of bandwidth is bits per second (bps).

# vradmin -g diskgroup set local_rvgname sec_hostname \
        bandwidth_limit=value

The argument local_rvgname is the name of the RVG on the local host and represents the RDS.

The argument sec_hostname is the name of the Secondary host as displayed in the output of the vradmin printrvg command.

Example: Limiting network bandwidth and disabling Bandwidth Throttling for the Secondary

To limit the bandwidth to 30 mbps for the RDS hr_rvg between the Primary seattle and the Secondary london, issue the following command on any host in the RDS:

# vradmin -g hrdg set hr_rvg london bandwidth_limit=30mbps

To disable Bandwidth Throttling for a Secondary

To disable Bandwidth Throttling for a Secondary in an RDS, issue the following command on any host in the RDS:

# vradmin -g diskgroup set local_rvgname sec_hostname \
     bandwidth_limit=none

The argument local_rvgname is the name of the RVG on the local host and represents the RDS.

The argument sec_hostname is the name of the Secondary host as displayed in the output of the vradmin printrvg command.

Example: Disabling Bandwidth Throttling between the Primary the Secondary and controlling the network bandwidth

To disable Bandwidth Throttling for replication between the Primary seattle and the Secondary london of RDS hr_rvg, issue the following command on any host in the RDS:

# vradmin -g hrdg set hr_rvg london bandwidth_limit=none

To control the network bandwidth used to synchronize volumes

To limit the network bandwidth used by VVR when synchronizing volumes that are not part of an RDS, issue the following command:

# vradmin -g diskgroup syncvol local_vols_list \
        remote_hostname.... bandwidth_limit=value

The argument local_vols_list is a comma-separated list of volumes on the local host. The names of the volumes on the local and remote hosts are assumed to be the same.

The argument remote_hostname is a space-separated list of names of the remote hosts on which the volumes to be resynchronized reside. It must be possible for IP to resolve the remote host names.

Example: Limiting network bandwidth used by VVR when using full synchronization

This example shows how to limit the network bandwidth used by VVR when using full synchronization to synchronize the remote volumes on host london with the local volumes hr_dv01, hr_dv02, hr_dv03 in the disk group hrdg on the local host seattle. The names of the disk group and the volumes on the remote host are the same as the names of the disk group and volumes on the local host.

# vradmin -g hrdg -full syncvol hr_dv01,hr_dv02,hr_dv03 london  \
        bandwidth_limit=10mbps