Skip to content

RAID 5 to RAID 6 Degraded Array Na Second Drive Echont Na tango Ya Rebuild (Po na nini Jamais Kosala CHKDSK to fsck, drescue Sector Cloning, na mdadm Read-Only Assembly)

Mituya ya mbalakaka ekeseni na mikili. Lokasa oyo esaleli 911, nimero ya États-Unis mpe Canada. Bikólo mosusu mingi esalelaka 112, 999, to motángo mosusu. Luka nimero ya mboka na yo.

Ko remplacer disque dur oyo elongi te na dégradé RAID 5 to mpe RAID 6 mosaleli ya kobomba biloko, Synology DiskStation, QNAP NAS, Linux mdadm array, to mpe Dell PERC / HP Smart Array / LSI na yango MegaRAID contrôleur matériel kaka pona kotala lancement ya deuxième disque membre oyo etikali UNC (Erreur ya kotanga oyo ekoki kobongisama te) ba secteurs ya mabe, . Pending Sectors, to kokita na nzela ya Internet na 42% ya parité rebuild ezali moko ya ba urgences ya stockage ya danger mingi na informatique ya entreprise mpe ya laboratoire ya ndako. Na parité moko RAID 5 molongo (N - 1 tolerance ya ba fautes), reconstruction mathématique XOR ya disque remplacement esengaka kotanga secteur moko moko (LBA 0 na LBA ya suka) na kati ya 100% ya oyo etikali N - 1 membre azali ko conduire en même temps. Tango moderne haute-capacité 8 TB mpo na 24 TB ba lecteurs hélium (oyo esombami na lote moko ya fabrication mpe esalemi na ngonga ya molunge mpe ya koningana oyo ekokani) ezwamaka na botangi ya kotonga lisusu na molɔngɔ ya ba terabytes mingi, mbeba moko ya media latent (URE) to motó ya kotánga ya bolɛmbu na disque ya mibale esalaka ete contrôleur ya RAID elongola kotonga lisusu, ebengana disque ya mibale lokola Faulty / . Crashed, mpe kotya elembo na esika mobimba ya kobomba biloko ** .Offline / . Crashed / . Superblock Event Count Mismatch** **.

Kobanga te, mpe ko forcer te kotonga lisusu ya mibale to kosala ba utilitaires ya kobongisa système ya ba fichiers (fsck, . e2fsck, . xfs_repair, to Windows CHKDSK). Ata ntango motuka ya mibale na kati RAID 5 (to ya misato na motuka na kati RAID 6) ekoli 50 mpo na 5,000 ba secteurs ya mabe mpe ba bengana ye na array, 99.9999 pour cent ya ba secteurs na deuxième disque wana "elongi" ezali kaka 100 pour cent lisible. Na kopekisa mbala moko array, ko cloner disque membre nionso instable secteur par secteur na ba disque de rechange ya santé na nzela ya GNU ddrescue, mpe kosangisa bililingi oyo esalemi na ba clones na ** .Read-Only / . --assume-clean mode ya kozipa** (mdadm + dmsetup Copy-on-Write loop overlays), okoki ko monter système ya ba fichiers sans danger mpe ko copier presque fichier nionso intact. Mpo na makambo ya sikisiki ya aparɛyi ya NAS mpe ba panne ya contrôleur matériel, tanga ba guides na biso ya moninga na RAID 5 to RAID 6 Synology, QNAP, to TrueNAS kokita ya ba disque ebele, . Liwa ya carte contrôleur RAID na importation ya configuration ya poto, mpe NAS RAID array ebebi mpe ZFS/Btrfs ezongisami. Soki panne ya serveur na yo ezali na bopusi na ba systèmes ya sécurité ya vie to ba infrastructures médicales, benga nimero ya urgence ya esika ofandi (911 na États-Unis mpe na Canada, . 112 na Union européenne mobimba, . 999 na Royaume-Uni) to tala buku na biso ya banimero ya mbalakaka.

Sala boye sikoyo

  1. Aborter toute reconstruction ya parité active to scrub mbala moko pe ko downer puissance ya array proprement (to ko déconnecter puissance ya backplane SATA/SAS soki disque moko ezali kosala ba bruits mécaniques ya cliquage to ya ko gratter):
  2. Po na nini kotika rebuild ya stalling ekoba ebebisa array: Tango disque membre ebeti patch ya secteur ya mabe (LBA ntango ya kotánga) to ezali na motó ya kotánga/kokoma oyo ezali kotyola (media scratch), kotika contrôleur RAID komeka lisusu ba secteurs na boumeli ya bangonga enikaka microscopique revêtement magnétique plat na mputulu na kati ya cylindre ya piste mobimba, kobalusa récupérable 20-sector défaut na crash ya catastrophique ya mutu ya plateau mobimba.
  3. JAMAIS kokima mbangu CHKDSK /f, . fsck -y, . e2fsck, . btrfs check --repair, to xfs_repair na array ya RAID oyo ebebi, oyo ezali na synchronisation te, to oyo etongami lisusu ndambo:
  4. Mpo na nini CHKDSK mpe fsck cause 100% permanent data destruction on out-of-sync RAID: Soki Drive 2 etikalaki mardi mpe Drive 3 etikalaki na tango ya reconstruction ya jeudi, ba mdadm to RAID ya matériel Event Counter (Update Time) na ba disque durs wana mibale ekeseni na ba nkoto ya ba transactions. Soki o force-assembler array na ba génération ya drive oyo ekokani te to ba rayures oyo ezangi pe o permettre fsck to mpe CHKDSK mpo na kokoma na array, motali ya système ya ba fichiers amonaka banzete ya inode oyo ebukani oyo euti na ba rayures RAID oyo ezali na aligné te, alongolaka ba millions ya ba entrées ya répertoire valide na kati lost+found, mpe ekomaka likolo ya ba rayures ya ba données ya malamu na parité oyo ebebi na kati ya disque nionso na array.
  5. JAMAIS ko cliquer "Create Array", . "Initialize", to "Clear Configuration" na BIOS RAID matériel, mpe JAMAIS kosala mdadm --create kozanga --assume-clean mpe Kopi-na-Kokoma (COW) kozipa boucle:
  6. Kosala norme moko mdadm --create (kozanga --assume-clean mpe kokokanisa bonene ya sikisiki ya chunk, layout, mpe offset ya ba données) ebandi mbala moko kokoma ba rayures ya parité ya sika na ba disques nionso, kobebisa superblock ya système ya ba fichiers mpe ba B-trees soki paramètre moko (512K vs. 64K chunk, . left-symmetric vs. left-asymmetric, to 2048s vs. 262144s offset ya ba données) ezali mabe ata na secteur moko.
  7. Etiqueter esika nyonso ya disque dur physique (Bay 0 / Bay 1 / Bay 2 / Bay 3 mpe nimero ya série) na marqueur to ruban permanent AVANT ya kobimisa disque moko na châssis:
  8. Kokoma nimero ya baie ya sikisiki mpe nimero ya série na étiquette ya likolo ya disque moko na moko. Koyeba ordre ya baie physique pe ko vérifier mdadm --examine métadonnées ebombaka bangonga ya reconstruction ya ordre ya rayures sima.
  9. Clone (ba) lecteur(s) oyo elongi te secteur-par-secteur na ba lecteurs ya sika ya santé oyo ezali kosalela GNU ddrescue (na fichier map) likolo ya ba ports SATA/HBA ya carte mère directe AVANT ya komeka assemblage nionso ya RAID:
  10. Komeka ata moke te kosangisa to ko monter array RAID na kosalelaka disque oyo ezali kokufa physiquement yango moko. Bokanga disque oyo elongi te na SATA/AHCI to LSI oyo ezali RAID te IT-Mode Port HBA na poste ya mosala ya kobikisa Linux, désactiver auto-mounting ya OS, mpe tambuisa ddrescue -f -n /dev/sdX /dev/sdY rescue_driveX.map donc ba secteurs rapides santé ba évacuer na passe moko avant ba toucher ba zones ya secteur ya mabe.
  11. Asangisa ba lecteurs cloné na kati Read-Only mode (mdadm --assemble --readonly to kosalela dmsetup / . losetup RAM/ba superpositions ya fichier):
  12. Na kotiaka Copy-on-Write oyo ekoki kobwakama mbala moko (COW) fisyé ya superposition likolo ya disque membre cloné moko na moko, okoki test-mount array, ko replay an ext4 to mpe XFS journal, to kutu komeka rebuild virtuel ntango ozali ko garantir que ba octets zéro e modifier jamais na ba clones ya disque na yo ya sous-jacent.

Danger

Motambo ya "Force de conduite hors ordre" (Stale Drive Overwriting Fresh Drives): Kanisa ete ozali na 4-drive RAID 5 (Disk 1, Disk 2, Disk 3, Disk 4). Disk 3 elongi te il y a 6 mois, et jamais o remplacer yango (ko kima dégradé pendant 6 mois). Lelo oyo, . Disk 2 a développer 100 secteurs ya mabe mpe atiki kelasi. Ko forcer mwana ya 6 mois Disk 3 zonga na internet mpo na kotonga lisusu Disk 2. Soki osaleli Disk 1 + Disk 3 (6 months stale) + Disk 4 mpo na kotonga lisusu to ko monter array, fichier nionso oyo esalemi to ebongwani na sanza 6 oyo eleki ekobeba na poubelle binaire oyo ekoki kotangama te. O esengeli kosala clone Disk 2 (motuka oyo elongaki te lelo) na ddrescue mpe kosangisa ** .Disk 1 + Cloned Disk 2 + Disk 4** **.


Nzete ya mokano : kobikisa array RAID 5 to RAID 6 tango disque ya mibale elongi te na tango ya kotonga lisusu

Landa flux oyo ya mosala ya récupération ya stockage forensic pona ko récupérer array na yo sans ko perdre ata bande moko oyo etikali:

flowchart TD
    Start["RAID 5 (2ème Drive) to RAID 6 (3ème Drive) Elongi / Ekweyi Hors ligne Na Tango Ya Rebuild"] --> StopNow["ETAPE 1: Abort Rebuild Immédiatement & Power Down Array (Kopekisa ba scores ya plateau na Drive oyo ezali ko échouer)"]

    StopNow --> SoundCheck{"Drive oyo elongaki te esalaki makɛlɛlɛ makasi ya kobɛtabɛta, kobɛta bip to konika?"}

    SoundCheck -->|"OUI: Crash ya mutu ya mécanique / Stiction"| CleanRoom["STOP: Kosala Lisusu Puissance Oyo Conduire Te. Tinda KAKA Drive oyo esali échec mécanique (Plus 1 Drivey santé mpo na référence ya bande) na Laboratoire ya Salle de propre mpo na ko imager sur un Clone"]

    SoundCheck -->|"NON: Ebalukaka malamu, elongi te mpo na ba secteurs ya mabe (UNC / Pending / Timeout)"| LabelDrives["STEP 2: Label Every Drive With Its Exact Bay Number & Serial Number -> Connect to Linux Workstation via Direct SATA / IT-Mode HBA"]

    LabelDrives --> InspectMeta["Tambwisa 'mdadm --examine /dev/sd*' mpe 'smartctl -a /dev/sd*' na ba Disques nionso (Enregistrement Heure ya mise à jour, Compteur ya ba événements, Role, Taille ya chunk, Layout, Offset ya ba données)"]

    InspectMeta --> CloneDrives["ETAPE 3: Kosala clone ya Drive nionso oyo ebebi / ya secteur ya mabe na drive ya rechange ya santé na kosalelaka 'ddrescue -f -n' (Fast Pass Liboso, Na sima Scrape Pass Na Mapfile)"]

    CloneDrives --> PickFreshest["Identify the N-1 (RAID 5) or N-2 (RAID 6) Drives With the HIGHEST / MOST RECENT 'Events' Counter (Never Mix a Stale Old Dropped Drive With Fresh Drives)"]

    PickFreshest --> CowOverlay["ETAPE 4: Kosala ba superpositions ya boucle seulement lecture / 'dmsetup' Copy-on-Write (COW) Likolo ya ba Drives Clonés Po ba Clones Originales Ekoki Ko Modifier Te"]

    CowOverlay --> AssembleRO["Tambwisa 'mdadm --assemble --force --readonly' na ba Appareils ya Overlay -> Botia Système ya ba fichiers kaka na botangi ('mount -o ro,noload') -> Bosala kopi ya ba données nionso ya critique na bobateli ya libanda"]

Phase 1: Understanding why a second drive fails during a RAID rebuild (XOR Parity Math & . Event Counters) .

To understand why your array crashed mid-rebuild and why your data is still recoverable, examine how RAID 5 mpe RAID 6 actually work on disk.

1. How XOR parity reconstruction works and why 1 bad sector aborts an entire rebuild

In a 4-drive RAID 5 molongo (Drive A, Drive B, Drive C, Drive D), data is split into fixed-size chunks (typically 64 KB to mpe 512 KB) oyo ezali na bansinga na kati ya ba disques, epai eteni moko na molɔngɔ mokomoko esimbaka XOR Parity (P): $\(\text{Parity } P = A \oplus B \oplus C\)$ Soki Drive C fails completely and you insert a blank Replacement Drive C_new, the RAID controller must reconstruct every stripe on C_new by calculating: $\(C_{\text{reconstructed}} = A \oplus B \oplus P\)$ - What happens when Drive B hits a single unreadable 4 KB sector (UNC error) at 42% of the rebuild: - To calculate that single 4 KB block on C_new, the controller must have a valid read from Drive A, . Drive B, mpe Drive D. - When Drive B returns a hardware Read Error (Sense Key 03h / 11h Unrecovered Read Error) after 7 seconds (TLER / ERC timeout), consumer and enterprise RAID controllers are often programmed with a catastrophic default behavior: instead of skipping that single 4 KB sector, logging a zero block, and finishing the other 99.9999% of the rebuild, the RAID controller marks Drive B lokola FAILED / OFFLINE and aborts the entire rebuild. - At that moment, your array has two drives marked "Failed" (Drive C which was only 42% rebuilt, and Drive B which actually has 99.99998% healthy sectors and only 12 bad sectors).

2. Why Event Counters (Update Time) determine which drives you must use for recovery

Every time a RAID 5 to mpe RAID 6 array writes data or changes state (such as a drive dropping out), the RAID metadata (mdadm superblock or hardware DDF metadata) increments a 64-bit Events compteur na ba disque durs nionso oyo ezali kosala lelo.

Kokanisa na... mdadm --examine sortie ya 4-drive typique RAID 5 likama wapi sdb elongi te lobi (Events: 10450) mpe sdc batikaki kelasi na ntango ya kotonga lisusu ya lelo (Events: 10892):

Drive ya nzoto Role na Array Update Time Events Compteur ya contre Santé Physique & Oyo Ezali Na Yango
/dev/sda (Bay 1) . Active device 0 Today 14:22:10 ** ** .10892** ** . 100% Healthy & Current: Ezali na écriture nionso tii na seconde exacte oyo rebuild e crasher lelo.
/dev/sdb (Bay 2) . spare / faulty (Ebongwani na disque ya sika) Yesterday 09:15:00 10450 (Esili) Elongi Lobi: Ezangi 29 heures ya base de données ekomami, TO e remplacé na disque ya sika oyo ezali kaka 42% etongami lisusu (Reshape/Rebuild Pos).
/dev/sdc (Bay 3) . faulty (Ekiti na 42% kotonga lisusu) Today 14:22:09 ** ** .10890** (Off na 2) 99.999% Healthy & Current: Babenganaki kaka 1 seconde liboso /dev/sda mpe /dev/sdd po ebeta 8 secteurs ya mabe na tango ya reconstruction etangamaki.
/dev/sdd (Bay 4) Active device 3 Today 14:22:10 ** ** .10892** ** . 100% Healthy & Current: Ezali na écriture nionso tii na seconde exacte oyo rebuild e crasher lelo.
  • Mobeko ya wolo ya RAID Recovery uta na tableau oyo ezali likolo:
  • Talá yango /dev/sda (10892), . /dev/sdc (10890), mpe /dev/sdd (10892) nyonso ezali na makambo oyo ekokani mpenza Events ba compteurs oyo euti na Today 14:22.
  • Une fois to clone /dev/sdc likolo ya motuka ya nzoto kolɔngɔnɔ kosalela ddrescue (ko récupérer 99,9999% ya ba secteurs na yango mpe kotondisa zéro ba 8 secteurs oyo ekoki kotangama te), tokoki ko force-assembler /dev/sda + Cloned /dev/sdc + /dev/sdd (ko ignorer oyo etongami lisusu na ndambo /dev/sdb mobimba). Combinaison wana ya 3-drive epesi biso 100 pour cent constant, jusqu'à-la-seconde dégradé RAID 5 array na zéro déchirure ya bande.

Phase 2 : Clonage ya secteur étape par étape ya lecteur oyo elongi te na GNU ddrescue

Liboso ya kosimba mdadm to esaleli nyonso ya kosangisa RAID, o osengeli kosala clone ya (ba) disque oyo ebwakaki mabunga ya botangi na ba disque remplacement ya santé ya capacité ya octets ekokani to ya monene.

Etape 1: Bongisa environnement ya rescue ya Linux mpe bo désactiver auto-assemblage

  1. Bosala démarrage ya poste ya mosala Linux (to bo démarrer serveur na bino na stick USB en direct lokola SystemRescue system-rescue.org to Ubuntu Live Server) na ba lecteurs oyo ekangami na ports SATA ya carte mère standard to na LSI HBA na IT Mode (Koleka oyo ezali ya RAID te).
  2. Kopekisa Linux emeka automatiquement ko assembler to ko monter array na yo ya RAID oyo ebukani na démarrage:
  3. Tango ozali ko démarrer SystemRescue to Ubuntu Live, tala cat /proc/mdstat. Soki Linux auto-assemblé partiel moko md dispositif na fond, telemisa yango mbala moko na mode sécurité ya kotanga kaka avant ya ko imager:
    mdadm --stop /dev/md*
    
  4. Koyeba disque nionso na modèle ya sikisiki, numéro de série, na taille ya octet (jamais deviner /dev/sdX ba lettres, po Linux ezo reassigner ba lettres ya drive na ba reboots):
    lsblk -o NAME,SIZE,MODEL,SERIAL,TYPE,FSTYPE
    
    Komá oyo /dev/sdX ekokani na Failing Source Drive na yo (ndakisa, /dev/sdc, oyo esalemaka na molɔngɔ WCC4E12345) mpe oyo /dev/sdY ezali Brand-New Blank Target Drive na yo (ndakisa, /dev/sdf, oyo esalemaka na molɔngɔ ZGG9988776).

Etape 2: Kosala 2-Stage GNU ddrescue protocole ya clonage (Salelá ntango nyonso Mapfile)

Kosalela ata moke te standard dd (dd if=/dev/sdc of=/dev/sdf) na disque RAID oyo ezali kosala malamu te: standard dd soit e aborter na secteur ya mabe ya liboso soit e déplacer ba offsets ya sortie soki sync ezali configuré mabe, mpe ezali na mémoire te ya ba secteurs nini elongaki. ** ** .GNU ddrescue** (gddrescue package) esalelaka mapfile ya mayele ya état multi-pass:

  1. Pass 1: Clone ya mbangu oyo ekoki kokatakata te (-n drapeau) mpo na Kobikisa 99,99% ya ba Secteurs ya Santé Liboso:
    ddrescue -f -n -b 4096 /dev/sdc /dev/sdf /root/raid_bay3_sdc.map
    
  2. ** ** .-f**: Epesi nzela na kokoma directement mpo na ko bloquer appareil /dev/sdf (tala mbala misato vérifier yango /dev/sdc ezali liziba mpe /dev/sdf ezali cible ya pamba).
  3. ** ** .-n (--no-scrape)**: Eyebisi ddrescue mpo na kopumbwa mbala moko likoló ya etúká nyonso ya secteur ya malɛmbɛ to ya mabe kozanga konika motó ya kotánga, kobikisa ba gigabytes nyonso ya nzoto kolɔngɔnɔ na mbangu mingi (150 to 250 MB/s) liboso ete kolɔngɔnɔ ya nzoto ya motuka ebeba.
  4. ** ** ./root/raid_bay3_sdc.map**: Abombaka bokoli ya secteur ya sikisiki na sima ya 30 secondes. Ata soki lecteur oyo elongi te ekangami mpe esengi cycle ya puissance, kozongela kosala commande moko exactement na .map fichier ezongeli na secteur exact esika etelemaki.
  5. Koleka 2: Kokata na sima/Kokatakata oyo etalisami (-d -r1) mpo na kozongisa ba Secteurs Mabe Marginaux:
  6. Soki Pass 1 esili (pct rescued: 99.99%), kitisa temps d’exploitation ya commande SCSI ya noyau po secteur moko na moko ya mabe elongi te noki (5 seconds na esika ya kozela 30 to 180 seconds na secteur moko moko):
    echo 5 > /sys/block/sdc/device/timeout
    
  7. Tambwisa Pass 2 na accès direct na disque (-d) mpe 1 komeka lisusu (-r 1):
    ddrescue -f -d -r 1 -b 4096 /dev/sdc /dev/sdf /root/raid_bay3_sdc.map
    
  8. Kanga, ko déconnecter original ezo panza /dev/sdc conduire, pe kotia yango na sécurité na étagère: Kobanda na point oyo, okosala exclusivement na clone na yo ya santé (/dev/sdf) mpe mosangani na yo mosusu ya nzoto kolɔngɔnɔ azali kotambwisa motuka.

Phase 3: Assemblage ya RAID oyo ekoki kotanga kaka na ndenge ya libateli na kosalelaka Copy-on-Write (COW) ba superpositions mpe mdadm

Sikoyo lokola ozali na ba clones ya disque ya santé, jamais ko kima mdadm --assemble --force directement na ba disque bruts sans Copy-on-Write (COW) kozipa to --readonly drapeau. Mpo na nini? Mpamba te --force ekomaka lisusu ba superblocs ya RAID na ba disque durs, mpe soki journal ya système ya ba fichiers (ext4 / . XFS) ezongelaka automatiquement na montage en utilisant combinaison ya lecteur ya mabe, ezo changer libela ba clones na yo.

Step 1: Inspect the RAID metadata across all member drives (mdadm --examine) .

Run mdadm --examine on every member drive (or partition, e.g., /dev/sda1 to mpe /dev/sda3 on Synology/QNAP NAS drives) and save the output to a text file:

mdadm --examine /dev/sd[a,b,d,f]* > /root/raid_metadata_audit.txt
cat /root/raid_metadata_audit.txt
Look at four critical fields for each drive: 1. ** ** .Array UUID: Verify all drives belong to the exact same RAID pool. 2. ** ** .Device Role: Shows the exact stripe index (Active device 0, . Active device 1, . Active device 2, . Active device 3). 3. ** ** .Update Time & . Events: Identify the N - 1 drives (for RAID 5) or N - 2 drives (for RAID 6) that share the highest/closest Events count. 4. ** ** .Raid Level, . Layout, . Chunk Size, mpe Data Offset: Record these exact numbers (e.g., Raid Level : raid5, . Layout : left-symmetric, . Chunk Size : 512K, . Data Offset : 262144 sectors).

Step 2: Create non-destructive Copy-on-Write (COW) Device-Mapper overlays (overlay-create) .

To guarantee 100 percent safety so that even if you force-assemble the array and run mount, zero bytes are ever written to your physical hard drives, create loop-backed dm-snapshot Copy-on-Write overlays in /tmp (or on an external scratch drive):

# Create a small sparse COW file + loop device for each member partition (e.g., sda3, sdf3, sdd3)
mkdir -p /root/cow
for dev in sda3 sdf3 sdd3; do
    truncate -s 20G /root/cow/${dev}.cow
    loop_base=$(losetup --find --show --read-only /dev/${dev})
    loop_cow=$(losetup --find --show /root/cow/${dev}.cow)
    sz=$(blockdev --getsz /dev/${dev})
    echo "0 $sz snapshot $loop_base $loop_cow P 8" | dmsetup create ovl_${dev}
done
- What this does: You now have virtual block devices /dev/mapper/ovl_sda3, . /dev/mapper/ovl_sdf3, mpe /dev/mapper/ovl_sdd3. The underlying physical drives (sda3, sdf3, sdd3) are locked --read-only at the kernel block layer. Any writes made by mdadm --force, LVM, or filesystem journal replay go harmlessly into the disposable /root/cow/*.cow files. If anything goes wrong, you simply delete the overlays and recreate them in 2 seconds.

Step 3: Force-assemble the array on the overlay devices and mount Read-Only

  1. Assemble the freshest N - 1 overlay devices using --assemble --force:
    mdadm --assemble --force --verbose /dev/md99 /dev/mapper/ovl_sda3 /dev/mapper/ovl_sdf3 /dev/mapper/ovl_sdd3
    
  2. Why we leave out the stale/half-rebuilt drive (sdb3): Forcing mdadm mpo na kosangisa na ba 3 drives ya sika (sda3, cloned sdf3, mpe sdd3) brings /dev/md99 online in clean degraded mode ([U_UU]) using the exact latest Events state, while ddrescue already rescued the data from sdf3.
  3. Activate LVM (vgchange) if your NAS or server uses LVM on top of RAID (Synology SHR, QNAP, Proxmox, Ubuntu):
    pvscan
    vgscan
    vgchange -ay
    lvs
    
    (If your Synology NAS uses Btrfs on LVM or Synology Hybrid RAID, you will now see /dev/vg1000/lv to mpe /dev/vg1/volume_1 appear.)
  4. Mount the filesystem in strict Read-Only mode and evacuate your critical files immediately:
    mkdir -p /mnt/raid_rescue
    # For ext4:
    mount -o ro,noload /dev/md99 /mnt/raid_rescue
    # (Or if noload refuses due to dirty journal, mount the COW overlay normally so the journal replays into the disposable COW file)
    mount -o ro /dev/md99 /mnt/raid_rescue
    # For Btrfs (Synology NAS):
    mount -t btrfs -o ro,usebackuproot,nologreplay /dev/vg1000/lv /mnt/raid_rescue
    
  5. Copy your most critical folders first using rsync to an external backup drive:
    rsync -avP --ignore-errors /mnt/raid_rescue/ /mnt/external_backup_usb/
    

Phase 4: Rescuing Hardware RAID Controllers (Dell PERC, . LSI MegaRAID, . HP Smart Array, . Adaptec) and ZFS / Btrfs Pools

What if your array was managed not by Linux mdadm, but by a Hardware RAID Controller Card (Dell PERC H730/H740/H755, . Broadcom / LSI MegaRAID, to HP Smart Array) that now reports Virtual Disk Offline to ** .Foreign Configuration Found** after a second drive hiccupped during rebuild?

1. Hardware RAID Cards (Dell PERC, . LSI MegaRAID, . HP Smart Array) .

  1. JAMAIS ko cliquer "Clear Foreign Configuration" to mpe "Initialize Virtual Disk":
  2. In Dell PERC / LSI na yango MegaRAID BIOS (Ctrl+R to mpe HII UEFI Configuration Utility), Clear wipes the RAID metadata from the drives, and Initialize overwrites the data stripes.
  3. If a healthy drive briefly dropped offline due to a loose backplane cable or timeout, Import Foreign Configuration attempts to bring the drive back in; however, if one drive dropped weeks ago and a second dropped today, importing both or forcing the stale drive online via the controller BIOS can corrupt the array.
  4. The Safe Software Reconstruction Method for Hardware RAID (DDF Metadata / dmraid / . R-Studio / . UFS Explorer):
  5. Hardware RAID cards store standard SNIA DDF (Disk Data Format) metadata in the final sectors at the end of each hard drive, and stripe data across the drives starting at sector 0 (or after a small header offset) using standard 64 KB, . 128 KB, . 256 KB, to 512 KB chunk sizes (Left-Asymmetric to mpe Left-Symmetric).
  6. Instead of gambling with a destructive hardware RAID card BIOS:
    1. Label all drives by slot number and connect them to a standard SATA / non-RAID IT-Mode HBA on a recovery workstation.
    2. Clone the bad-sector drive using GNU ddrescue as shown in Phase 2.
    3. Open the cloned drives in UFS Explorer RAID Recovery to ** .R-Studio Technician**, or assemble them read-only in Linux using dmsetup / . mdadm --build: these tools automatically detect the LSI / . PERC / . HP stripe order, chunk size (64K/ .512K), mpe rotation parité na mémoire 100 pour cent oyo ekoki kotanga kaka sans jamais kotika carte RAID matériel ekoma ata octet moko na ba disque durs na yo.

2. TrueNAS / ZFS (RAID-Z1 / . RAID-Z2) mpe Synologie Btrfs Ba Pannes ya Scrub/Resilver

Soki piscine na yo esaleli OpenZFS (RAID-Z1 to mpe RAID-Z2) on TrueNAS or Proxmox and a second drive throws CKSUM / . READ errors during a zpool replace resilver: 1. Why ZFS handles bad sectors during resilvering better than hardware RAID, and when it still locks up: - Unlike naive hardware RAID cards that drop an entire disk on a single bad sector, ZFS continues resilvering past localized READ errors and logs only the specific damaged file paths in zpool status -v **. - However, if the second failing drive hangs the SATA/SAS bus (I/O timeout / head thrashing) or drops completely offline (UNAVAIL / . FAULTED), the pool enters SUSPENDED state (pool I/O is currently suspended). 2. How to rescue a SUSPENDED to mpe FAULTED ZFS RAID-Z1 / . RAID-Z2 pool: - Power down cleanly, clone the failing drive onto a healthy replacement disk using GNU ddrescue -f -n (ZFS partition labels include the exact vdev GUID at the start and end of the disk, so a raw sector clone is automatically recognized by ZFS as the original vdev member). - Disconnect the physically dying drive, leave the ddrescue clone connected, and import the ZFS pool in strict Read-Only mode (readonly=on) without starting a write transaction or resuming the resilver:

zpool import -o readonly=on -f -R /mnt/zfs_rescue tank
- Importing with -o readonly=on prevents ZFS from writing new uberblocks or attempting background healing writes, allowing you to copy every dataset off safely via zfs send to mpe rsync before rebuilding the pool from scratch.


Mituna oyo batunaka mingi

Why did you say NEVER to run CHKDSK to mpe fsck when my RAID array mounts with filesystem errors after a drive drop?

On a single standalone hard drive, running CHKDSK to mpe fsck repairs minor directory inconsistencies. On a multi-drive RAID 5 or RAID 6 array that suffered a double-drive drop or interrupted rebuild, filesystem errors are almost always caused by RAID stripe misalignment or a stale member drive being forced online (meaning every 3rd to mpe 4th 64 KB chunk of data is being read from the wrong drive generation). If you let CHKDSK /f to mpe fsck -y run on a misaligned or out-of-sync RAID array, it misinterprets millions of valid files as corrupted metadata, truncates directory trees, dumps unnamed fragments into lost+found, and writes new parity blocks across all drives, making it mathematically impossible to ever reassemble the correct drive combination afterward. Always mount via Read-Only Copy-on-Write (COW) overlays first.

What if the partially rebuilt replacement drive (42% complete) AND the second drive that failed at 42% BOTH have needed data? Can I combine them?

Yes. This is a classic "Split-Horizon / Hybrid Clone" RAID rescue. Suppose Drive 2 died completely on Monday, you put in New Drive 2, and the rebuild made it to 42% (LBA 3,500,000,000) before Drive 3 suffered a fatal head crash at LBA 3,500,000,000. Notice what you actually have: for the first 42% of the array (0% mpo na 42%) ., . New Drive 2 has already been 100 percent reconstructed. So for the first 42% of the LBA range, you have a complete set of stripes using Drive 1 + New Drive 2 + Drive 4 (treating crashed Drive 3 as the missing disk). And if Drive 3 only had a localized bad-sector patch at 42% (and is readable from 43% mpo na 100% via ddrescue), you use Drive 1 + Drive cloné 3 + Motuka 4 mpo na oyo etikali 58% . ya array.

Pourquoi ba deuxième lecteurs ezo échouer mingi boye kaka na kati ya rebuild ya RAID 5?

Makambo mibale ya solosolo ya ingénierie esangani mpo na kosala RAID 5. Ezali na ntina mingi etongami lisusu oyo eyebani mingi mpo na ba panne ya double-drive: (1) . Bobange ya Batch Identique: Bato mingi oyo basalelaka yango basombaka ba disque dur 4 kino 8 oyo ekokani na motɛki moko na mokolo moko (firmware moko, ebele ya usine moko, lote ya moteur ya broche moko) mpe kotambolisa yango pembenipembeni na molunge ndenge moko mpenza na boumeli ya ngonga 35 000; ntango Drive 1 esili, Drive 2 mpe Drive 3 ezali mikolo mosika na seuil ya kolata ya masini moko. (2) . Mabunga ya kotánga oyo ebombami oyo ekoki kobongisama te (Ba UREs) .: Na nse ya mosala ya mokolo na mokolo ya momesano, . 95% . ya ba secteurs ya archive ya malili ya disque dur etangamaka te pendant des mois na mbala moko, yango wana ba secteurs ya mabe latent efandi sans découvert. A RAID 5. Ezali na ntina mingi kotonga lisusu ba forces a continue 100% surface read of every single sector across every surviving drive (40 to 100 terabytes of continuous reading), immediately exposing any latent bad sector that accumulated over the past year.

How do I know which files were affected by the few unreadable bad sectors that ddrescue had to zero-fill?

GNU drescue ya kosala includes a built-in forensic utility called drescuelog ya mosala mpe ddru_ntfsfindbad / . debugfs that maps the exact unrecovered sector LBA ranges from your .map file (status = '-' bad sectors) through the RAID stripe math directly to the filesystem inode table. Once you know which 4 KB blocks were zero-filled during cloning, you can query debugfs (icheck mpe ncheck na ext4) to btrfs inspect-internal logical-resolve to print out the exact list of 2 or 3 filenames that overlapped those bad sectors, confirming with 100 percent mathematical certainty that every other file on your multi-terabyte server is completely uncorrupted.


Ba guides oyo etali yango


Maziba mpe bokambi ya Leta

  • Linux Raid Wiki (raid.wiki.kernel.org/index.php/Linux_Raid & . Recovering_a_failed_software_RAID): Official Kernel mdadm Recovery Protocol, Device-Mapper Copy-on-Write (dm-snapshot) Overlays, and Events Counter Reconciliation.
  • GNU ddrescue Official Engineering Manual (gnu.org/software/ddrescue/manual/ddrescue_manual.html): Multi-Phase Non-Scraping (-n) and Direct Access (-d) Sector Recovery Algorithms for Failing Magnetic Media.
  • Synology Official Knowledge Base (kb.synology.com/en-global/DSM/tutorial/How_can_I_recover_data_from_my_DiskStation_using_a_PC): Mounting mdadm + LVM2 + Btrfs / . ext4 NAS Volumes Read-Only on Ubuntu Rescue Systems.
  • Storage Networking Industry Association (SNIA): Common RAID Disk Data Format (DDF) Specification for Hardware RAID Controller Metadata Portability.