LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   RAID1 resync very VERY slow using mdadm (https://www.linuxquestions.org/questions/linux-software-2/raid1-resync-very-very-slow-using-mdadm-794734/)

rontay 03-11-2010 10:39 AM

RAID1 resync very VERY slow using mdadm
 
I am running Kernel 2.6.18-128.el5 on a 64bit quad core machine with 8GB RAM. Using "mdadm" I setup a RAID1 array between two Western Digital 1.5TB drives. The problem is that the resync is running VERY slow. Here is a current status.

[root@royalflush shared]# cat /proc/mdstat Personalities : [raid1]
md1 : active raid1 hdc5[1] hda5[0]
1304493952 blocks [2/2] [UU]
[=>...................] resync = 6.2% (81592192/1304493952) finish=4280156.0min speed=4K/sec

unused devices: <none>

troop 03-11-2010 11:02 AM

try echo 10000 > /proc/sys/dev/raid/speed_limit_min
would't bad sectors on hdd? smart is clear?

rontay 03-11-2010 01:59 PM

Quote:

Originally Posted by troop (Post 3894441)
try echo 10000 > /proc/sys/dev/raid/speed_limit_min
would't bad sectors on hdd? smart is clear?


I tried "10000 > /proc/sys/dev/raid/speed_limit_min", but it did not change the speed at all.


The are drives are new and work fine as a single drive.

"smart is clear?" not sure what you are asking here.

KZeeSoft 03-11-2010 02:52 PM

What motherboard do you have, what interface are you using for the drives, are the HDDs WD Caviar "Green"s or another type of 5400rpm drive?

Did you configure this setup using LVM?

Was it installed at inital setup of Linux or after initial installation?

What is the reason for the resync?

rontay 03-11-2010 03:04 PM

Quote:

Originally Posted by KZeeSoft (Post 3894720)
What motherboard do you have, what interface are you using for the drives, are the HDDs WD Caviar "Green"s or another type of 5400rpm drive?

Did you configure this setup using LVM?

Was it installed at inital setup of Linux or after initial installation?

What is the reason for the resync?



I think the motherboard is an INTEL DG43GT.

The drives are WD Caviar Green (SATA 3.0G WD15EADS)

They are configured as RAID1 using mdadm. No LVM.
This was done after initial install.
Its actually just continuing its initial sync.
At 6% over 15 hours. See the drive info below.

Another strange thing is that they show up as hda instead of sda.



[root@royalflush ~]# hdparm -i /dev/hda

/dev/hda:

Model=WDC WD15EADS-00S2B0, FwRev=04.05G04, SerialNo=WD-WCAVY0902668
Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
BuffType=unknown, BuffSize=32767kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2
AdvancedPM=yes: unknown setting WriteCache=enabled
Drive conforms to: Unspecified: ATA/ATAPI-1 ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6 ATA/ATAPI-7

* signifies the current active mode

[root@royalflush ~]# hdparm -i /dev/hdc

/dev/hdc:

Model=WDC WD15EADS-00P8B0, FwRev=01.00A01, SerialNo=WD-WCAVU0323312
Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
BuffType=unknown, BuffSize=32767kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2
AdvancedPM=no WriteCache=enabled
Drive conforms to: Unspecified: ATA/ATAPI-1 ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6 ATA/ATAPI-7

* signifies the current active mode

KZeeSoft 03-11-2010 07:16 PM

OK, so we know that:

- your drives are only capable of handling 5400rpm
- your drives are running abnormally slow in the resync(4k/s)
- you already had a working partitioning scheme prior to using mdadm
- your first drive and second drive differ by:

AdvancedPM=yes: unknown setting WriteCache=enabled

AdvancedPM=no WriteCache=enabled



From this, I can say that it is possible your setup of mdadm was wrong. Did you change the ports in which your mobo served these sata drives?
If there was no hardware changes or bios changes, I would say you would be better to reinstall your system, this time setting up your RAID array in the installation of Linux, rather than trying to set it up after the fact. If your drives are under heavy load while it is trying to setup a RAID array, this can also cause this.

In my opinion... backup your data, wipe the drives and start from scratch.

It may take awhile to get it done, but it won't take the days it currently is showing to complete.

rontay 03-12-2010 07:56 AM

Quote:

Originally Posted by KZeeSoft (Post 3895017)
OK, so we know that:

- your drives are only capable of handling 5400rpm
- your drives are running abnormally slow in the resync(4k/s)
- you already had a working partitioning scheme prior to using mdadm
- your first drive and second drive differ by:

AdvancedPM=yes: unknown setting WriteCache=enabled

AdvancedPM=no WriteCache=enabled



From this, I can say that it is possible your setup of mdadm was wrong. Did you change the ports in which your mobo served these sata drives?
If there was no hardware changes or bios changes, I would say you would be better to reinstall your system, this time setting up your RAID array in the installation of Linux, rather than trying to set it up after the fact. If your drives are under heavy load while it is trying to setup a RAID array, this can also cause this.

In my opinion... backup your data, wipe the drives and start from scratch.

It may take awhile to get it done, but it won't take the days it currently is showing to complete.



So, It turns out there are some reported issues with the "WD15EADS-00P8B0" model drives. This is the newest one I added to the system. I plan to return it for a different one. I am thinking I may go with Seagate this time. WD seems to be going downhill. Also, I am going to wipe and reload like you suggested. I think this time I will create a RAID 1 array for the system and data. The previous RAID 1 was only for data partition. Are there any suggestions as far as what not to use RAID 1 for on Linux? I assume the swap partition would be the only thing I would not want to mirror.

KZeeSoft 03-13-2010 10:13 AM

On my server, I have 8 partitions. I have them all in RAID 1 except the swap. I would suggest adding the swap as a RAID 0, that way if your server hits heavy load it can benefit from the RAID 0 striping. Plus that would double the amount of swap you put out =)


All times are GMT -5. The time now is 06:19 AM.