VERITAS Volume Manager 3.1 Administrator's Guide

Recovery
RAID-5 Recovery
Chapter 8 373
Parity Recovery
In most cases, a RAID-5 array does not have stale parity. Stale parity
only occurs after all RAID-5 log plexes for the RAID-5 volume have
failed, and then only if there is a system failure. Even if a RAID-5
volume has stale parity, it is usually repaired as part of the volume start
process.
If a volume without valid RAID-5 logs is started and the process is killed
before the volume is resynchronized, the result is an active volume with
stale parity. For an example of the output of the vxprint -ht command,
see the following example for a stale RAID-5 volume:
VNAMEUSETYPEKSTATESTATELENGTHREADPOLPREFPLEX
PLNAMEVOLUMEKSTATESTATELENGTHLAYOUTNCOL/WIDMODE
SDNAMEPLEXDISKDISKOFFSLENGTH[COL/]OFFDEVICEMODE
vr5volRAID-5ENABLEDNEEDSYNC20480RAID-
plr5vol-01r5volENABLEDACTIVE20480RAID3/16RW
sddisk00-00r5vol-01disk000102400/0c1t4d1ENA
sddisk01-00r5vol-01disk010102401/0c1t2d1ENA
sddisk02-00r5vol-01disk020102402/0c1t3d1ENA
This output lists the volume state as NEEDSYNC, indicating that the
parity needs to be resynchronized. The state could also have been SYNC,
indicating that a synchronization was attempted at start time and that a
synchronization process should be doing the synchronization. If no such
process exists or if the volume is in the NEEDSYNC state, a
synchronization can be manually started by using the resync keyword
for the vxvol command. For example, to resynchronize the RAID-5
volume in Figure 8-1, Invalid RAID-5 Volume,, use the following
command:
# vxvol resync r5vol
Parity is regenerated by issuing VOL_R5_RESYNC ioctls to the RAID-5
volume. The resynchronization process starts at the beginning of the
RAID-5 volume and resynchronizes a region equal to the number of
sectors specified by the -o
iosize
option. If the -o
iosize
option is not
specified, the default maximum I/O size is used. The resync operation
then moves onto the next region until the entire length of the RAID-5
volume has been resynchronized.
For larger volumes, parity regeneration can take a long time. It is
possible that the system couldbe shut down or crash before the operation
is completed. In case of a system shutdown, the progress of parity