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"
Identify the volume names and volume 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:
rv RVG_name 1 DISABLEDCLEAN primary 1 srlvol
rlpri_rlink_name RVG_name DETACHED STALE secondarydgname sec_rlink_name
v datavol RVG_name ENABLED ACTIVE 204800 SELECT - fsgen
v srlvol RVG_name ENABLED ACTIVE 225280 SELECT - SRL
On the SECONDARY we must initialize the disk group and make the volumes. Contents of the volumes will be resynced from the PRIMARY.
# vxdg init <dgname> disk1disk2 disk3 disk4
# vxassist -g <dgname> make datavol <size>
Repeat for other data volumes in primary RVG
# vxassist -g <dgname> make srlvol
# vxassist addlog datavol logtype=dcm
The DCM log is mandatory for an RVG data volume on the PRIMARY 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=primaryremote_dg=primary_dgname remote_rlink=pri_rlink_name
# vxmake -gdgname rvg rvg_name datavol=datavol,datavol2,datavol3 srl=srlvolrlink=sec_rlink_name
# vxprint -Pl
On PRIMARY Identify the diskgroup ID
# vxdg list
Identify the rlink id
# vxprint -Pl
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 manpage. The protocol, srlprot, synchronous and other RLINK parameters can also be set at this stage for the SECONDARY RLINK.
Check the /etc/vx/vras/.rdgfile for the diskgroup ID from the primary
# vxedit -g dgname setremote_dg_dgid=primary_dgid sec_rlink_name
# vxedit -g dgnameset 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
# vxprint-Pl
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 -gprimary_dgname setremote_dg=dgname pri_rlink_name
# vxedit -g primary_dgname setremote_dg_dgid=secondary_dgid pri_rlink_name
#vxedit -g primary_dgname setremote_rlink=sec_rlink_name pri_rlink_name
# vxedit -g primary_dgname setremote_rlink_rid=secondary_rlink_rid pri_rlink_name
on BOTH nodes
# vxprint -Pl
Check that the outputs on PRIMARY match those expected on the SECONDARY, and vice versa
On SECONDARY
# vxrvg -gdgname startrvg_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_dgnameaslog RVG_name SRLVOL_name
# vradmin -g primary_dgname printvol RVG_name
# vradmin -g primary_dgname printrvg RVG_name
# vradmin -g primary_dgnamerepstatus 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_dgnamerecover RLK_name
# vradmin -g primary_dgname resync RVG_name
If the rlink was DETACHED, then reattach the RLINK on the PRIMARY - with -a ( Autosyncflag ). Any config errors will be identified and must be fixed with vxedit command.
These will usually be names / addresses / numbers. i.e.
# 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.