![]() |
![]() |
![]() |
![]() |
![]() |
Migration involves transferring a healthy Primary of a Replicated Data Set (RDS) to a Secondary when the application involved in replication is inactive. Migration of a Primary to a Secondary is useful when the Primary must be brought down for reasons such as maintenance or to make the application active on another node.
In the following illustration, the Primary seattle
is replicating to the Secondary hosts london
and tokyo
.
Click the thumbnail above to view full-sized image.
In the following illustration, the Primary role has been migrated from seattle
to london
and the new Primary london
is replicating to seattle
and tokyo
. If you had already created RLINKs between london
and tokyo
when setting up replication, you do not need to manually reconfigure the additional Secondary tokyo
as a part of the RDS. It will automatically be added as a Secondary of the new Primary london
.
Click the thumbnail above to view full-sized image.
VVR provides the vradmin
migrate
command to migrate a healthy Primary. The vradmin
migrate
command performs the following functions:
The vradmin
migrate
command restores the original configuration if it fails on any of the hosts during its execution.
Before migrating the Primary role, the vradmin
migrate
command displays a warning and prompts the user to confirm whether or not all the applications using the Primary volumes are stopped. To skip this confirmation, use the -s
option with the vradmin
migrate
command, which proves useful in scripts.
Prerequisites for migrating the Primary:
The data volumes in the RDS must be inactive, that is, applications that use the Primary data volumes must be stopped.
All Secondaries must be up-to-date.
All attached RLINKs must be in the connect state.
To migrate a healthy Primary from any host in an RDS:
# vradmin
-g
diskgroup migrate
local_rvgname
newprimary_name
The argument diskgroup is the disk group on the local host
The argument local_rvgname is the name of the RVG on the local host
The argument newprimary_name
is the name of the new Primary host, that is, the existing Secondary host. For an RDS with only one Secondary, this argument is optional. Note that the newprimary_name
argument must be the host name displayed by the vradmin
printrvg
command.