Re: Questions about software RAID level 1 (how long should it take to sync, etc?)
Mike Garey wrote:
>I'm in the process of setting up a software RAID level 1 on debian
>testing with two 160 gig drives on an Asus P4P800 motherboard with
>Intel Pentium 4 CPU 3.00GHz and 512 megs of RAM. I've been following
>the instructions in /usr/share/doc/mdadm/rootraiddoc.97.html and have
>just issued the command "mdadm --add /dev/md0 /dev/hda1" to add my
>original debian installation to the RAID array (after already having
>copied the contents of hda1 to hdc1, and then rebooting from hdc1).
>When I cat /proc/mdstat, I get the following:
>[>....................] recovery = 4.9% (7907776/158577472)
That is slow, very very slow. To give you a comparison I can rebuilt a
RAID5 software array consisting of 4 x 80GB PATA drives on a P2 350 in
about 3 hours (if my memory serves me right, haven't had to rebuild it
in a LONG time), and that requires much more CPU horsepower thana simple
mirror. Worth mentioning is that these 4 drives are all on their own bus
rather than sharing a bus, but even then what you're seeing is poor. I
also know someone with 4 x 250GB drives in a RAID5 with the 4 drives
over 2 channels (PATA too) and he occasionally sees one of the drives
randomly drop out of DMA mode and gets to this sort of level. That would
be where I would start looking, also I noticed in another post you said
you were sharing with a CDROM drive, that will hurt too, although it
depends on the drive as to how much. An IDE bus can only go as fast as
the slowest device, and a RAID rebuild can also only go as fast as the
slowest device, so make sure your optical drive is DMA capable and it's
>I'm curious about a few things:
>1) does 25 hours seem like a reasonable amount of time for an initial
>synchronization of two 160 gig drives?
Oh god no :)
>2) would using a hardware card (such as a 3ware 7006-2 Parallel ATA
>RAID Controller) decrease the amount of time to sync?
Absolutly, but if I was going to get a new RAID card I would go SATA and
just replace the drives.
>3) will it take this long to synchronize the drives after, say, a
>system crash (ie a hard reboot), or does it only take 25 hours for the
>initial sync ?
I would expect it to take the same time each time you have to resync/rebuild
>4) If I do decide to switch to hardware RAID, will I be able to use
>the same drives without a large configuration/resyncrhonization
Not really, the only way to do this would be to create a new array on
the RAID card in a failed state (assuming you can), then copy all the
data from your degraded software array to the degraded hardware array,
then add the drive from the old software array. Or emply a temporary
>5) if hda1 contained the original root system, and hdc1 is simply a
>copy of it (ie the drives are a mirror), why is it taking 25 hours to
>"synchronize" the drives, aren't they already sync'd? Shouldn't this
>be a much faster process?
No, you copying the data isn't a "sync". You could have left the new
drive blank and then added it and the same process would have occured,
but you are right to be concerned about 25hour rebuild time. Judging by
the Asterisk problems you mentioned in another post it sounds like one
or both of your HDD's don't have DMA turned on (hdparm -d <device> to
>Any help or suggestions are very much appreciated. Thanks!