Recovering a Version 0 DCO
For a version 0 DCO, perform the following steps to recover the DCO volume:
-
Correct the problem that caused the I/O failure.
-
Use the following command to remove the badlog flag from the DCO:
# vxdco [-g diskgroup] -o force enable dco_name
For the example output, the command would take this form:
# vxdco -g mydg -o force enable vol1_dco
The entry for vol1_dco in the output from vxprint now looks like this:
dc vol1_dco vol1 - - - -
-
Restart the DCO volume using the following command:
# vxvol [-g diskgroup] start dco_log_vol
For the example output, the command would take this form:
# vxvol -g mydg start vol1_dcl
-
Use the vxassist snapclear command to clear the FastResync maps for the original volume and for all its snapshots. This ensures that potentially stale FastResync maps are not used when the snapshots are snapped back (a full resynchronization is performed). FastResync tracking is re-enabled for any subsequent snapshots of the volume.
Caution
You must use the vxassist snapclear command on all the snapshots of the volume after removing the badlog flag from the DCO. Otherwise, data may be lost or corrupted when the snapshots are snapped back.
If a volume and its snapshot volume are in the same disk group, the following command clears the FastResync maps for both volumes:
# vxassist [-g diskgroup] snapclear volume snap_obj_to_snapshot
Here snap_obj_to_snapshot is the name of the snap object associated with volume that points to the snapshot volume.
For the example output, the command would take this form:
# vxassist -g mydg snapclear vol1 SNAP-vol1_snp
If a snapshot volume and the original volume are in different disk groups, you must perform a separate snapclear operation on each volume:
# vxassist -g diskgroup1 snapclear volume snap_obj_to_snapshot
# vxassist -g diskgroup2 snapclear snapvol snap_obj_to_volume
Here snap_obj_to_volume is the name of the snap object associated with the snapshot volume, snapvol, that points to the original volume.
For the example output, the commands would take this form if SNAP-vol1 had been moved to the disk group, snapdg:
# vxassist -g mydg snapclear vol1 SNAP-vol1_snp
# vxassist -g snapdg snapclear SNAP-vol1 vol1_snp
-
To snap back the snapshot volume on which you performed a snapclear in the previous step, use the following command (after using the vxdg move command to move the snapshot plex back to the original disk group, if necessary):
# vxplex -f [-g diskgroup] snapback volume snapvol_plex
For the example output, the command would take this form:
# vxplex -f -g mydg snapback vol1 vol1-03
Note
You cannot use vxassist snapback because the snapclear operation removes the snapshot association information.
Recovering a Version 20 DCO
For a version 20 DCO, perform the following steps to recover the DCO volume:
-
Correct the problem that caused the I/O failure.
-
Use the vxsnap command to dissociate each full-sized instant snapshot volume that is associated with the volume:
# vxsnap [-g diskgroup] dis snapvol
For the example output, the command would take this form:
# vxsnap -g mydg dis SNAP-vol1
-
Unprepare the volume using the following command:
# vxsnap [-g diskgroup] unprepare volume
For the example output, the command would take this form:
# vxsnap -g mydg unprepare vol1
-
Start the volume using the vxvol command:
# vxvol [-g diskgroup] start volume
For the example output, the command would take this form:
# vxvol -g mydg start vol1
-
Prepare the volume again using the following command:
# vxsnap [-g diskgroup] prepare volume [ndcomirs=number] \
[regionsize=size] [drl=yes|no|sequential] \
[storage_attribute ...]
For the example output, the command might take this form:
# vxsnap -g mydg prepare vol1 ndcomirs=2 drl=yes
This adds a DCO volume with 2 plexes, and also enables DRL and FastResync (if licensed).
See the VERITAS Volume Manager Administrator's Guide and the vxsnap(1M) manual page for full details of how to use the vxsnap prepare command.
|