Raid tricks
Increasing the rebuild speed
Sometimes when you’re quite lazy or bored and don’t like the noticeable amount of free resources on your server, you may like to increase the raid building and resyncing process speed.
# echo 250000 > /proc/sys/dev/raid/speed_limit_max
# echo 250000 > /proc/sys/dev/raid/speed_limit_min
And this would spin up the hards faster to their maximum extent saving almost half of the time!
Defaults were:
# cat /proc/sys/dev/raid/speed_limit_max
200000
# cat /proc/sys/dev/raid/speed_limit_min
1000
And looks like my hards have 100M/s speed.
#hddtemp /dev/sda
/dev/sda: ST3750330AS: 31°C
# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 280 MB in 3.01 seconds = 93.09 MB/sec
Checking and repairing
The larger the hard drive is the greater the probability of having its blocks corrupted. Its better to check for consistency against any bad blocks or md superblocks.
# cat /sys/block/md0/md/sync_action
idle
# echo check > /sys/block/md0/md/sync_action
And if there are any, repair them.
# echo repair > /sys/block/md0/md/sync_action
Setting up RAID alerts to send emails about any errors
Red Hat family distros come with built in service daemon mdmonitor which runs ‘mdadm –monitor’ in a daemon mode.
Remember to add “DEVICE partitions” or partitions being components of an md array to top of file /etc/mdadm.conf. Monitoring all RAID events and changing default email template Last edited on: Tue Mar 9 11:41:38 PST 2010
# mdadm --detail --scan >> /etc/mdadm.conf
# echo "MAILADDR some-email-address" >> /etc/mdadm.conf
# chkconfig mdmonitor on
# service mdmonitor restart
Added the two new tweaks.

Recent Comments