Rebuilding an array takes a considerable amount of time when a disk is fail or kicked out of an array. On my array, it will take 5 hours to rebuild a disk.
Is there a way to reduce the time to rebuild? Even in 5 seconds?
You can use the bitmaps file, which is not enabled by default. The bitmap file is used to record information that needs to be synchronized and rebuilt in the array.
This feature is very good, when the machine is often restarted, the disk can not be properly identified, the array is degraded. Adding a hot spare to the array and completing the rebuild takes more than 5 hours.
Using the bitmap option will be much faster when rebuilding the array.
So, what's the cool feature?
There are two types of bitmap files
1, internal: stored in the array internal
2, external: placed on the disk outside the array
The internal bitmap is placed on an integrated array. Updating the bitmap may affect the performance of the array. However, I did not feel a reduction in performance.
External bitmap files must be stored outside this array, and the available file system is ext2, ext3. This requires an additional device to save the bitmap file.
External bitmap files may reduce the impact on column performance, but require additional maintenance.
Open internal bitmap
Mdadm--GROW/DEV/MD5--bitmap=internal
External bitmap
Mdadm--GROW/DEV/MD5--bitmap=/some/directory/somefile
This may be a loss of performance, but it does not seem to have any effect in sequential reading and writing.
For most people, I recommend using internal bitmap unless you do know that you have to use an external bitmap.
This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/