Adding a RAID-5 Log
Note
You need a full license to use this feature.
Only one RAID-5 plex can exist per RAID-5 volume. Any additional plexes become RAID-5 log plexes, which are used to log information about data and parity being written to the volume. When a RAID-5 volume is created using the vxassist command, a log plex is created for that volume by default.
To add a RAID-5 log to an existing volume, use the following command:
# vxassist [-b] [-g diskgroup] addlog volume [loglen=length]
Note
If specified, the -b option makes adding the new log a background task.
You can specify the log length used when adding the first log to a volume. Any logs that you add subsequently are configured with the same length as the existing log.
For example, to create a log for the RAID-5 volume volraid, in the disk group, mydg, use the following command:
# vxassist -g mydg addlog volraid
Adding a RAID-5 Log using vxplex
As an alternative to using vxassist, you can add a RAID-5 log using the vxplex command. For example, to attach a RAID-5 log plex, r5log, to a RAID-5 volume, r5vol, in the disk group, mydg, use the following command:
# vxplex -g mydg att r5vol r5log
The attach operation can only proceed if the size of the new log is large enough to hold all of the data on the stripe. If the RAID-5 volume already contains logs, the new log length is the minimum of each individual log length. This is because the new log is a mirror of the old logs.
If the RAID-5 volume is not enabled, the new log is marked as BADLOG and is enabled when the volume is started. However, the contents of the log are ignored.
If the RAID-5 volume is enabled and has other enabled RAID-5 logs, the new log's contents are synchronized with the other logs.
If the RAID-5 volume currently has no enabled logs, the new log is zeroed before it is enabled.
Removing a RAID-5 Log
To identify the plex of the RAID-5 log, use the following command:
# vxprint [-g diskgroup] -ht volume
where volume is the name of the RAID-5 volume. For a RAID-5 log, the output lists a plex with a STATE field entry of LOG.
To dissociate and remove a RAID-5 log and any associated subdisks from an existing volume, use the following command:
# vxplex [-g diskgroup] -o rm dis plex
For example, to dissociate and remove the log plex volraid-02 from volraid in the disk group, mydg, use the following command:
# vxplex -g mydg -o rm dis volraid-02
You can also remove a RAID-5 log with the vxassist command, as follows:
# vxassist [-g diskgroup] remove log volume [nlog=n]
By default, the vxassist command removes one log. Use the optional attribute nlog=n to specify the number of logs that are to remain after the operation completes.
Note
When removing the log leaves the volume with less than two valid logs, a warning is printed and the operation is not allowed to continue. The operation may be forced by additionally specifying the -f option to vxplex or vxassist.
|