Posts

Showing posts with the label software raid

Linux - CentOS5 and software raids.....

We all like RAID, and with Linux it's a pretty cheap way to get enough space to store ones DVD/Music collection, I run a fairly large RAID5 which is working without a hiccup, but much to my surprise I was checking my /proc/mdstat and saw: md5 : active raid5 sdh1[4] sdg1[3] sdf1[2] sde1[1] sdd1[0] 7814033408 blocks level 5, 64k chunk, algorithm 2 [5/5] [UUUUU] [================>....] resync = 81.5% (1593083392/1953508352) finish=2362.7min speed=2540K/sec Then I checked dmesg, and /var/log/messages, no errors, no nothing so how could that happen, after a bit of searching I found a long discussion - it seams that after CentOS 5.4 they decided to add /etc/cron.weekly/99-raid-check which is controlled by /etc/sysconfig/raid-check - which by all means is fair, but but with a rebuild speed of 2540K/sec and more than a 7TB raid this might take slightly more than a week. One can move the check to run only ones a month by moving the script from cron.weekly to cron.monthly, but...

Linux - Software RAID speed

Image
Having reshaped a RAID5 twice of as many weeks, I've found that adding a 2TB drive takes a good 36 hours, which is kind of frustrating. After a bit of searching, I discovered that there is a setting in /sys/block/md*/md/stripe_cache_size which by default is set to 256. This is enough for normal day operations, but during a reshape I was seeing speeds around 16mb/s, which meant that it would take a long time to finish. There are mixed results, some people run into issue if they increase the value beyond 1024, other people are not seeing problems until they go to 64k. There is a performance test here which show that the optimum speed is 8192, but then again this might vary due to other issues. linked to http://peterkieser.com/wp-content/uploads/2009/11/stripe_cache_size2.png Try it out, it might help in your setup.