Irgendwann kommt jeder mal in die Situation das im RAID eine Festplatte über die „Regenbogenbrücke“ geht.
Für Unwissende – „Über die Regenbogenbrücke gehen“ sagt man bei Tieren, insbesondere bei Hunden, wenn diese uns verlassen haben. „

Zurück zum Thema, euch stirbt eine Festplatte weg, Ihr stopft eine neue in das System und das System meldet – “ HEY JA, Geil eine neue Festplatte “ – Ich brauche für das RAID Rebuild / Re-Sync insgesamt 28 Stunden und 17 Minuten. Dann guckst du erstmal blöd in die Röhre. Doch was kannst du tun um die RAID Rebuild Zeit zu beschleunigen?

cat /proc/mdstat

## VOLL LANGSAM mit nur ca. 61 MB pro Sekunde ##

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid5 sdf2[0] sdb2[5] sda2[4] sdd2[3] sdc2[2] sde2[1]
      19454428160 blocks super 1.2 level 5, 512k chunk, algorithm 2 [6/6] [UUUUUU]
      [>....................]  resync =  0.6% (26810492/3890885632) finish=1044.6min speed=61649K/sec
      bitmap: 29/29 pages [116KB], 65536KB chunk

Tipp 1: raid.speed_limit_max

In Debian basierenden Systemen gibt es 2 kleine Optionen welche die allgemeine Geschwindigkeit für ein RAID definieren. Definiert wird dies über eine „Min“ und eine „Max“ Option.

/proc/sys/dev/raid/{speed_limit_max,speed_limit_min} kernel variables
## Einfach mal in die CLI kopieren ##
sysctl dev.raid.speed_limit_min
sysctl dev.raid.speed_limit_max

## Beispiel Ausgabe: ##
dev.raid.speed_limit_min = 5000
dev.raid.speed_limit_max = 10000

Damit könnt Ihr zumindest schonmal auslesen was eure gesetzten Werte im System sind. Die Geschwindigkeit wird in Kibibyte pro Sekunde angegeben (1 Kibibyte = 2 10 Byte = 1024 Byte) und ist eine Rate pro Gerät, nicht eine Rate pro Array.
Der Standardwert ist 1000.

Diesen Wert erhöht Ihr jetzt auf euren beliebigen Wert. Die Limitierung der Geschwindigkeit werden ohnehin eure verbauten Festplatten sein. Wir erhöhen jetzt den Min Wert auf 50.000 und den Max Wert auf 500.000 Kibibyte.

echo 50000 > /proc/sys/dev/raid/speed_limit_min
echo 500000 > /proc/sys/dev/raid/speed_limit_max

## ODER ##
## Tragt es in die /etc/sysctl.conf ein ##

dev.raid.speed_limit_min = 50000 
dev.raid.speed_limit_max = 500000 

sysctl -p

Ohne Neustart des Systems sollte sich eure RAID Rebuild Speed deutlich verbessern.

cat /proc/mdstat

## Deutlich besser mit 167 MB pro Sekunde ##

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid5 sdf2[0] sde2[5] sdd2[4] sdc2[3] sda2[2] sdb2[1]
      19454428160 blocks super 1.2 level 5, 512k chunk, algorithm 2 [6/5] [UUUUU]
      [>....................]  recovery =  4.8% (187028428/3890885632) finish=367.8min speed=167808K/sec
      bitmap: 28/29 pages [112KB], 65536KB chunk

Meine „NAS HDD Empfehlung“

# Vorschau Produkt Bewertung Preis
1 Seagate IronWolf 4TB, NAS Interne Festplatte HDD, 3.5 Zoll, 5400 U/Min, CMR, 64 MB Cache, SATA 6GB/s, silber, inkl. Data Rescue Service (ST4000VNZ06) Seagate IronWolf 4TB, NAS Interne Festplatte HDD, 3.5 Zoll, 5400 U/Min, CMR, 64 MB Cache, SATA… Aktuell keine Bewertungen 174,99 EURAmazon Prime
2 Seagate IronWolf 8TB, NAS Interne Festplatte HDD, 3.5 Zoll, 5400 U/Min, 256 MB Cache, SATA 6 Gb/s, silber, inkl. Data Rescue Service (ST8000VNZ02) Seagate IronWolf 8TB, NAS Interne Festplatte HDD, 3.5 Zoll, 5400 U/Min, 256 MB Cache, SATA 6 Gb/s… Aktuell keine Bewertungen 314,56 EUR
3 Seagate IronWolf 6TB, NAS Interne Festplatte HDD, 3.5 Zoll, 5400 U/Min, 256 MB Cache, SATA 6 Gb/s, silber, inkl. Data Rescue Service (ST6000VNZ06) Seagate IronWolf 6TB, NAS Interne Festplatte HDD, 3.5 Zoll, 5400 U/Min, 256 MB Cache, SATA 6 Gb/s… Aktuell keine Bewertungen 229,99 EURAmazon Prime
4 WD Red Plus 8 TB NAS Interne Festplatte 3,5 Zoll - 5640 U/Min, SATA 6 Gb/s, CMR, 256MB Cache WD Red Plus 8 TB NAS Interne Festplatte 3,5 Zoll – 5640 U/Min, SATA 6 Gb/s, CMR, 256MB Cache Aktuell keine Bewertungen
5 Seagate IronWolf Pro 8TB, NAS Interne Festplatte HDD, 3.5 Zoll, 7200 U/Min, CMR, 256 MB Cache, SATA 6 GB/S, inkl. Data Rescue Service (ST8000NTZ01) Seagate IronWolf Pro 8TB, NAS Interne Festplatte HDD, 3.5 Zoll, 7200 U/Min, CMR, 256 MB Cache, SATA… Aktuell keine Bewertungen 349,99 EURAmazon Prime
6 Seagate IronWolf, NAS interne Festplatte 4TB HDD, 3.5 Zoll, 5900 U/Min, CMR, 64 MB Cache, SATA 6GB/s, silber, inkl. 3 Jahre Rescue Service, ST4000VN008 Seagate IronWolf, NAS interne Festplatte 4TB HDD, 3.5 Zoll, 5900 U/Min, CMR, 64 MB Cache, SATA… Aktuell keine Bewertungen 205,98 EUR
7 WD Red Plus 4TB NAS 3.5' Internal Hard Drive - 5400 RPM Class, SATA 6Gb/s, CMR, 256MB Cache WD Red Plus 4TB NAS 3.5″ Internal Hard Drive – 5400 RPM Class, SATA 6Gb/s, CMR, 256MB Cache Aktuell keine Bewertungen 206,41 EUR
8 Seagate IronWolf 4TB interne Festplatte, NAS HDD, 3.5 Zoll, 5400 U/Min, CMR, 64 MB Cache, SATA 6GB/s, silber, inkl. 3 Jahre Rescue Service, FFP, Modellnr.: ST4000VN006 Seagate IronWolf 4TB interne Festplatte, NAS HDD, 3.5 Zoll, 5400 U/Min, CMR, 64 MB Cache, SATA… Aktuell keine Bewertungen 191,98 EUR
9 WD Red 3TB 3.5' NAS Interne Festplatte - 5400 RPM - WD30EFRX WD Red 3TB 3.5″ NAS Interne Festplatte – 5400 RPM – WD30EFRX Aktuell keine Bewertungen
10 WD Red Plus interne Festplatte NAS 4 TB (3,5'', Workload-Rate 180 TB/Jahr, 5.400 U/min, 256 MB Cache, NASware-Firmware für Kompatibilität, 8 Bays) Rot WD Red Plus interne Festplatte NAS 4 TB (3,5“, Workload-Rate 180 TB/Jahr, 5.400 U/min, 256 MB… Aktuell keine Bewertungen 219,99 EUR