Configuring RAID 5 array rebuilds by using the CLI

You can optimize RAID 5 array rebuilds for different environments by using the rebuildpriority and rebuildahead parameters that are used by the mkarray and charray command-line interface (CLI) commands.

Note: If you change the rebuildpriority and rebuildahead parameter values, the changes are retained if the system is rebooted, or if the system software is upgraded. You can view the current settings for these parameters by using the charray command.

By using the rebuildpriority parameter with the mkarray or charray CLI commands, you can specify the priority of the rebuild operation. (You use the mkarray to create an MDisk array. To change the attributes of an existing array, use the charray command.)

Depending on the rebuildpriority value, rebuilds might be optimized for maximum host I/O performance, for minimum rebuild duration, or for a more balanced approach. The following table lists the possible values for the rebuildpriority parameter, and the effect of each value on the rebuild process:

Table 1. rebuildpriority parameter values
Value Effect
hostmax Maximum priority is given to host I/O operations to minimize the impact of the rebuild process. Rebuild duration is increased accordingly.
hostweighted Host I/O operations are given higher relative priority than rebuild operations. Rebuild time is improved at the expense of some impact on host I/O performance.
rebuildweighted Rebuild operations are given higher priority than host I/O. Host I/O sees a significant effect from the rebuild operation, but the duration of the rebuild is shortened. (This value is the default setting.)
rebuildmax Maximum priority is given to the rebuild process to minimize the duration of the rebuild. This value causes the most impact to host I/O during the rebuild process, but the rebuild duration is minimized.

The system rebuilds a degraded array starting with the lowest array address and continuing sequentially to the highest array address. During the rebuild a journal log of rebuilt data addresses is kept in system metadata.

If rebuildahead is disabled, only that part of the array addresses that the I/O maps is rebuilt. If rebuildahead is enabled, in addition to these mapped addresses, the system issues additional, sequential rebuild commands.

When the I/O range has completed rebuilding, its addresses are added to the rebuild journal log and the I/O proceeds. The rebuild process is scheduled to resume where it left off in the sequential rebuild process. If rebuildahead is enabled, and the system receives host I/O writes for the part of array addresses that were rebuilt, the I/O is not blocked and is allowed to proceed as normal.

You can also enable a rebuild ahead feature by using the mkarray and charray CLI commands, and configure the rebuild ahead process based on the system's particular I/O.

If rebuildahead is enabled, the system rebuilds a degraded array starting at the lowest array address and continuing sequentially to the highest array address. During the rebuild, a journal log of rebuilt data addresses is kept in system metadata. I/O that occurs during the rebuild might or might not be affected, depending on where in the array the I/O occurs:
  • If an I/O is received by a portion of the array that has already been rebuilt, the I/O continues as normal.
  • If an I/O is received by a portion of the array that has not yet been rebuilt, the I/O is blocked while the rebuild process is rescheduled to preemptively rebuild the range of array addresses for the I/O. When the I/O range has completed rebuild, its addresses are added to the rebuild journal log and the I/O is allowed to proceed.

In addition to the array addresses to which the I/O maps, the system can also predictively issue additional, sequential rebuild commands. The rebuild process is then rescheduled to resume where it left off in the sequential rebuild process. If the system receives host I/O writes for the portion of array addresses that were predictively rebuilt, the I/O is not blocked and is allowed to proceed as normal.

Consequently, enabling rebuildahead is only recommended for sequential I/O environments.

The following table lists the possible values for the rebuildahead parameter:

Table 2. rebuildahead parameter values
Value Effect
off The rebuild ahead function is disabled. (This value is the default setting.)
minimum The rebuild ahead function is enabled for a small number of RAID stripes. This setting is useful for sequential, small block I/O environments.
medium Rebuild ahead is enabled for a moderate number of RAID stripes. This setting is useful for mostly sequential I/O environments.
maximum The rebuild ahead function is enabled for a large number of RAID stripes. This setting is useful for sequential, large block I/O environments.