VxVM VVR vxvol ERROR V-5-1-3381 Cannot dissociate SRL while rvg (dava03A_rvg) is started, unless rvg is in PASSTHRU mode
The above error indicates that I/Os are still running and the SRL volume can not be disassociated while volume is still active. (unless RVG is in passthru mode, which it isn't the case here).
Depending on a certain condition or situation, there is a need to disassociate SRL volume out of the RVG and to re associate it back. The requirement to diassociate the SRL volume is replication need to be stopped first .
There are two ways to stop replication. Please see the below 2 commands:
** using vxrlink command to detach the rlink:
# vxrlink -g dava03vg det rlk_dava03b_dava03A_rvg
VxVM VVR vxrlink ERROR V-5-1-6467 Data volumes are in use.
If detaching is necessary, use the force detach option (-f). Before restarting replication a complete synchronization of the secondary data volumes must then be performed.
# vxrlink -g dava03vg -f det rlk_dava03b_dava03A_rvg
VxVM VVR vxrlink INFO V-5-1-6466 Data volumes are in use. Before restarting replication a complete synchronization of the secondary data volumes must be performed.
** using vradmin command to stop the replication:
# vradmin -g dava03vg -f stoprep dava03A_rvg
VxVM VVR vradmin WARNING V-5-52-285 Secondary or Bunker will become out-of-date.
vradmin: Continue with stoprep (y/n)? y
Message from Primary:
VxVM VVR vxrlink INFO V-5-1-6466 Data volumes are in use. Before restarting replication a complete synchronization of the secondary data volumes must be performed.
Both of the above commands will stop the replication gracefully.
As a result of the above command, the RLINK will be in 'DETACHED STALE' state on the primary site.
On the PRIMARY site:
rv dava03A_rvg 1 ENABLED ACTIVE primary 1 data1srlvol
rl rlk_dava03b_dava03A_rvg dava03A_rvg DETACHED STALE 192.168.30.201 dava03vgrlk_dava03p_dava03A_rvg <<<< rlink in "DETACHED STATE" now
v data1vol dava03A_rvg ENABLED ACTIVE 6291456 SELECT - fsgen
Then, when an attempt to disassociate the SRL Volume on the primary site, the following error may be observed:
# vxvol -f -g dava03vg dis data1srlvol
VxVM VVR vxvol ERROR V-5-1-3381 Cannot dissociate SRL while rvg (dava03A_rvg) is started, unless rvg is in PASSTHRU mode
The above error indicates that I/Os are still running and the SRL volume can not be disassociated while volume is still active. (unless RVG is in passthru mode, which isn't the case here).
So, to exit from that situation, please perform the following:
1) Stop the application (as i/o needs to be stopped first)
2) umount filesystem(s) associated with the volume(s)
3) Stop the RVG
The key here is the 'RVG' needs to be stopped first, after unmounting the filesystem:
# umount /data1vol
# vxrvg -g dava03vg stop dava03A_rvg (ie: stop the rvg)
RVG state will turn into 'DISBALED CLEAN' state as per below:
rv dava03A_rvg 1 DISABLED CLEAN primary 1 data1srlvol
rl rlk_dava03b_dava03A_rvg dava03A_rvg DETACHED STALE 192.168.30.201 dava03vg rlk_dava03p_dava03A_rvg
Once that's done, then the SRL volume can be disassociated successfully as per the below command.
# vxvol -f -g dava03vg dis data1srlvol
Notice now, the SRL volume is out of the RVG.
v data1srlvol - ENABLED ACTIVE 1024000 SELECT - fsgen >>> this SRL volume is now out of the RVG
pl data1srlvol-01 data1srlvol ENABLED ACTIVE 1024000 CONCAT - RW
sd dava03vg04-01 data1srlvol-01 dava03vg04 0 1024000 0 emc0_dd4 ENA
rv dava03A_rvg 1 DISABLED CLEAN primary 1 (none)
rl rlk_dava03b_dava03A_rvg dava03A_rvg DETACHED STALE 192.168.30.201 dava03vg rlk_dava03p_dava03A_rvg
v data1vol dava03A_rvg ENABLED ACTIVE 6291456 SELECT - fsgen
pl data1vol-01 data1vol ENABLED ACTIVE 6291456 CONCAT - RW
sd dava03vg01-01 data1vol-01 dava03vg01 0 4120320 0 emc0_dd1 ENA
sd dava03vg02-01 data1vol-01 dava03vg02 0 2171136 4120320 emc0_dd2 ENA
pl data1vol-02 data1vol ENABLED ACTIVE LOGONLY CONCAT - RW
sd dava03vg02-02 data1vol-02 dava03vg02 2171136 128 LOG emc0_dd2 ENA
pl data1vol-03 data1vol ENABLED ACTIVE LOGONLY CONCAT - RW
sd dava03vg03-01 data1vol-03 dava03vg03 0 128 LOG emc0_dd3 ENA
Then, in order to reassociate the SRL volume back to the RVG, the following command needs to be run:
# vxvol -g dava03vg aslog dava03A_rvg data1srlvol
# vxprint -thg dava03vg
rv dava03A_rvg 1 DISABLED CLEAN primary 1 data1srlvol >>>> SRL volume now has been associated back to the RVG
rl rlk_dava03b_dava03A_rvg dava03A_rvg DETACHED STALE 192.168.30.201 dava03vg rlk_dava03p_dava03A_rvg
v data1vol dava03A_rvg ENABLED ACTIVE 6291456 SELECT - fsgen
pl data1vol-01 data1vol ENABLED ACTIVE 6291456 CONCAT - RW
sd dava03vg01-01 data1vol-01 dava03vg01 0 4120320 0 emc0_dd1 ENA
sd dava03vg02-01 data1vol-01 dava03vg02 0 2171136 4120320 emc0_dd2 ENA
pl data1vol-02 data1vol ENABLED ACTIVE LOGONLY CONCAT - RW
sd dava03vg02-02 data1vol-02 dava03vg02 2171136 128 LOG emc0_dd2 ENA
pl data1vol-03 data1vol ENABLED ACTIVE LOGONLY CONCAT - RW
sd dava03vg03-01 data1vol-03 dava03vg03 0 128 LOG emc0_dd3 ENA
v data1srlvol dava03A_rvg ENABLED ACTIVE 1024000 SELECT - SRL
pl data1srlvol-01 data1srlvol ENABLED ACTIVE 1024000 CONCAT - RW
sd dava03vg04-01 data1srlvol-01 dava03vg04 0 1024000 0 emc0_dd4 ENA
Then, from here, proceed with the following step to restart the application:
# vxrvg -g dava03vg start dava03A_rvg >>>> Start the RVG first
# mount -t vxfs /dev/vx/dsk/dava03vg/data1vol /data1vol >>>> Mount the volume back
# vradmin -g dava03vg -a startrep dava03A_rvg >>>> Start the replication
Message from Primary:
VxVM VVR vxrlink WARNING V-5-1-3359 Attaching rlink to non-empty rvg. Autosync will be performed.
VxVM VVR vxrlink INFO V-5-1-3614 Secondary data volumes detected with rvg dava03A_rvg as parent:
VxVM VVR vxrlink INFO V-5-1-6183 data1vol: len=6291456 primary_datavol=data1vol
VxVM VVR vxrlink INFO V-5-1-3365 Autosync operation has started