Resync
DavidGreaves (Talk | contribs) |
(→Resync) |
||
Line 2: | Line 2: | ||
When a device is hot-added to a raid array, the data on that device will not be synchronised with the other devices. The kernel begins to scan the original devices and writes the correct blocks to the new device. This process is known as resyncing. | When a device is hot-added to a raid array, the data on that device will not be synchronised with the other devices. The kernel begins to scan the original devices and writes the correct blocks to the new device. This process is known as resyncing. | ||
+ | |||
+ | Most Debain and Debian-derived distributions create a cron job which issues an array check at 0106 hours each first Sunday of the month in /etc/cron.d/mdadm, this task appears as resync in /proc/mdstat and syslog. So if you suddenly see RAID-resyncing for no apparent reason this might be a place to take a look. | ||
Normally the kernel will throttle the resync activity (c.f. 'nice') to avoid impacting the raid device performance. | Normally the kernel will throttle the resync activity (c.f. 'nice') to avoid impacting the raid device performance. | ||
Line 12: | Line 14: | ||
So to limit the maximum speed at which RAID reconstruction is performed to 5 Mb/s: | So to limit the maximum speed at which RAID reconstruction is performed to 5 Mb/s: | ||
echo 5000 > /proc/sys/dev/raid/speed_limit_max | echo 5000 > /proc/sys/dev/raid/speed_limit_max | ||
− | |||
see also: [[IOSchedulers]] | see also: [[IOSchedulers]] |
Revision as of 02:37, 1 February 2009
Resync
When a device is hot-added to a raid array, the data on that device will not be synchronised with the other devices. The kernel begins to scan the original devices and writes the correct blocks to the new device. This process is known as resyncing.
Most Debain and Debian-derived distributions create a cron job which issues an array check at 0106 hours each first Sunday of the month in /etc/cron.d/mdadm, this task appears as resync in /proc/mdstat and syslog. So if you suddenly see RAID-resyncing for no apparent reason this might be a place to take a look.
Normally the kernel will throttle the resync activity (c.f. 'nice') to avoid impacting the raid device performance.
There are times when you may want to control how much I/O bandwidth is allocated to the resync and this is done by writing values to
/proc/sys/dev/raid/speed_limit_max /proc/sys/dev/raid/speed_limit_min
So to limit the maximum speed at which RAID reconstruction is performed to 5 Mb/s:
echo 5000 > /proc/sys/dev/raid/speed_limit_max
see also: IOSchedulers