https://www.veritas.com/support/en_US/article.000041818
https://sort.symantec.com/public/documents/sf/5.0MP3/linux/html/vvr_admin/ch04s06s07.htm
In this example the PRIMARY is OK and secondary is totally destroyed.
If the PRIMARY RVG is required just interchange the commands below as appropriate.
Check licenses on PRIMARY and SECONDARY.
# vxlictest -n "VERITAS Volume Manager" -f VVR
On PRIMARY
# vxprint -ht | egrep "^r|^v"
Look for the volume names and sizes in the primary RVG
The end of the list of volumes in the RVG is where the usetype=SRL volume is listed
An example output is below - this
rv RVG_name 1 DISABLED CLEAN primary 1 srlvol
rl pri_rlink_name RVG_name DETACHED STALE secondary dgname sec_rlink_name
v datavol RVG_name ENABLED ACTIVE 204800 SELECT - fsgen
v srlvol RVG_name ENABLED ACTIVE 225280 SELECT - SRL
On SECONDARY we must initialize the diskgroup and make the volumes.
Contents of the volumes will be resynced from the PRIMARY.
# vxdg init dgname disk1 disk2 disk3 disk4
# vxassist -g dgname make datavol size
Repeat for other data volumes in primary RVG
# vxassist -g dgname make srlvol size
# vxassist addlog datavol logtype=dcm
The DCM log is mandatory for an RVG data volume on PRI only but added now on secondary since we may eventually takeover or migrate.
# vxmake -g dgname rlink sec_rlink_name local_host=secondary remote_host=primary remote_dg=primary_dgname remote_rlink=pri_rlink_name
# vxmake -g dgname rvg rvg_name datavol=datavol,datavol2,datavol3 srl=srlvol rlink=sec_rlink_name
# vxprint -Pl
On PRIMARY
# vxdg list to get the diskgroup ID
# vxprint -Pl to get the rlink rid
On SECONDARY use vxedit to set the remote_dg_dgid and remote_rlink_rid for sec_rlink_name.
Note - these two rlink parameters are undocumented in the vxedit man page.
The protocol, srlprot, synchronous and other RLINK parameters can also be set at this stage for the SECONDARY RLINK.
Check the /etc/vx/vras/.rdg file for the diskgroup ID from the primary
# vxedit -g dgname set remote_dg_dgid=primary_dgid sec_rlink_name
# vxedit -g dgname set remote_rlink_rid=pri_rlink_rid sec_rlink_name
The other names are set above in the vxmake command for the rlink but the numbers will need to be edited for the RVG to connect.
# vxdg list dgname to get the diskgroup ID
# vxprint -Pl to get the rlink rid
On PRIMARY Use vxedit to set the remote_dg, remote_dg_dgid, remote_rlink and remote_rlink_rid for pri_rlink_name.
Since the secondary rlink is new, it will usually have a new rlink_rid value
# vxedit -g primary_dgname set remote_dg=dgname pri_rlink_name
# vxedit -g primary_dgname set remote_dg_dgid=secondary_dgid pri_rlink_name
# vxedit -g primary_dgname set remote_rlink=sec_rlink_name pri_rlink_name
# vxedit -g primary_dgname set remote_rlink_rid=secondary_rlink_rid pri_rlink_name
on BOTH sides
# vxprint -Pl check that the outputs on PRIMARY match those expected on SEC, and vice versa
On SECONDARY
# vxrvg -g dgname start rvg_name to start the secondary RVG.
# vxrlink -g dgname att sec_rlink_name
# vxprint -htg dgname | grep "^r"
The RLINK and RVG will both be ENABLED ACTIVE until re-attached on the primary.
Then the RLINK will change to CONNECT ACTIVE. Check that VVR network ports are in LISTEN state
On PRIMARY
If the RVG was still in DCM logging then dissociate and re-associate the SRL volume to the RVG
Then restart VVR daemons and recover RVG and RLINK RVG.
# vxvol -g primary_dgname dis SRLVOL_name
# vxvol -g primary_dgname aslog RVG_name SRLVOL_name
# vradmin -g primary_dgname printvol RVG_name
# vradmin -g primary_dgname printrvg RVG_name
# vradmin -g primary_dgname repstatus RVG_name
# vxstart_vvr stop
# vxstart_vvr start
# vrport
# netstat -an | egrep "8199|8989"
# vxprint -htg primary_dgname | grep ^r
# vxrvg -g primary_dgname recover RVG_name
# vxrlink -g primary_dgname recover RLK_name
# vradmin -g primary_dgname resync RVG_name
If the rlink was DETACHED then reattach the RLINK on PRIMARY - with -a ( Autosync flag )
Any config errors will be identified and must be fixed with vxedit command.
These will usually be names / addresses / numbers.
# vxrlink -g primary_dgname -a att pri_rlink_name
Monitor the autosync or resync draining the DCM log
# vxrlink -g DG_name -i 5 status RLK_name
Watch for the DCM log emptying. Use CTRL-C to interrupt.
Proceed with stoprep/startrep/pauserep/resumerep using vradmin as required to meet the bandwidth / resync times for the data volumes on secondary.