/proc/sys/dev/raid

The /proc/sys directory provides interfaces for manipulating tunable kernel parameters. These parameters, which affect various aspects of the kernel, can be fine-tuned while the system is running. For more general information about /proc/sys, consult the file in the /usr/src/linux/Documentation/sysctl directory of your kernel source code, as well as /usr/src/linux/Documenation/filesystems/proc.txt.

Two files in the /proc/sys/dev/raid subdirectory provide a way to tune the speed at which array resynchronization (and reconstruction) takes place. speed_limit_min and speed_limit_max define the minimum and maximum speeds at which resynchronization occur. The latter is especially useful on slower, or heavily utilized, systems, where you might find that the resynchronization process slows down the system too much. In that case, you could change the maximum speed—in effect, throttling the resynchronization process to a more suitable level. The md driver does provide its own I/O throttling and will attempt to perform recovery nonintrusively, but using speed_limit_min and speed_limit_max can provide a quick fix if something goes haywire.

You’ll need to experiment with your system to see the maximum speed it can handle. Adjusting the minimum speed affects the low-end limit for resynchronization. It might be a good idea to simulate a drive failure and play with these values so that you aren’t surprised when a real disk failure happens.

Tip

You can simulate a disk failure by using ...

Get Managing RAID on Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.