Monday, December 20, 2010

Adding a RAID-5 Log

A RAID-5 log maintains a copy of the data and parity being written to the volume at any given time. If a system failure occurs, VxVM can replay the RAID-5 log to resynchronize the volume. This copies the data and parity that was being written at the time of failure from the log to the appropriate areas of the RAID-5 volume.
RAID-5 log plexes are used to log information about data and parity being written to the raid volume. A log plex is created for the volume by default when a raid volume is created but additional ones can be added by following command .
· vxassist addlog name_of_raid5_vol

8. Adding a DRL Log
Dirty region logging (DRL) is used with mirrored volume layouts. DRL keeps track of the regions that have changed due to I/O writes to a mirrored volume. Prior to every write, a bitmap is written to a log to record the area of the disk that is being changed. In case of system failure, DRL uses this information to recover only the portions of the volume that need to be recovered.
To put Dirty Region Logging into effect for a volume, a log subdisk must be added to that volume and the volume must be mirrored. Only one log subdisk can exist per plex.
The following example creates a log for the mirrored volume vol03:
· #vxassist addlog vol03
When vxassist is used to add a log subdisk to a volume, a log plex is also created to contain the log subdisk, by default.
Once created, the plex containing a log subdisk can be treated as a regular plex. Data subdisks can be added to the log plex. The log plex and log subdisk can be removed using the same procedures used to remove ordinary plexes and subdisks.

. Removing a RAID-5 Log
Removing a RAID-5 log involves first dissociating the log from its volume and then removing the log and any associated subdisks completely.
Dissociate the log from its volume as follows:
· #vxplex -o rm dis plex_name
To identify the log plex, use the command:
· vxprint -ht raid5_volume_name
To disassociate the log plex volrd-02 from volrd, type:
· #vxplex -o rm dis volrd-02
The output of vxprint -h for volrd now shows:
Disk group: rootdg TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 v volrd raid5 ENABLED 32 – ACTIVE – - pl volrd-01 volrd ENABLED 32 – ACTIVE – - sd disk01-02 volrd-01 – 32 0 – - – sd disk02-03 volrd-01 – 32 0 – - -

No comments:

Post a Comment