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
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.
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.