I am building a home server with raid 5. I first set up the system to boot from compact flash. After i got that working I tried to create the raid 5 array. All disks are new and have no data on them. I used the following command to create the array:

mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sd[bcd]1

After this I ran 'watch cat /proc/mdstat'. The system is recovering - very very slowly (like 40 hours to recover).

How do I tell the system these are new disks with no user data on? I don't want to recover anything.


Unfortunately that's just part of the joyous mdadm build process. At least that's been my experience of it... But I have only done it twice.

You can speed things up by increasing the stripe cache

sudo su
echo 8192 > /sys/block/md0/md/stripe_cache_size

You can run that now and it should have near-immediate effect.

That won't persist between restarts but if it does improve performance, you can make it.

  • Thanks! that has made a massive difference. I have favourited your question about making it persistant. I hope you get an answer. By the way - does this value effect the calculations used to optimse mkfs.xfs or mkfs.ext4? There you basically double the chunk size / stripe size for the sunit value. – Amir Feb 24 '12 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.