Koozali.org: home of the SME Server

Rebuild of 2TB Raid1

Offline Fumetto

  • *
  • 874
  • +1/-0
Rebuild of 2TB Raid1
« on: February 15, 2023, 11:22:04 PM »
Hi everyone

On one server I changed sdb because the HDD went to hell.
The rebuild starts when I (from console) add the disk to the raid but... it starts at 10:00 on 13/02/23 and ends at 20:00 on 15/02/23. Only 30GB of data...

It's "normal"? Do I need to investigate?
HP microserver with 2x2TB WD RED 5400 RPM.
10MB/s I think is really poor performance, does anyone have experience and can share here?

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Rebuild of 2TB Raid1
« Reply #1 on: February 16, 2023, 12:37:09 AM »
it is normal. 

poor performance is because of the read/write access on a 5400 rpm
disk of 2TB.  raid sync the whole array not only your data. 
choose black at 7500 or 10000 for better performance and better durability. 
yes, I know cost is not the same. 

Offline Fumetto

  • *
  • 874
  • +1/-0
Re: Rebuild of 2TB Raid1
« Reply #2 on: February 17, 2023, 07:01:49 AM »
I recovered some data:

Code: [Select]
kernel: ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
kernel: ata3.00: ATA-9: WDC WD20EFRX-68EUZN0, 82.00A82, max UDMA/133
kernel: ata3.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
kernel: ata3.00: configured for UDMA/133
The fact is that I remembered a similar problem that had arisen perhaps with SME 7, resolved after a reboot. In the logs I read
Code: [Select]
kernel: md: recovery of RAID array md0
add_drive_to_raid: Successfully added /dev/sdb to RAID!
kernel: [  188.470012] md: delaying recovery of md1 until md0 has finished (they share one or more physical units)
kernel: md: delaying recovery of md1 until md0 has finished (they share one or more physical units)
kernel: [  244.018656] md: md0: recovery done.
Feb 13 10:18:51 server kernel: md: md0: recovery done.
kernel: [  244.031032] md: recovery of RAID array md1
kernel: md: recovery of RAID array md1
Is it possible that the "delaying" system is "cracked"? Because 10MB/s are very few...
Code: [Select]
[root@server ~]# hdparm -Ttv /dev/sdb2

/dev/sdb2:
 multcount     = 16 (on)
 IO_support    =  1 (32-bit)
 readonly      =  0 (off)
 readahead     = 256 (on)
 geometry      = 243137/255/63, sectors = 3906002944, start = 1026048
 Timing cached reads:   2452 MB in  2.00 seconds = 1225.86 MB/sec
 Timing buffered disk reads: 502 MB in  3.00 seconds = 167.14 MB/sec
[root@server ~]#

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Rebuild of 2TB Raid1
« Reply #3 on: February 17, 2023, 11:16:25 AM »
please be aware that you'd have a SMR disk which is bad for RAID
https://kb.synology.com/en-global/DSM/tutorial/PMR_SMR_hard_disk_drives

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Rebuild of 2TB Raid1
« Reply #4 on: February 17, 2023, 12:01:07 PM »
Is it possible that the "delaying" system is "cracked"? Because 10MB/s are very few...

No. It just means you have two raid devices, md0 and md1, and it will only recover one at a time.

Your slow speed is due to slow drives, and possibly slow underlying transport.

Caching is only any good on short bursts with day to day work where you frequently read what you have just written, or it can read ahead a bit.

It doesn't help on a long read/write like a raid rebuild where every bit is read new, not cached, and written.

5400 drives are ok for light work, and better if you use multiple drives in a different raid level eg 6.

But you are finding out their limitations the hard way.

Get faster drives - min 7200. That's a third faster immediately.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Rebuild of 2TB Raid1
« Reply #5 on: February 18, 2023, 12:59:23 AM »
bad and faulty sata cable can lower the speed but you would have seen lot of not obvious sata and smart errors.

also having bios legacy sata mode vs ahci couod lead to lower speed, but if you are in this situation it will be a complicated manipulation to move from one mode to another as your initrd will need rebuild to let your server boot after switching mode in the bios.

and again the most sensible answer is yes this is due to your disk choice of rpm and as pointed by Stefano SMR disk are not fitted for raid.  As access will be slower and error rate will increase for a such use of the disk. You are likely to experience drive getting removed from the array at any moment particularly at the end of a full rebuild !