Symantec logo

Associating a volume to a Replicated Data Set

This section describes how to use the vradmin addvol command to add a volume to a RDS. The vradmin addvol command can also be used to add a volume set to a RDS, or to add a component volume to a volume set that is associated to an RDS. A component volume of a volume set cannot be added to the RDS directly. For details, see Associating a volume set to an RDS.

You can use the vradmin addvol command to add a volume to a RDS even when replication is in progress. This command associates a volume to all the RVGs of the RDS. Note that volumes of the same name and same length must exist on all Secondaries and the Primary of the RDS. You must create volumes of the required layout on the Secondary and Primary hosts before issuing the vradmin addvol command. If necessary, the vradmin addvol command can be used to add a volume to an RDS that only has a Primary RVG. In this case, there are no Secondary volumes.

By default, the vradmin addvol command adds DCM logs to the data volumes being added to the RDS, if they have not already been added. If any of the data volumes contains a DRL log, the vradmin addvol command removes the DRL log before adding the DCM to the data volume.

The -nodcm option with the vradmin addvol command adds data volumes to the RDS without adding DCMs to the data volumes. If any of the data volumes has a DRL, the DRL is removed before the data volume is associated with the RVG. If -nodcm is issued when any of the RLINKs has srlprot set to dcm or autodcm, and any of the data volumes being added to the RDS does not already have a DCM log, the command will fail.

The vradmin addvol command can be run from any host in the RDS. If the vradmin addvol command fails on any of the hosts in the RDS during its execution, the volume is not added on any host.

Before adding a volume, the vradmin addvol command displays a warning and prompts the user to confirm whether or not the Primary and Secondary volumes contain the same data. To verify that the Primary and Secondary volumes contain the same data, refer to the information provided in the section Performing offline data verification. To synchronize the Primary and Secondary volumes, see Synchronizing volumes on the local host and remote hosts. To skip this confirmation, use the -s option with the vradmin addvol command. The -s option to the vradmin addvol command proves useful in scripts.

Prerequisites for adding a volume to an RDS:

  Create volumes of same name and length as the Primary volume on all the hosts in the RDS.

  Verify that the volumes to be added are inactive.

  Synchronize the volumes using the vradmin syncvol command before adding the volumes to the RDS. Refer to Synchronizing volumes on the local host and remote hosts.


  Note   To add a volume to an RDS that has only a Primary RVG, the prerequisites above do not apply.


 To add a volume to an RDS

# vradmin -g diskgroup addvol local_rvgname volume_name

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

The argument volume_name is the name of the volume to be added to the RDS. Only one volume can be added at a time.

Use the -nodcm option when you do not want to add DCMs to the data volumes. By default, DCMs are automatically added.

Example:

This example shows how to add an existing volume hr_dv01 to all RVGs of the RDS. The disk group hrdg contains the local RVG hr_rvg of the RDS. To add the volume hr_dv01 to all RVGs in the RDS and automatically add DCMs to the data volumes, type the following command on any host:

# vradmin -g hrdg addvol hr_rvg hr_dv01

Verifying the data on the Primary and Secondary volumes

The vradmin syncvol command when used with the -verify option enables you to verify whether the remote volumes and the corresponding local volumes are identical before adding them to an RDS. Use this command when the volumes are not associated with an RVG and the application is inactive (the volumes are not in use). VVR also allows you to verify the data volumes after they have been added to an RDS. For information, refer to Verifying the data on the Secondary.

The vradmin -verify syncvol command only reports the amount of data that is different in percentage between remote and local volumes; it does not synchronize remote volumes with local volumes. If you find that the Primary data and Secondary data do not match then you can use some manual means such as backup and restore or some other method to make the data on the new Secondary volume the same as the Primary and then add it to the RDS.


  Note   Remote volumes can be verified with local volumes only if the /etc/vx/vras/.rdg file on the remote host contains a local disk group ID entry. Ensure that each disk group ID entry in the .rdg file is on a separate line.


Note that the order of the volume names in the local and remote volume lists is important. The vradmin -verify syncvol command verifies the first volume in the remote volume list with the first volume in the local volume list, and so on. Hence, the number of volumes in the local and remote volume lists must be same. Also, the remote disk group name must be specified if volume names are different on local and remote hosts.

It is recommended that the names of the volumes on the local and remote hosts be the same. However, you can verify volumes with different names on the local and remote hosts using the vradmin -verify syncvol command.

 To verify the difference between the local and remote data volumes

# vradmin -g diskgroup -verify syncvol local_vols_list \
remote_hostname...

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 verified reside. It must be possible for IP to resolve the remote host names.

Example:

This example shows how to verify the differences between 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 names of the disk group and volumes on the local host.

# vradmin -g hrdg -verify syncvol hr_dv01,hr_dv02,hr_dv03 london

Synchronizing volumes on the local host and remote hosts

The vradmin syncvol command enables you to synchronize remote volumes with local volumes when the volumes are not associated with an RVG and the volumes are not in use. The data in the volumes on the local host, where you enter the command, is transferred over the network to the volumes on the remote host. The volumes to be synchronized can be component volumes of a volume set. The vradmin syncvol command can also be used to synchronize a volume set itself.

Use the vradmin syncvol command only to synchronize volumes that are not part of an RVG. For example, before adding a volume to an RDS, synchronize the volume using the vradmin syncvol command, and then add it to the RDS.

Using the vradmin syncvol command, you can synchronize remote volumes with local volumes using one of the following options:

By default, the vradmin syncvol command synchronizes the volumes using difference-based synchronization. We recommend that the names of the volumes on the local and remote hosts be the same. However, you can synchronize volumes with different names on the local and remote hosts using the vradmin syncvol command.

You can supply a list of volumes to be synchronized. If you choose this method, the order of the volume names in the local and remote volume lists is important. The vradmin syncvol command synchronizes the first volume in the remote volume list with the first volume in the local volume list, and so on. Hence, the number of volumes in the local and remote volume lists must be the same. Also, the remote disk group name must be specified if volume names are different on the local and remote hosts.


  Note   Remote volumes can be synchronized with local volumes only if the /etc/vx/vras/.rdg file on the remote host contains a local disk group ID entry. Ensure that each disk group ID entry in the .rdg file is on a separate line.


To enable the vradmin syncvol command for a specific disk group on a remote host, enter the local disk group ID in the /etc/vx/vras/.rdg file on the remote host. To enable the vradmin syncvol command for all disk groups on a remote host, enter a plus (+) sign in the /etc/vx/vras/.rdg file on the remote host. For more information, see the vradmin(1M) manual page.

Before synchronizing volumes, the vradmin syncvol command displays a warning and prompts the user to confirm whether or not the data on the volumes on the remote host can be overwritten with the data on the volumes on the local host. To skip this confirmation, use the -s option with the vradmin syncvol command. The -s option to the vradmin syncvol command proves useful in scripts.


Synchronizing volumes using full synchronization

In full synchronization, all data is transferred between hosts. Use full synchronization to create initial copies of volumes. To do a full synchronization, specify the option -full.

To synchronize volumes on local and remote hosts using full synchronization:

# vradmin -g diskgroup -full syncvol local_vols_list \

remote_hostname....

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 do a full synchronization of 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


Synchronizing volumes using difference-based synchronization

In difference-based synchronization, VVR compares the blocks of data between the hosts and then transfers over the network only those blocks of data that are different. Difference-based synchronization is useful when there is little difference between the data on the local and remote volumes.

To synchronize volumes on local and remote hosts using difference-based synchronization:

# vradmin -g diskgroup syncvol local_vols_list remote_hostname....

The argument local_vols_list is a comma-separated list of volumes on the local host. In this case, the names of the volumes on the local and remote hosts are 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 1:

This example shows how to do a difference-based synchronization of the remote volumes on host london with the volumes hr_dv01, hr_dv02, hr_dv03 in the disk group hrdg on local host seattle. The names of the disk group and the volumes on the remote host are the same as names of the disk group and volumes on the local host.

# vradmin -g hrdg syncvol hr_dv01,hr_dv02,hr_dv03 london

Example 2:

In this example, the names of the volumes on the remote host are different from the names of the volumes on the local host. It shows how to do a difference-based synchronization of the remote volumes hr_dvmaster and hr_dvoralog on host london with the local volumes hr_dv01 and hr_dv02 in the disk group hrdg.

# vradmin -g hrdg syncvol hr_dv01,hr_dv02 \

london:hrdg:hr_dvmaster,hr_dvoralog