Symantec logo

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. 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

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   You must read the section "Synchronous Mode Considerations" in the Veritas Volume Replicator Planning and Tuning Guide if you use the synchronous=fail mode.


 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:

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:

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

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. For details, see The latencyprot attribute.

 To enable latency protection


  Note   Before enabling latency protection, read Primary and Secondary disconnected.


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

  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

VVR provides the following modes of SRL overflow protection: autodcm, dcm, and override. For details, see The srlprot attribute. The vradmin set command enables you to set up SRL protection by setting the srlprot attribute of the corresponding RLINK to either autodcm, dcm, override.

 To enable SRL overflow protection

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

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

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.

 To set the network protocol

To set the protocol for RDSs in disk group of version 110120 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

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. For more information on the packet_size attribute, see the Veritas Volume Replicator Planning and Tuning Guide.

 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:

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

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. For more information on network bandwidth limits, see Controlling the network bandwidth used for replication.

 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:

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:

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:

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