![]() |
![]() |
![]() |
![]() |
![]() |
After creating the Primary RVG of the RDS, go on to adding a Secondary. Use the vradmin
addsec
command to add a Secondary RVG to an RDS. This command can also be used to add additional Secondary RVGs. The vradmin
addsec
command can be issued from any host that is already in the RDS.
Note
If the RDS contains the Primary only, the command must be issued on the Primary. If you issue the
vradmin
addsec
command on the Secondary to be added to the RDS, the command fails as expected.
The vradmin
addsec
command performs the following operations by default:
-sdg
with the vradmin
addsec
command to specify a different disk group on the Secondary.
-nodcm
option to specify that DCMs are not to be added to the data volumes.
The vradmin
addsec
command creates the DCM of an appropriate default size based on the size of the volume and mirrors the DCM by default. To create and add a DCM of a size that is different from the default, see Associating a Data Change Map to a data volume. Run the vradmin
addsec
command after you have associated the DCMs of the required size to the data volumes.
vradmin addsec
command associates the corresponding volume set to the Secondary, if the volume set exists on the Secondary. The volume set on the Secondary must include volumes of the same name, lengths and indices as the component volumes on the Primary. If the volume set exists on the Secondary and the volume set configuration is correct except that it does not include all of the component volumes corresponding to those in the volume set on the Primary, the vradmin
addsec
command attempts to add the remaining component volumes to the volume set on the Secondary and then associate the volume set to the Secondary RVG. This command succeeds if all of the remaining component volumes exist on the Secondary with the same names, lengths, and indices as the component volumes on the Primary. However, if any of the component volumes do not exist on the Secondary or have a mismatched name, length, or index, the vradmin
addsec
command fails with the appropriate error message.
If the volume set does not exist on the Secondary, but the component volumes exist with the same names, lengths, and indices, the vradmin addsec
command creates the volume set on the Secondary and then associates it to the Secondary RVG.
rlk
_remotehost
_rvgname
. If you choose to use names other than the default, use the prlink
and srlink
attributes of the vradmin
addsec
command to specify the Primary and Secondary RLINK names. For an example of how to specify the RLINK names, see Example 2:.
Best practices for adding a Secondary
/etc/hosts
files on each system or to the name server database of your name service. Make sure the IP addresses are available (that is, plumbed and up) on the appropriate hosts for your configuration.
Primary RLINK: rlk_remotehost_rvgname. For example: rlk_london_hr_rvg
Secondary RLINK: rlk_remotehost_rvgname. For example: rlk_seattle_hr_rvg
Prerequisites for adding a Secondary
On the Secondary to be added, do the following:
Create a disk group with the same name as the Primary disk group.
Create data volumes of the same names and lengths as the Primary data volumes.
Create an SRL of the same name as the Primary SRL. Note that the SRL cannot be a volume set or a component volume of a volume set.
If the Primary RVG includes a volume set, make sure that the component volumes on the Secondary to be added have identical names, lengths, and indices as the component volumes on the Primary.
Make sure the
/etc/vx/vras/
.rdg
file on the Secondary host to be added to the RDS contains the Primary disk group ID. Ensure that each disk group ID entry in the .rdg
file is on a separate line. Refer to the .rdg
file for the sample format for the disk group ID entry.
The vradmin
addsec
command checks whether the Primary RVG is authorized to create a corresponding Secondary RVG on the specified Secondary host. A Primary is determined as authorized if the /etc/vx/vras/.rdg
file on the specified Secondary host contains the Primary disk group ID. If the Primary contains multiple RVGs in the same disk group, only one entry is required. A plus (+) sign in the /etc/vx/vras/.rdg
file on the Secondary host indicates that all Primary RVGs on all hosts are authorized to create a Secondary RVG on the specified Secondary host.
The /etc/vx/vras/.rdg
file on the Secondary host is only used for authorization checking when a Secondary is added, or when remote data volumes are synchronized or verified. To perform these operations after a Secondary takes over from the Primary, the original Primary host should also have an /etc/vx/vras/.rdg
file containing the disk group ID for the new Primary host.
To display the Primary disk group ID, issue the following command on the Primary host:
For example, to enable host seattle
to create an RVG on Secondary host london
the .rdg
file on the host london
must have the following entries, each on a new line.
# vradmin -g
local_diskgroup addsec
local_rvgname pri_hostname \
sec_hostname
The argument local_diskgroup
is the name of the disk group on the local host.
The argument local_rvgname
is the name of the RVG on the local host.
The arguments pri_hostname
and sec_hostname
are either resolvable hostnames or IP addresses for the Primary and the Secondary hosts. These names are used as local_host
and remote_host
attributes while creating RLINKs. The local_host
and remote_host
specify the network connection to use for the Primary and Secondary RLINKs.
Use the -nodcm
option if you do not want to add DCMs to the data volumes. By default, DCMs are automatically added unless the -nodcm
option is specified.
Note
By default, SRL protection on the new Primary and Secondary RLINKs is set to
autodcm
. If you specify the -nodcm
option, the vradmin
addsec
command disables SRL protection.
Note that the Secondary RVG is added to the disk group with the same name as the Primary disk group, unless specified otherwise using the -sdg
option.
This example shows how to add a Secondary host london_priv
to the RDS, which contains the RVG hr_rvg
. For replication, this example uses a private network with the Primary hostname seattle_priv
, Secondary hostname london_priv
. On the Secondary, the RVG is added to the same disk group as the Primary, that is, hrdg
. This example automatically adds DCMs to the data volumes.
# vradmin -g hrdg
addsec hr_rvg seattle_priv london_priv
This example shows how to add the Secondary host london_priv
to the RDS, which contains the RVG hr_rvg
. It creates the Secondary with the specific Primary and Secondary RLINK names to
_london
and to
_seattle
. The RLINK connects the Primary host seattle_priv
and the Secondary host london_priv
. On the Secondary, the RVG is added to the same disk group as the Primary, that is, hrdg
.
# vradmin -g hrdg
addsec hr_rvg seattle_priv london_priv
\
prlink=to_london
srlink=to_seattle