Skip to content

RAID Array defa lajj, Pool dencukaay NAS bu yàqu, ak kaaraange tabaxaat

Su benn aparey bu nekk ci kër gi wala liggéeyukaay bu ndaw (lu melni Synology DiskStation, QNAP Turbo NAS, TrueNAS, wala serwër Unraid) tàmbali bip ak LED amber ba noppi yëgle "Pool dencukaay bi dafa yàqu" wala "Volume bi dafa daanu," terabytes ci nataali njaboot ak dokimaa liggéey yuñ dul mëna wecci, dañu leen denc wala ñu yàq leen ba fàww. Lu weesu fukki at ci ginaaw, dañu jàngal jëfandikukat yi ni su benn disk ci RAID 5 wala RAID 1 xonk, dangay dindi disk bi dee, nga dugal disk bu bees bu amul dara, nga bës "Defar / Tabaxaat."

Ci biir pool yu am kàttan yu bari yuñ tabax ak 8 TB ba 24 TB disk yuñ jëndoon ci benn lote defarkat, ** tàmbali tabaxaat RAID ci barab bi mooy #1 sabab bu mat te mënul defaraat disk yu bari **. Tabaxaat 4-drive 16 TB RAID 5 array dafay forse bépp disk bu màgget bu des ngir jàng 100 pursaa ci secteur yi te du taxaw ci diiru 24 ba 72 waxtu ci sarge thermique ak mekanik bu gëna mag. Su benn ci disk yi des ci mbokk yi daje ak benn njuumte buñu mënatul saafara (URE) wala mu am degradation bopp ci xaaju tabaxaat bi, RAID controller bi dafay génne ñaareelu drive bi ci piscine bi ba noppi dagg array bi yépp. Ngir mucc ci jafe-jafe RAID, ZFS, wala Btrfs fàww nga noppalu bind yépp ci saasi, nga saytu S.M.A.R.T. telemetry ci bépp disk bu des, sauvegarde dosiye yu am solo balaa di laal topologie array bi, ak nataal disk yu ndaw yi ak GNU ddrescue balaa ngay jéema tabaxaat parity wala dajale metadata yuñ mëna jàng kese.


Defal lii leegi

  1. ** BULEEN MUSAA genne ay disk yu bari ngir "delloosi" leen fekk NAS wala serwër bi taal, te BULEEN MUSAA weccoo disk yi te doo bind seen nimero slot.** Balaa ngay laal benn tegukaayu disk, jëlal sharpie wala defarkatu etiket te nga màrke ci kaw disk bu nekk ak nimero bay bi (Bay 1 / sda, Bay 2 / sdb, Bay 3 / sdc). Ak Linux bu bees bi mdadm, LVM, ak ZFS dañuy denc superblok UUID ci disk bu nekk, RAID yi (Dell PERC, HP Smart Array, Broadcom/LSI MegaRAID) dañuy faral di lëkkale metadone yi ci nimero SAS/SATA yi.
  2. **BUL ci saasi klike ci "Defar" wala "Tabaxaat" ci kaw RAID 5 / SHR-1 bu yàqu sudee amoo benn backup bu bees. sa fichier yépp mën nañu leen jàng 100 pursaa leegi. Bransel ab disk USB 3.0 bu biti ci NAS bi te nga kopie sa dosiye yi gëna am solo, yuñu dul mëna wecci ci piscine bi yàqu * balaa * ngay dugal disk yi des ci test stress bu metti bu 48 waxtu ci tabaxaat parity.
  3. BUL MUSAA bës "Tàmbali Disk bi," "Sosal Pool bu Bees," "Fàcce Tablug," wala daw fsck -y / btrfs check --repair ci rang bu tass. Su ñaari disk génnee ci rang RAID 5 benn yoon (dafay faral di aju ci dip bu gàtt ci joxe kuuraŋ wala timeout SATA moo gën dee physique dëgg), NAS GUI dina màrke Pool dencukaay bi ni "Crashed" ba noppi di joxe ngir tàmbali wala defaraat volume bi. Tambali dafay bind ay superblok yu bees ak ay zero ci rayu parite yi, di yàq done yiñ mëna defaraat. Noonu la daw btrfs check --repair ci volume Btrfs bu yàqu siiw na lool ci askanu kernel Linux ndax dafay yàq garabu extent bi weesu recuperation.
  4. Taxawal bépp konteneer Docker, masin virtuel, serwëru media Plex, enregistrement kamera surveillance, ak RAID Scrubs yuñ nara def ci saasi. Bépp bind ci array bu yàqu dafay yokk risku parity write-hole wala push marginal ñaareelu drive ci kaw buntu bi. Duggal ci interfaasu web NAS wala terminal SSH nga dakkal bépp sarwis bu nekk ci ginaaw ak bépp liggéey bu bari E/S.
  5. Sudee benn disk ci NAS bi dafay def ritm buy klike, fëgg, yëy, wala son yuuxu, tëj NAS bi bu baax leegi. Disk buy klike wala buy yëy amna physique buy jàng / bind (xoolal Disque dur bi dafa yàqu ak defaraat done yi). Bàyyi ko mu wëréelu ci biir boîtier NAS bi, ci ay simili yu néew, plateau magnetik yi dina ñu nekk pënd.
  6. **Xool ndax "NAS bi daa ñàkk" nekk na plaque madre NAS bu dee wala brick puissance bu biti. ** Sudee sa Synology, QNAP, wala Asustor NAS ci saasi duñu tàkk, wala ñuy lim LED puissance bu baxa bi ba fàww (lu melni Intel Atom C2000 bu siiw mën nañu ni 100 pursaa **. Mën nga toxal disk yooyu ci beneen NAS wala nga monte leen ñuy lire rek ci bépp ordinatër Ubuntu Linux bu jëfandikoo port SATA yiñ miin.
flowchart TD
    A["NAS bip / RAID rapoor ci tolluwaayu degrade wala daanu"] --> B{"Ndax amna disk yuy def bruit klike, yëy wala gaañ?"}
    B -->|"Waaw: Bopp buy mbëkku"| C["Dakkal NAS ci saasi, nga joxe etiketu disk bu nekk ak nimero Bay bi, nga dindi disk biy klike"]
    B -->|"Deet: Liggéeyukaay bu noppi"| D{"Lan moy tolluwaayu dencukaay bi?"}
    D -->|"DEGRADED (1 disk defa lajj, volume bi mën nañu ko jàng ba leegi)"| E["TAXAL bépp Docker/VM/Surveillance bind te BULEEN bës Tabaxaat ba leegi"]
    E --> F["Saytu S Màndarga yi (ID 5, 187, 197, 198) ci bépp disk buy mucc"]
    F --> G["Bransel lecteur USB bu biti te nga njëkka kopie fichier yu am solo yi ci piscine bi yàqu"]
    G --> H{"Ndax amna disk yu mucc yu wane secteur yu baaxul (ID 5 / 197 > 0)?"}
    H -->|"Waaw: Ñaareelu dawal bi defa lajj"| I["Dakkal kuuraŋ bi nga klone disk bu nekk ak GNU ddrescue balaa ngay jéema tabaxaat"]
    H -->|"Deet: Mucc dafay wér 100%"| J["Dugalal CMR bu ñuy wuutale (musul SMR) te doxal parity Rebuild"]
    D -->|"CRASHED / OFFLINE (disk yu bari dañu daanu)"| K["BULEEN tàmbali wala doxal fsck/btrfs --defar; dakkal kuuraŋ bi te etikete bépp dawal bay"]
    C --> L["Kloneel bépp disk bu yàqu ci disk bu wér jëfandikoo GNU ddrescue + fichier map"]
    K --> L
    L --> M["Dajalewaat disk yiñ klone ci anam Liñ-Rek jaaraleko ci Linux mdadm/LVM, dugal zpool -o Lire-Rekk=taal, wala UFS Explorer RAID"]

Xam li waral RAID tabaxaat yi duñu mëna: Fiir yi "Batch Drive Sibling" ak "SMR Drive"

Ngir jël yenn dogal yu wóor ci jamonoy jafe-jafe NAS, fàww nga xam ñaari fiir yiy ray RAID yi ci jamonoy recuperation:

Fiir 1: Njuumteg njuumte yuñ mënatul saafara (URE)

Boroom NAS yu bari dañuy jënd ñeent wala juróomi disk yu dëgër yi ci benn bis ci benn jaaykat. Disk yooyu ñu ngi bawoo ci benn liiñ buñ defaree usine bi, ñuy bokk coppite yu nuróo ci losisel bi, ñuy wëréelu ci benn environmaa bi chassis bi di yëngu, ba noppi ñuy dajale benn limu waxtu yi ñuy taal. * Su Drive 1 dee ginaaw 38,000 waxtuy liggéey, Drive 2, 3, ak 4 itam ñu ngi ci 38,000 waxtuy wear. * Soo dugal benn lecteur bu bees ci Bay 1 ba noppi nga bës Tabaxaat ci benn rang RAID 5, njiitu NAS bi dafa wara jàng secteur bu nekk ci lecteur 2, 3, ak 4 ngir XOR-xayma bloc parity yi ñàkk ci Bay 1. * Sudee Drive 3 dafa nekkoon ci noppalu 14 secteur yu baaxul yuñu mënul jàng (** Secteurs yu ñuy xaarandi, SMART ID 197 ) ci benn dossier bu yàgg boo ubbeeku ci ñaari at, tabaxaat bi dina slam bopp-first ci secteur yu baaxul yooyu ci waxtu 19. SCT Recovery Error Control (TLER), benn stall buy jàng ay segond yu bari moo waral njiit li ** màrk Drive 3 ni "Failed/Faulted," daal di daaneel ñaareelu disk ci benn RAID 5 array bu am benn parité ba noppi di tas volume bi yépp.

Fiir 2: Bul musa dugal benn SMR (Enregistrement Magnétique Shingled) Drive ci benn RAID wala ZFS Array

Sooy jënd benn disk bu ñuy wecci ci jamonoy jafe-jafe ci benn butig elektronik ngir tabaxaat sa NAS, xool bu baax ndax disk bi ngay wecci dafay jëfandikoo CMR (Enregistrement Magnétique Conventionnel), BU MUSAA SMR (Enregistrement Magnetique Shingled). * Disk yu dëgër yi yomb (lu melni Western Digital Red Red amul Plus EFAX model yu tàmbalee ci 2 TB ba 6 TB, Seagate Barracuda Compute disk ordinatër, ak disk USB yu bari yu yomb yu jëfandikukat yi "di génne" ci boyet plastik) jëfandikoo Drive-Managed SMR, fu raay magnetik yi di jaxasoo ni bardeaux kaw. * Ci diiru bind RAID wala ZFS bu bari terabyte, cache media bi ci biir benn SMR dafay fees ci diir bu weesuwul 30 simili. Bu cache bi feesee, SMR drive bi dafay taxaw 10 ba 30+ secondes bi muy jàng ak binndaat bande shingled yépp, wala mu delloo ATA IDNF (Sector ID Not Found) waxtu jeex. * Linux mdadm, DSM, ak rawatina ZFS (zed) tekki 20-second SMR stalls ni disk bu dëgër bu dee, kicking disk bu bees bi ñuy wecci ci array bi ci diggu tabaxaat bi. Deel faral di jënd ay disk CMR NAS/Enterprise (lu melni WD Red Pro**, Seagate IronWolf/IronWolf Pro/Exos, wala Toshiba N300/MG Enterprise).


Matrix diagnostic: niveau RAID, muñ njuumte, ak sàrti mucc

RAID / architektu piscine Dawal yu gëna ndaw Drive yu bari yu ñàkk benn yoon balaa ñuy ñàkk ay done Lan mooy xew sudee dawalkat yu bari dañu bàyyi? Pexem indiwaat ci jafe-jafe yu wóor
RAID 0 (Rayé) / JBOD Yaatu 2 0 dawal (Toleransu benn njuumte) Bu ñu ñàkkee 1 benn drive dafay yàq sistemu fichier bi ci rang bi yépp ndax 64 KB ba 128 KB ci fichier bu mag bu nekk dañuy stripe ci disk yépp. **Ci saasi ddrescue ** Soo mënee defaraat 99.5% ci sectëri disk yiy dee ci benn klon ak GNU ddrescue, mën nga boolewaat stripe RAID 0 ba noppi denc daanaka 100% ci say fichier.
Raid 1 / Raid 10 (Seetu) 2 (1) / 4 (10) 1 dawal ci seetu bu nekk Bépp disk ci biir seetu dafay denc benn kopi bu mat te nekk boppam ci sistemu fichier bi. Recuperation DIY bi gëna yomba: Doonte NAS bi daa dee lëmm, bépp disk bu wér bu bawoo ci seetu RAID 1 mën nañu ko boole ci PC Linux ba noppi monte ko ci disk bu baax.
Raid 5/Synology SHR-1/ZFS Raidz1 3 1 dawal Sudee 2e drive dafa daanu (wala mu dal ci secteur yu baaxul yi ci tabaxaat bi), rang bi dafay dugg ci Crashed / Offline. 1st Drive Failed: Backup fichier yu am solo yi jaaraleko ci USB * njëkk *, xool S.M.A.R.T. ci disk yi des, ba noppi tabaxaat ak CMR drive.
2e Drive bi dafa wàcci: BULEEN tàmbali. Klone disk yépp ak ddrescue, nga forse montage biy jàng rek jëfandikoo lecteur bi gëna néew (mdadm --assemble --run --readonly wala Exploratëru UFS).
Raid 6/Synology SHR-2/ZFS RaidZ2 4 2 dawal ñaari parite yuñ séddale (P + Q Reed-Solomon syndrome) mën na mucc ci bépp 2 njuumte ci dawal bi benn yoon. Dafay tas rek sudee 3rd drive dafa daanu. Resilience bu kawe: doonte 1 drive dee na, array baa ngi am 1 niveau de protection parité bu des ngir mëna jëflante ak secteur yu baaxul yi ci diiru tabaxaat. Ba leegi xoolal S.M.A.R.T. wérgi-yaram balaa ñuy tabaxaat.
Unraid (Drive parité buñ jagleel + XFS/Btrfs yu moom seen bopp) 2+ 1 dawal (benn parite) wala 2 dawal (ñaari parite) Njariñ bu amul fenn ci RAID bu am rayoŋ: Bépp lecteur de donnée ci benn rang Unraid sistem fichier XFS wala Btrfs bu moom boppam, bu nekk ci boppam. Doonte danga ñàkk ñatti disk ci 1-parity Unraid array, fichier yiñ denc ci disk yu dee yooyu kese ngay ñàkk; disk yu wér yi ci des mën nañu leen monte ak lire benn-benn. Klone disk done yi jaarul yoon ak ddrescue, wala nga monte bépp disk Unraid bu wér bu mucc benn-benn ci bépp sistem Linux ngir jàng 100% ci ay fichier ci saasi.

Triage jéego par jéego ngir Pool NAS bu "Degraded" (1 drive bi defa lajj, done yi mën nañu leen jëfandikoo)

Sudee sa NAS dafay sone ndax 1 lecteur ci RAID 1, RAID 5, SHR-1, RAID 6, wala pool RAIDZ dafa lajj, toppal lii laata ngay wecci disk bi:

Jéego 1: Xool S.M.A.R.T. màndarga yi ci disk SURVIVING yi njëkk

Ubbi klzzwxh:0039 saa yu RAItabaxaat di jéema leen jàng. * ID 198 (Offline_Uncorrectable): Dafa wara nekk 0.

Regle bu jël dogal: * Sudee disk yi des yépp dañu wane 0 ci ID 5, 187, 197, ak 198, mën nga backup say dossier yu am solo ci benn lecteur USB bu biti, ba noppi nga dem ak GUI NAS bu baax Defar / Tabaxaat jëfandikoo lecteur CMR bu sell. * Sudee bépp disk bu mucc ci benn piscine RAID 5 / SHR-1 / RAIDZ1 dafay wane Current_Pending_Sector > 0 wala di yokk Reallocated_Sector_Ct, BULEEN DOXAL TAXAAWAAT. Kopie bépp done ci NAS bi yàqu ci disk USB yi ci saasi balaa volume bi di monte; sudee volume bi defa am jafe-jafe, dindil NAS bi te nga klone disk yi ci PC Linux biy jëfandikoo GNU ddrescue njëkk.


Jéego ci jéego ngir mucc su amee RAID / NAS Volume "Crashes" (disk yu bari dañu daanu)

Sudee danga yewwu te sa 4-bay RAID 5 NAS ne "Storage Pool 1: Dafa daanu" ndax Drive 2 dafa lajj ci Talaata guddi, Drive 4 daanu ci Alarba ci suba, looy def?

Li waral "2-drive failures" yu bari mën nañu leen indiwaat: Xana muy bëréet daanu ci sa kër wala NAS bi daanu ci eskalier, ñaari disk yu dëgër mekanik daanaka duñu musa am aksidaa bopp bu metti ci benn simili. Lu moy loolu, li xewoon dafa toppalante: 1. Drive 2 defar na ay secteur yu baaxul, ñu dàq ko ci rang bi ay fan wala ay waxtu ci ginaaw (mu bàyyi rang bi di dox ci mode Degradé ci Drive 1, 3, ak 4). 2. Ginaaw loolu, Drive 4 daje na ak benn secteur buñu mënul jàng (wala ab timeout SATA bu gàtt) bi NAS di doxal ab scrub ci ginaaw. Ndax array bi amatul redondance ngir defar benn secteur bu baaxul ci Drive 4, dawalkat RAID bi dafa dàq Drive 4 bi itam, daal di màrke piscine bi yépp Crashed.

Ci senaario bii, Drive 4 moo am kontëru xew-xewu raid bi gëna bees daal di nekk ci simili yi (Events count) te 99.9999% wér na, fekk Drive 2 daa màgget tuuti ("dafa màgget").

Ni ñuy defaraat ab Synology bu tass, QNAP, wala Linux mdadm rang bu wóor ci kaw PC Linux

Danger

Regle wurus bu mat sëkk ci defaraat RAID ci disk yu bari: Bul musa daw mdadm --assemble --force directement ci sa disk dur NAS physique te doo njëkka klone disk yu yàqu yi (wala nga jëfandikoo ab overlay copy-on-write). Kañ --force binndaat kontëru xew-xew yu superblock ak monte sistem fichier journal, benn njuumte mën na yàq parity ci disk yépp.

Jéego 1: Dakkal NAS bi, nga def etiketu bepp bay disk, nga boole disk yi ci ordinatëru biro buy daw Ubuntu Linux Live USB

  1. Tëjal NAS bi. Etiketu disk bu nekk (Bay 1, Bay 2, Bay 3, Bay 4).
  2. Keppal disk yi ci portu SATA yi ci plaque madre bi (wala kàrt HBA bu melni LSI 9211-8i/9300-8i ci Mode IT; moytu hub USB yu yomb yiy dakkal suñu sarsee) ci ordinatëru biro buñ def ci Ubuntu Linux Live USB.
  3. Ubbi ab terminal nga xool xaaj bi mdadm superblocks ci anam wu ñuy jàngat rek:
# List all connected drives and partitions without mounting anything
lsblk -o NAME,SIZE,MODEL,SERIAL,FSTYPE

# Inspect the Linux Software RAID (mdadm) superblock metadata on the data partitions
# Note: On Synology DSM, Partition 1 is Root OS, Partition 2 is Swap, and Partition 3 (or 5) is your User Data array (e.g., /dev/sda3, /dev/sdb3, /dev/sdc3, /dev/sdd3)
sudo mdadm --examine /dev/sd[a-d]3

Jéego 2: Jàngaleel Events kontuwaar ak Array State génne ci mdadm --examine

Xoolal bu baax génnug sudo mdadm --examine /dev/sd[a-d]3 ngir dawal bu nekk: * Di nga gis liiñ yu melni: * /dev/sda3: Events : 48210, Array State : A.AA (A = Aktiif, . = Ñàkk) * /dev/sdb3 (Dawal 2, moo njëkka bàyyi): Events : 47950, Array State : AAAA * /dev/sdc3: Events : 48210, Array State : A.AA * /dev/sdd3 (Dawal 4, mujjee bàyyi): Events : 48209, Array State : A.AA * Xoolal li Events kontër bi daf lay wax: Drive 1, 3, ak 4 (sda3, sdc3, sdd3) ñu ngi ci diggante 1 xew-xew seen biir (48210 vs 48209), ci Dawal 2 (sdb3) daanu bu njëkk ci xew-xew bi 47950. * Regle bu am solo: Ci 4-drive RAID 5, li ngay soxla du lenn ludul 3 drive ngir defaraat 100 pursaa ci done yi. Danga wara boole rang bi ci 3 disk yu bees yi (sda3, sdc3, ak sdd3) ak ** bàyyi disk bu yàgg bi (sdb3)**. Soo jëfandikoo disk bu yàgg bi nga forse-assemblé ci lu jaarul yoon (sdb3), metadata system fichier yi am ñaari fan ci ginaaw duñu méngoo ak stripe done yi fi nekk ci yeneen disk yi, ba noppi yàq say dosiye.

Step 3: Clone any drive with bad sectors using GNU ddrescue njëkk

Before assembling, clone the recently dropped drive (/dev/sdd) (and ideally all member drives) to a healthy replacement drive using ddrescue (see Disque dur bi dafa yàqu ak defaraat done yi for full ddrescue syntax):

# Clone the dropped drive (/dev/sdd) to a healthy new spare drive (/dev/sde) with a mapfile
sudo ddrescue -f -n /dev/sdd /dev/sde /root/drive4_clone.map
sudo ddrescue -d -f -r3 /dev/sdd /dev/sde /root/drive4_clone.map

Now unplug the original failing /dev/sdd and put it safely on a shelf so you work with the healthy clone (/dev/sde).

Step 4: Reassemble the RAID array, LVM volume group, and file system in strict READ-ONLY mode

On Synology (SHR / RAID) and QNAP systems, the storage stack has up to three layers: mdadm (RAID) -> LVM2 (Logical Volume Manager) -> ext4 wala Btrfs (File System). Here is the exact command sequence to mount them safely in read-only mode on Ubuntu:

# Install mdadm, lvm2, and btrfs-progs inside the Ubuntu Live environment
sudo apt update && sudo apt install -y mdadm lvm2 btrfs-progs

# Stop any partial auto-assembled md arrays first
sudo mdadm --stop --scan

# Assemble the 3 freshest RAID 5 partitions in READ-ONLY mode (using --force ONLY if the 3rd drive's event count is off by 1-2 events, on the cloned drive)
sudo mdadm --assemble --readonly --run /dev/md127 /dev/sda3 /dev/sdc3 /dev/sde3

# Check that /dev/md127 is now active (even in degraded [UU_U] read-only state)
cat /proc/mdstat

# Activate the LVM Volume Group in read-only mode
sudo vgchange -ay --readonly

# List the discovered Logical Volumes (look for /dev/vg1000/lv or /dev/vg1/volume_1)
sudo lvs

# Create a mount point and mount the Logical Volume strictly READ-ONLY (-o ro,noload for ext4 or -o ro,norecovery for Btrfs)
sudo mkdir -p /mnt/nas_rescue

# For ext4 volumes:
sudo mount -o ro,noload /dev/vg1000/lv /mnt/nas_rescue

# OR for Btrfs volumes (such as Synology Btrfs pools):
sudo mount -o ro,norecovery /dev/vg1000/lv /mnt/nas_rescue

Once /mnt/nas_rescue mounts, all of your NAS shared folders (photo, homes, video, documents) will appear inside /mnt/nas_rescue/ so you can copy them straight onto an external USB backup drive.

  • What if your Synology NAS had "Synology Hybrid RAID (SHR)" with mixed drive sizes? Synology SHR simply splits larger drives into multiple partitions (sda5, sda6) and creates a separate mdadm array across each partition tier, then joins those md arrays together inside a single LVM Volume Group (vg1000). Running sudo mdadm --assemble --scan --readonly ak sudo vgchange -ay automatically stitches multi-tier SHR volumes back together on Ubuntu.
  • Commercial GUI Alternative (Windows/macOS/Linux): If you are uncomfortable with Linux terminal commands or have a complex QNAP thin-provisioned LVM pool, UFS Explorer RAID Recovery or ReclaiMe Free RAID Recovery can inspect all connected NAS drives on a Windows or Linux PC in 100% read-only software mode, automatically detect the stripe size, parity rotation, and LVM offsets, and copy your folders out without modifying a single sector on the NAS drives.

ZFS (zpool) and Btrfs emergency rescue commands

Modern NAS platforms (TrueNAS SCALE/CORE, Proxmox, Ubuntu Server, Unraid, and Synology Btrfs volumes) increasingly use copy-on-write (CoW) file systems instead of legacy ext4. If a ZFS zpool or Btrfs pool refuses to mount or causes a kernel panic on boot after a power outage or drive failure, normal mounting will fail because the OS tries to replay damaged write transactions. You must use read-only transaction rollback parameters.

1. ZFS (zpool) Emergency Recovery (TrueNAS / Proxmox / Linux ZFS)

If a ZFS pool states FAULTED, UNAVAIL, or crashes the server (kernel panic) the instant you try to import it after an unclean power loss:

# 1. Inspect all visible ZFS pools on the connected disks without importing them
sudo zpool import

# 2. ALWAYS attempt a Read-Only Import first (prevents ZFS from writing to disks or replaying the ZIL/SLOG)
sudo zpool import -f -o readonly=on -R /mnt/zfs_rescue <pool_name>

# 3. What if a normal import causes a kernel panic or says 'damaged pool metadata'?
# Use -F (Rollback/Recovery Mode) with -n (Dry Run ONLY) to see if ZFS can rewind the last few seconds of corrupted Transaction Groups (TXGs):
sudo zpool import -F -n <pool_name>

# 4. Combine Read-Only + Safe Transaction Group Rewind (-F -o readonly=on) so no disk sectors are altered while you copy your data off:
sudo zpool import -f -F -o readonly=on -R /mnt/zfs_rescue <pool_name>

# 5. For heavily damaged pools where Space Map allocation tables are corrupt, disable space map loading prior to read-only import:
echo 1 | sudo tee /sys/module/zfs/parameters/zfs_recover
sudo zpool import -f -F -o readonly=on -R /mnt/zfs_rescue <pool_name>

Once mounted under /mnt/zfs_rescue, copy your datasets off using rsync wala zfs send before ever attempting to import the pool read-write.

2. Btrfs Emergency Recovery (Synology Btrfs / Unraid Cache Pool / Linux Btrfs)

Warning

NEVER run btrfs check --repair unless you have already cloned the drives or exhausted every read-only mount option below. The official Btrfs kernel documentation explicitly warns that --repair can permanently destroy a corrupted extent tree.

Instead, try mounting or extracting the Btrfs volume in strict progressive order, from least invasive to deepest scan:

# Stage 1: Mount Read-Only without replaying the corrupted Journal Log Tree (fixes 80% of power-loss Btrfs mount failures)
sudo mount -t btrfs -o ro,norecovery /dev/sdX1 /mnt/btrfs_rescue
# (Note: on newer Linux kernels 5.11+, use: -o ro,rescue=nologreplay)

# Stage 2: Mount Read-Only using the backup Root Tree + ignoring bad checksums (for multi-drive or bit-rot corruption)
sudo mount -t btrfs -o ro,rescue=all /dev/sdX1 /mnt/btrfs_rescue
# (On older kernels: sudo mount -t btrfs -o ro,usebackuproot,nologreplay,degraded /dev/sdX1 /mnt/btrfs_rescue)

# Stage 3: If the volume still refuses to mount in the kernel, extract files directly in userspace without mounting using 'btrfs restore'
# First, list available backup tree roots:
sudo btrfs-find-root /dev/sdX1

# Then run 'btrfs restore' (strictly read-only userspace extractor) to dump all files to an external healthy drive:
sudo btrfs restore -v -i -m -S /dev/sdX1 /mnt/external_usb_backup/

Hardware RAID Controller Emergencies: "Foreign Configuration" and Dead RAID Cards

Enterprise servers (Dell PowerEdge with PERC cards, HPE ProLiant with Smart Array, Lenovo ThinkSystem, or workstations with Broadcom/LSI MegaRAID controllers) use hardware RAID cards with onboard NVRAM and battery/supercapacitor cache (BBU / CacheVault).

1. Import Foreign Configuration vs. Clear Configuration (CRITICAL)

When a drive momentarily disconnects or you move drives into a replacement server chassis, the Dell PERC or LSI MegaRAID BIOS boot screen will pause and announce: "Foreign configuration(s) found on adapter." * ALWAYS select Import Foreign Configuration (wala Preview Foreign Configuration -> Import). The "Foreign" tag simply means the RAID controller sees valid existing RAID metadata written on the hard drives themselves (the Disk Data Format / DDF or LSI configuration sectors at the end of the drives) that differs from the card's current NVRAM state. Importing reads the array layout straight off the drives and brings your virtual disk back online without losing a single byte. * NEVER select Clear Foreign Configuration wala Initialize Virtual Disk. Clearing or initializing wipes the array metadata or zeros the drives. * Exception Warning: If a single drive dropped out three weeks ago, you kept writing new data to the degraded array for three weeks, and then you plug that old 3-week-stale single drive back in, do NOT import the foreign configuration from that single stale drive over top of your healthy active drives; instead, replace or clone the stale drive.

2. What if the Hardware RAID Card Itself Dies?

If your server motherboard or PCIe hardware RAID controller card suffers an electronic failure and will not boot: * You do NOT need to buy the exact same revision of motherboard, and your data is still intact on the drives. * Purchase a replacement RAID controller from the same controller chipset family (for example, any LSI/Broadcom MegaRAID SAS 2108/2208/3108 or Dell PERC H710/H730/H740 card can read DDF metadata from an older PERC card). * Install the replacement RAID card into a working PC, connect your labeled drives in their original bay order, boot into the controller BIOS (Ctrl+R wala Ctrl+H or UEFI HII menu), and select Import Foreign Configuration. The controller will read the RAID layout off the drives and mount your volume immediately.


Laaj yi ñuy faral di laaj

My Synology or QNAP NAS itself won't turn on anymore (dead power supply or motherboard), how do I get my files off the hard drives?

If the NAS box dies electronically, your hard drives and data are almost certainly 100 percent intact. You have two safe options: **(1) Disk Migration to a New NAS:** You can unplug the numbered drives from your dead Synology (or QNAP) and slide them in the exact same bay order into a brand-new Synology (or QNAP) enclosure; when booted, the NAS detects a "Migratable NAS OS" and imports your storage pool with all files intact in 10 minutes. **(2) Mount on a Desktop PC:** Because Synology and QNAP use standard Linux `mdadm` ak `LVM2` under the hood, you can plug all the drives into a desktop PC booted from a free Ubuntu Linux Live USB stick, run `sudo mdadm --assemble --scan --readonly && sudo vgchange -ay`, and copy all your folders straight to an external USB drive without buying a new NAS.

Why is RAID 5 no longer recommended for large 12 TB to 24 TB hard drives?

In a RAID 5 (or SHR-1 / RAIDZ1) array built with massive 16 TB or 20 TB drives, rebuilding a single failed drive requires reading every single bit across 48 to 100+ terabytes of remaining platters over a 2-to-4-day window. Consumer and NAS hard drives typically have a manufacturer-rated non-recoverable read error rate of 1 error per $10^{14}$ bits read (roughly 12.5 terabytes). That means statistically, while reading 60 TB of aging sibling drives during a RAID 5 rebuild, there is a high probability of hitting at least one unreadable sector or triggering a second drive failure, which kills a single-parity RAID 5 array. For drives 10 TB and larger, always use dual-parity (**RAID 6, Synology SHR-2, or ZFS RAIDZ2**) or mirrored vdevs (**RAID 10**), coupled with an independent 3-2-1 external backup.

Can I swap a failed 4 TB drive in my RAID array with a larger 8 TB drive during an emergency rebuild?

Yes. Every hardware and software RAID controller, as well as Synology SHR, QNAP, and ZFS, allows you to replace a failed drive with a drive of **equal or larger capacity** (never smaller, not even by a single megabyte). In a standard RAID 5/6 or ZFS vdev, the array will immediately use the first 4 TB of the new 8 TB drive to complete the rebuild (and in Synology SHR, can often expand the usable pool capacity automatically if at least two drives are upgraded). Just make sure the new larger drive uses **CMR (Conventional Magnetic Recording)** technology, not SMR.

What should I do if a power outage happened right in the middle of a RAID rebuild or capacity expansion?

First, do NOT panic and do not force-restart or re-initialize the pool if it comes back up degraded. Modern Linux `mdadm` (used by Synology, QNAP, and Unraid) and ZFS record a **write-intent bitmap** and rebuild checkpoint checkpointing the exact sector where the rebuild or reshape was interrupted. When clean power is restored (ideally plugged into an Uninterruptible Power Supply / UPS so a second flicker cannot hit), boot the NAS normally and wait 10 minutes: in most cases, `mdadm` wala `zpool resilver` automatically resumes from the last checkpoint. If the reshape stalls or the volume reports crashed, shut down immediately, clone all drives with `ddrescue`, and use UFS Explorer RAID Recovery to assemble the split checkpoint zone.


Gid yu jëm ci loolu


Saytu nañu ay balluwaay

  • Linux Kernel Organization (International): Linux RAID (mdadm) Wiki (raid.wiki.kernel.org), Recovering a Failed Software RAID, and Btrfs Kernel Documentation (btrfs.readthedocs.io ci btrfs rescue ak btrfs restore).
  • OpenZFS Documentation Project (International): zpool import Read-Only and Transaction Group Rollback (-F -o readonly=on) Administration Reference.
  • Synology Inc. (Taiwan/International): Official Synology Knowledge Base Article KB-1079 (How can I use a PC to recover data when my Synology NAS malfunctions using Ubuntu mdadm ak lvm2).
  • Projet GNU / Fondation logiciel gratuit (international): GNU ddrescue Téere biy jàngale nataalu niveau bloc budul yàq ci disk yi RAID yi yàqu.
  • Institut national buy saytu ni ñuy doxalee ak xarala yu bees yi (NIST) (Etats Unis): Publikasioŋ buñ jagleel 800-86 ak Njàngale mu wóor ci dencukaay ci RAID Tabaxaat Exposition Windows ak Njuumte yiñ mëna Saaf ci Liir (URE).