Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 created a software raid 5 disk using: mdadm -C /dev/md2 -l5 -n4 /dev/sd[i-l]

at the same time I'm using dstat to see io-activity: dstat -c -d -D total,sda1,md2,sdi,sdj,sdk,sdl -l -m -n

and notice that disks sd[i-k] are all read from and sdl is written to. Now, I do understand that raid5 has to be configured, but it takes a really long time and all disks are clean & formatted (using xfs) so I figure there might be some kind of shortcut to skip (unnecessary? ) checking.. Is it?

The creation is part of a time-critical nightly batch-process (run on amazon ec2) so it's not a one-time thing.

Thanks, Geert-Jan

share|improve this question
up vote 2 down vote accepted

No way around this AFAIK - it's normal and expected. The way RAID 5 initialization works is to basically run a rebuild - under the hood mdadm creates a degraded RAID and then runs a rebuild on it.

Why are you using RAID 5 if this is an nightly (throw away?) batch process?

For RAID 1 you can use --assume-clean which skips the initial mirror.

share|improve this answer
ok thanks I thought that much. Raid5 is created over so called EBS-volumes. As you may already know, these can be attached / detached from a server and added to another later on. The batchprocess creates fresh content on the EBS-raid, the EBS is detached from this process when done, and later attached to the frontend, swapping out the EBS-raid from the day before. So although, its nightly, it's not throw-away. – Gbrits Apr 20 '10 at 21:08
Thanks for the reply - that makes sense :) – James Apr 20 '10 at 21:43
You can use --assume-clean with RAID5 as well, but it is dangerous. md uses an optimization on some writes that relies on the parity block being correct. – kbyrd Apr 21 '10 at 1:56

For RAID5 to work each bit on each drive has to be set properly so parity can be calculated. If writes are occurring as well then your assumption that the drives are clean isn't right (although, to be fair, for a virtual machine it doesn't seem like a bad assumption to make).

If you're using a virtual machine anyways why don't you just create an image with that drive already set up? When you need the fresh drive just spin up your new instance with the preconfigured raid.

share|improve this answer

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.