Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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