[CentOS] Software RAID resync

Fri May 8 04:35:07 UTC 2009
John R Pierce <pierce at hogranch.com>

Rajagopal Swaminathan wrote:
> I have configured 2x 500G sata HDD as Software RAID1 with three partitions
> md0,md1 and md2 with md2 as 400+ gigs
>
> Now it is almost 36 hours the status is
>
> cat /proc/mdstat
> Personalities : [raid1]
> md0 : active raid1 hdb1[1] hda1[0]
>       104320 blocks [2/2] [UU]
>         resync=DELAYED
>
> md1 : active raid1 hdb2[1] hda2[0]
>       4096448 blocks [2/2] [UU]
>         resync=DELAYED
>
> md2 : active raid1 hdb3[1] hda3[0]
>       484182912 blocks [2/2] [UU]
>       [==========>..........]  resync = 51.8% (251168768/484182912) finish=1975.
> 7min speed=1964K/sec
>
> unused devices: <none>
>
> I have reniced the md2-resync to -10
>
> Q1. Does is take this long?
> Q2. How to speed it up
>   

depends on  your disk controllers.    whats `iostat -x 5` say the IO on 
hdb3 and hda3 is doing? (ignore the first sample, its average since 
boot, wait for the 2nd and later 5 second samples...).  iostat is in the 
sysstat RPM, sadly, not installed by default.

is the md2 filesystem mounted ?  it will go faster if there is zero disk 
activity on the physical drives.


500gb has to be read and written over the SATA channels, which appear to 
be in IDE mode (hda instead of sda)....   figure 60-80MB/sec peak 
sustainable, lets round that to 50MB/sec, so thats 500000/50 == 10000 
seconds if its running at pure wire speed the whole time.  if there's 
-any- disk contention, it will run MUCH slower.  if its only running 
2MB/sec (as indicated) somethinig is fubar with the disk IO, maybe its 
in PIO mode, ouch!