We recommend that you use the same name for a data volume in a Primary RVG and the corresponding data volume in a Secondary RVG. However, each Secondary data volume can have a different name from that of the corresponding Primary data volume. The Primary does not know whether the name is mapped to a different name at any given Secondary. The name mapping information is maintained entirely at the Secondary. To facilitate name-mapping, each data volume associated to an RVG has a primary_datavol field. This field can be set to the name of the corresponding data volume on the Primary.
By default, global mapping is in effect, that is, the primary_datavol field is not used on any Secondary data volumes. This requires that all the Secondary data volumes have the same names as used on the Primary.
One of the prerequisites for adding a Secondary using the vradmin addsec command is that data volumes of the same names and lengths as the Primary must exist on the Secondary. When adding a Secondary using the vradmin addsec command, the Secondary data volumes cannot have different names from that of the corresponding Primary data volumes.
If you use different names for the Secondary data volumes and their corresponding Primary data volumes, the vradmin migrate command does not set the primary_datavol field on the new Primary after transferring the Primary role. To facilitates seamless transfer of the Primary role, make sure you set the primary_datavol field of the Primary data volumes, in addition to the Secondary. Note that you can use the vradmin command to perform all other VVR operations in a configuration containing differently named volumes on the Primary and Secondary.
There are two ways to set the primary_datavol field on a Secondary data volume. In the examples that follow, the commands are executed only on the Secondary. The Secondary data volume is called secondaryname-dv_name, and the corresponding Primary data volume name is dv_name.
To map the name of a Secondary data volume when it is being associated to the RVG
To set the name of the Primary data volume on a corresponding Secondary data volume when it is being associated with the Secondary RVG, specify the -m option on the vxvol command line:
# vxvol -g diskgroup -m assoc rvg_name \ secondaryname-dv_name dv_name
On the Secondary, display the primary_datavol field for a volume using vxprint -l:
# vxprint -g diskgroup -l secondaryname-dv_name
Volume: secondaryname-vol03 assoc: rvg=rvg_name plexes=secondaryname-vol03-01 primary_datavol=dv_name