RAID Array Di nkogu, NAS Storage Pool a Asɛe, ne Ahobammɔ a Ɛsan Si¶
When a home or small-business Network Attached Storage (NAS) appliance (such as a Synology DiskStation, QNAP Turbo NAS, TrueNAS, or Unraid server) starts beeping with an amber LED and reports "Storage Pool Degraded" or "Volume Crashed," the owner's very next click usually determines whether 20 terabytes of irreplaceable family photos and business records are saved or permanently destroyed. For decades, users have been taught that when a drive in a RAID 5 or RAID 1 array turns red, you simply pull the dead drive out, slide a brand-new blank drive in, and click "Repair / Rebuild."
In modern high-capacity storage pools built with 8 TB to 24 TB drives purchased from the same manufacturing batch, blindly starting an in-place RAID rebuild is the #1 cause of total, unrecoverable multi-drive array death. Rebuilding a 4-drive 16 TB RAID 5 array forces every remaining aging drive to read 100 percent of its sectors non-stop for 24 to 72 hours at maximum thermal and mechanical load. When one of the surviving sibling drives hits an uncorrectable read error (URE) or suffers head degradation halfway through the rebuild, the RAID controller kicks that second drive out of the pool and crashes the entire array. Surviving a RAID, ZFS, or Btrfs emergency requires pausing all writes immediately, auditing S.M.A.R.T. telemetry across all surviving drives, backing up critical folders before touching the array topology, and imaging degraded member disks with GNU ddrescue before ever attempting a parity rebuild or read-only metadata assembly.
--- .
Yɛ eyi mprempren¶
- NEVER pull out multiple drives to "reseat" them while the NAS or server is powered on, and NEVER swap drives around without labeling their exact slot numbers. Before touching a single drive tray, take a sharpie or label maker and mark the physical top of every drive with its exact bay number (
Bay 1 / sda, .Bay 2 / sdb, .Bay 3 / sdc). Although modern Linuxmdadm, LVM, and ZFS arrays store UUID superblocks on each disk, hardware RAID controllers (Dell PERC, HP Smart Array, Broadcom/LSI MegaRAID) often bind configuration metadata to physical SAS/SATA backplane slot numbers. - Do NOT immediately click "Repair" or "Rebuild" on a degraded RAID 5 / SHR-1 array if you do not have an up-to-date external backup. While a single-parity array (RAID 5, Synology SHR-1, or ZFS RAIDZ1) is in Degraded Mode (1 drive dead, remaining drives online), all of your files are still 100 percent readable right now. Plug an external USB 3.0 hard drive directly into the NAS and copy your most critical, irreplaceable folders off the degraded pool before you subject the surviving drives to the brutal 48-hour stress test of a parity rebuild.
- NEVER click "Initialize Disk," "Create New Pool," "Clear Configuration," or run
fsck -y/ .btrfs check --repairon a crashed array. When two drives drop out of a RAID 5 array simultaneously (often due to a brief power-supply dip or SATA timeout rather than true physical death), the NAS GUI will mark the Storage Pool as "Crashed" and offer to initialize or recreate the volume. Initializing writes fresh superblocks and zeros across the parity stripes, destroying recoverable data. Similarly, runningbtrfs check --repairon a corrupted Btrfs volume is notorious in the Linux kernel community for destroying the extent tree beyond recovery. - Gyae Docker containers, Virtual Machines, Plex media servers, surveillance camera recordings, ne scheduled RAID Scrubs nyinaa ntɛm ara. Write operation biara a ɛkɔ degraded array no ma asiane a ɛwɔ parity write-hole anaasɛ wobɛpia marginal second drive akɔ anoano no yɛ kɛse. Kɔ NAS wɛb interface anaa SSH terminal no mu na gyae akyi dwumadie ne high-I/O nnwuma nyinaa.
- If any drive in the NAS is making rhythmic clicking, knocking, grinding, or screeching sounds, shut down the NAS cleanly right now. A clicking or grinding drive has suffered a physical read/write head crash (see Hard drive a entumi nyɛ adwuma yiye ne data a wɔsan nya). Leaving it spinning inside the NAS enclosure will score the magnetic platters into dust within minutes.
- Check whether the "NAS failure" is actually just a dead NAS motherboard or external power brick. If your Synology, QNAP, or Asustor NAS suddenly will not power on at all, or blinks its blue power LED endlessly (such as the famous Intel Atom C2000 clock-signal bug), your hard drives and data are almost certainly 100 percent fine. You can migrate those drives into a replacement NAS or mount them read-only on any Ubuntu Linux desktop PC using standard SATA ports.
flowchart TD
A["NAS beeping / RAID array reports Degraded or Crashed status"] --> B{"Are any drives making mechanical clicking, grinding, or scraping noises?"}
B -->|"Yes: Physical head crash"| C["Power down NAS immediately, label each drive with its Bay Number, and remove the clicking drive"]
B -->|"No: Silent operation"| D{"What is the Storage Pool status?"}
D -->|"DEGRADED (1 drive failed, volume still readable)"| E["STOP all Docker/VM/Surveillance writes and DO NOT click Rebuild yet"]
E --> F["Check S.M.A.R.T. Attributes (ID 5, 187, 197, 198) on all SURVIVING drives"]
F --> G["Plug in external USB drive and copy critical files off the degraded pool FIRST"]
G --> H{"Do any surviving drives show bad sectors (ID 5 / 197 > 0)?"}
H -->|"Yes: Second drive is failing"| I["Power down and clone every drive with GNU ddrescue before attempting any rebuild"]
H -->|"No: Surviving drives 100% healthy"| J["Insert replacement CMR drive (never SMR) and run parity Rebuild"]
D -->|"CRASHED / OFFLINE (Multiple drives dropped out)"| K["Do NOT Initialize or run fsck/btrfs --repair; power down and label all drive bays"]
C --> L["Clone all degraded member drives to healthy drives using GNU ddrescue + mapfiles"]
K --> L
L --> M["Reassemble cloned drives in Read-Only mode via Linux mdadm/LVM, zpool import -o readonly=on, or UFS Explorer RAID"]
--- .
Understanding why RAID rebuilds fail: The "Sibling Drive Batch" and "SMR Drive" traps¶
To make safe decisions during a NAS emergency, you must understand the two physical traps that kill RAID arrays during recovery:
Trap 1: Correlated Batch Failure and Uncorrectable Read Errors (URE)¶
Most NAS owners buy all four or six hard drives on the same day from the same retailer. Those drives come off the same factory assembly line, share identical firmware revisions, spin in the exact same chassis vibration environment, and accumulate the exact same number of power-on hours. * When Drive 1 dies after 38,000 hours of operation, Drives 2, 3, and 4 are also at 38,000 hours of wear. * If you pop a fresh replacement drive into Bay 1 and click Rebuild on a RAID 5 array, the NAS controller must read every single sector across Drives 2, 3, and 4 to XOR-calculate the missing parity blocks for Bay 1. * If Drive 3 has been quietly harboring 14 unreadable bad sectors (Current Pending Sectors, S.M.A.R.T. ID 197) in an old folder you have not opened in two years, the rebuild process will slam head-first into those bad sectors at Hour 19. On many hardware RAID cards and older NAS kernels without SCT Error Recovery Control (TLER), a single multi-second read stall causes the controller to mark Drive 3 as "Failed/Faulted," dropping a second drive out of a single-parity RAID 5 array and crashing the entire volume.
Trap 2: Never Insert an SMR (Shingled Magnetic Recording) Drive into a RAID or ZFS Array¶
When buying an emergency replacement hard drive at a local electronics store to rebuild your NAS, verify that the replacement drive uses CMR (Conventional Magnetic Recording), NEVER SMR (Shingled Magnetic Recording).
* Budget desktop hard drives (such as standard Western Digital Red non-Plus EFAX models from 2 TB to 6 TB, Seagate Barracuda Compute desktop drives, and many cheap external USB drives that users "shuck" out of plastic cases) use Drive-Managed SMR, where magnetic tracks overlap like roof shingles.
* During a sustained multi-terabyte RAID or ZFS resilver write, an SMR drive's internal media cache fills up completely within 30 minutes. Once the cache is full, the SMR drive stalls for 10 to 30+ seconds while internally reading and rewriting entire shingled bands, or returns an ATA IDNF (Sector ID Not Found) timeout.
* Linux mdadm, Synology DSM, and especially ZFS (zed) interpret those 20-second SMR stalls as a dead hard drive, kicking the brand-new replacement drive right back out of the array in the middle of the rebuild. Always buy CMR NAS/Enterprise drives (such as WD Red Plus / WD Red Pro, Seagate IronWolf / IronWolf Pro / Exos, or Toshiba N300 / MG Enterprise).
--- .
Diagnostic matrix: RAID levels, fault tolerance, and survival rules¶
| RAID / Pool Architecture | Minimum Drives | Maximum Simultaneous Failed Drives Before Data Loss | What Happens When 1 Too Many Drives Drop Out? | Safe Emergency Recovery Strategy |
|---|---|---|---|---|
| RAID 0 (Striping) / JBOD Spanning | 2 | 0 drives (Zero fault tolerance) | Losing 1 single drive destroys the file system across the entire array because 64 KB to 128 KB chunks of every large file are striped across all disks. | Immediate ddrescue imaging of the failing drive. If you can recover 99.5% of the dying drive's sectors onto a clone with GNU ddrescue, you can reassemble the RAID 0 stripe and save almost 100% of your files. |
| RAID 1 / RAID 10 (Mirroring) | 2 (RAID 1) / 4 (RAID 10) | 1 drive per mirrored pair | Each drive in a mirror holds a complete, standalone copy of the file system. | Easiest DIY recovery: Sɛ mpo NAS no wu koraa a, wobetumi de drive biako biara a ɛwɔ apɔwmuden a efi RAID 1 ahwehwɛ mu ahyɛ Linux PC mu na wɔde ahyɛ so tẽẽ sɛ disk a ɛyɛ daa. |
| RAID 5 / Synology SHR-1 / ZFS RAIDZ1 Ɔde ne nsa kyerɛɛ ne so, na ɔde ne nsa kyerɛɛ ne so bio. | 3. 3. | 1 karka | Sɛ 2nd drive bi gyae (anaasɛ ɛbɔ sectors bɔne bere a wɔresan akyekye) a, array no hyɛn Crashed / Offline tebea mu. | 1st Drive Failed: Backup fael a ɛho hia denam USB so di kan, hwɛ S.M.A.R.T. wɔ drive ahorow a ɛda so te ase so, afei fa CMR drive san si. 2nd Drive Dropped Out: NNYƐ sɛ wobɛhyɛ aseɛ. Clone drives nyinaa ne ddrescue, afei hyɛ akenkan nkutoo nhyiam no denam drive a ɛnyɛ den koraa no so (mdadm --assemble --run --readonly anaa UFS Explorer). |
| RAID 6 / Synology SHR-2 / ZFS RAIDZ2 Ɔde ne nsa kyerɛɛ ne so, na ɔde ne nsa kyerɛɛ ne so bio. | 4 | 2 drives | Dual distributed parity (P + Q Reed-Solomon syndrome) survives any 2 full drive failures simultaneously. Crashes only if a 3rd drive drops out. |
High resilience: even if 1 drive is dead, the array still has 1 full level of parity protection left to handle bad sectors during a rebuild. Still verify S.M.A.R.T. health before rebuilding. |
| Unraid (Dedicated Parity Drive + Independent XFS/Btrfs Data Drives) | 2+ | 1 drive (Single Parity) or 2 drives (Dual Parity) | Unique advantage over striped RAID: Each data drive in an Unraid array is an independent, self-contained XFS or Btrfs file system. Even if you lose 3 drives in a 1-parity Unraid array, you only lose the files stored on those specific dead drives; all remaining healthy drives can still be mounted and read individually. | Clone the failed data drives with ddrescue, or mount every surviving healthy Unraid drive individually on any Linux system to read 100% of its files immediately. |
--- .
Step-by-step triage for a "Degraded" NAS Pool (1 drive failed, data still accessible)¶
If your NAS is beeping because 1 drive in a RAID 1, RAID 5, SHR-1, RAID 6, or RAIDZ pool has failed, follow this exact sequence before replacing the disk:
Step 1: Audit S.M.A.R.T. attributes on all SURVIVING drives first¶
Bue Akoraeɛ sohwɛfoɔ -> HDD/SSD -> Akwahosan ho nsɛm -> S.M.A.R.T. Attribute (wɔ Synology/QNAP so) anaa tu mmirika smartctl -a /dev/sdX via SSH wɔ akwahosan/online drive biara a ɛda so ara wɔ ɔtare no mu. Hwɛ ** .RAW_VALUE** kɔla ma saa su anan a ɛho hia yi:
* ID 5 (Reallocated_Sector_Ct): Ɛsɛ sɛ ɛyɛ nea eye sen biara 0. Sɛ drive a ɛda so ara wɔ hɔ no wɔ nnwuma du du anaa ɔhaha pii a wɔasan akyekyɛ a, ne prɛte no ani anaa ne ti no resɛe denneennen.
* ID 187 (Reported_Uncorrect): Ɛsɛ sɛ ɛyɛ 0.
* ID 197 (Current_Pending_Sector): CRITICAL. Dodow biara a ɛsõ sen 0 kyerɛ sɛ surviving drive mprempren ɛwɔ sectors a wontumi nkenkan a ɛretwɛn sɛ ɛbɛma crash bere a RAID rebuild bɔ mmɔden sɛ ɛbɛkenkan no.
* ID 198 (Offline_Uncorrectable): Ɛsɛ sɛ ɛyɛ 0.
Gyinaesi Mmara:
* Sɛ drive ahorow a ɛda so ara wɔ hɔ nyinaa kyerɛ sɛ ** .0** wɔ ID 5, 187, 197, ne 198 so no, wobɛtumi de wo folda a ɛho hia no ayɛ backup dwoodwoo akɔ abɔnten USB drive so na afei woatoa so de NAS GUI a ɛyɛ daa Repair / Rebuild denam CMR replacement drive a ɛyɛ apɔwmuden so.
* Sɛ biara draibɛ a ɛda so te ase wɔ parity biako RAID 5 / SHR-1 / RAIDZ1 pool mu kyerɛ ** .Current_Pending_Sector > 0** anaasɛ ɛkɔ soro Reallocated_Sector_Ct, MMONTUMI NKYERƐKYERƐ NSƐM A WƆDE SI HO NSƐM. Kɔpi data nyinaa fi NAS a asɛe no so kɔ abɔnten USB drive ahorow so ntɛm ara bere a nne no da so ara wɔ so no; sɛ volume no repere dedaw a, brɛ NAS no mu ahoɔden ase na clone member drives a ɛdi nkoguo no wɔ Linux PC so denam GNU so ddrescue deɛ ɛdi kan.
--- .
Anamɔn-anam-anam gye a wogye bere a RAID / NAS Volume "Crashes" (Draw pii agyae) .¶
Na sɛ wosɔre na wo 4-bay RAID 5 NAS ka sɛ "Storage Pool 1: Crashed" efisɛ Drive 2 dii nkogu wɔ Yawda anadwo na Drive 4 gyaee Dwoda anɔpa nso ɛ?
Nea enti a "2-drive huammɔdi" dodow no ara yɛ nea wotumi san nya ankasa: Gye sɛ anyinam bɔɔ wo fie anaasɛ wɔde NAS no gui wɔ antweri bi so, ɛkame ayɛ sɛ mfiri abien a wɔde yɛ hard drive ntumi nhu ti a ɛyɛ hu koraa da wɔ sekan koro no ara mu pɛpɛɛpɛ. Mmom no, nea esii ankasa no yɛ nea ɛtoatoa so: 1. Drive 2 yɛɛ sectors bɔne kakraa bi na wɔpam no fii array no mu nna anaa nnɔnhwerew a atwam (a ɛmaa array no yɛɛ adwuma wɔ Degraded mode mu wɔ Drives 1, 3, ne 4 so). 2. Akyiri yi, Drive 4 hyiaa sector biako a wontumi nkenkan (anaasɛ SATA bere tiaa bi a wɔde twaa mu) bere a na NAS no reyɛ akyi scrub. Esiane sɛ na array no nni redundancy bio sɛ ɛbɛsiesie saa bad sector biako pɛ wɔ Drive 4 so nti, RAID draiver no pam Drive 4 nso fii mu na ɔhyɛɛ pool no nyinaa agyirae sɛ Crashed.
Wɔ saa tebea yi mu no, Drive 4 wɔ raid event counter a ɛyɛ foforo sen biara, a ɛyɛ simma biara (Events count) na ɛyɛ 99.9999% apɔwmuden, bere a Drive 2 no ne bere atwam kakra ("stale").
Sɛnea wobɛsan anya Synology, QNAP, anaa Linux a asɛe mdadm array dwoodwoo wɔ Linux PC so¶
Danger
Absolute Sika Mmara a ɛfa Multi-Drive RAID Recovery ho: Ntu mmirika da mdadm --assemble --force tẽẽ wɔ wo mfitiaseɛ honam fam NAS hard drives no so a wo nni kan nnyɛ cloning drives a asɛe no (anaasɛ fa copy-on-write overlay nni dwuma). Berɛ bɛn --force san kyerɛw superblock event counters no na mounts journaled fael nhyehyɛe, mfomso biako betumi asɛe parity no wɔ disks nyinaa so.
Anamɔn 1: NAS no ahoɔden brɛ ase, label drive bay biara, na fa drive ahorow no bata desktop PC a ɛde Ubuntu Linux Live USB di dwuma no so¶
- To NAS no mu. Fa draibɛ biara din ( .
Bay 1, .Bay 2, .Bay 3, .Bay 4). - Fa drives no bata motherboard SATA ports (anaasɛ HBA card te sɛ LSI 9211-8i/9300-8i wɔ IT Mode mu; kwati USB hubs a ne bo nyɛ den a ɛtwa wɔ load ase) wɔ desktop PC a wɔahyɛ ase akɔ Ubuntu Linux Live USB mu.
- Bue terminal bi na hwɛ sɛnea mpaapaemu nhyehyɛe no na
mdadmsuperblocks katee wɔ akenkan nkutoo diagnostic mode mu:
# 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
Anamɔn 2: Kenkan asɛm no Events counter ne Array State nea efi mu ba mdadm --examine¶
Hwɛ nea efi mu ba no yiye sudo mdadm --examine /dev/sd[a-d]3 wɔ kar biara ho:
* You will see lines like:
* /dev/sda3: 1 . Events : 48210, . Array State : A.AA (A = Ɛyɛ nnam, . . = Missing)
* /dev/sdb3 (Drive 2, dropped out first): Events : 47950, . Array State : AAAA
* /dev/sdc3: 1 . Events : 48210, . Array State : A.AA
* /dev/sdd3 (Drive 4, dropped out last): Events : 48209, . Array State : A.AA
* Notice what the Events counter tells you: Drives 1, 3, and 4 (sda3, . sdc3, . sdd3) are within 1 event of each other (48210 vs 48209), while Drive 2 (sdb3) fell out much earlier at event 47950.
* Critical rule: In a 4-drive RAID 5 array, you only need 3 drives to reconstruct 100 percent of the data. You MUST assemble the array using the 3 freshest drives (sda3, . sdc3, na sdd3) and leave out the stale drive (sdb3). If you accidentally force-assemble using the old stale drive (sdb3), the filesystem metadata from two days ago will mismatch the current data stripes on the other drives and corrupt your folders.
Step 3: Clone any drive with bad sectors using GNU ddrescue first¶
Before assembling, clone the recently dropped drive (/dev/sdd) (and ideally all member drives) to a healthy replacement drive using ddrescue (see Hard drive a entumi nyɛ adwuma yiye ne data a wɔsan nya 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 anaasɛ 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 separatemdadmarray across each partition tier, then joins thosemdarrays together inside a single LVM Volume Group (vg1000). Runningsudo mdadm --assemble --scan --readonlynasudo vgchange -ayautomatically 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, anaasɛ ɛbɔ server no (kernel panic) ntɛm ara a wobɔ mmɔden sɛ wode bɛba bere a woahwere tumi a ɛho ntew akyi:
# 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 anaasɛ 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 Ntɛmntɛm: "Amannɔne Nsiesiei" ne RAID Kaad a Awu¶
Enterprise servers (Dell PowerEdge a ɛwɔ PERC cards, HPE ProLiant a ɛwɔ Smart Array, Lenovo ThinkSystem, anaa adwumayɛbea ahorow a ɛwɔ Broadcom/LSI MegaRAID controllers) de hardware RAID cards a ɛwɔ onboard NVRAM ne battery/supercapacitor cache (BBU / . CacheVault).
1. Amannɔne Nsiesiei a Wɔde Ba amannɔne vs. Nsiesiei a Ɛda Hɔ (CRITICAL) .¶
Sɛ draibɛ bi twa bere tiaa bi anaasɛ wode draibɛ ahorow kɔ server chassis a wɔde besi ananmu mu a, Dell PERC anaa LSI MegaRAID BIOS boot screen no bɛgyina kakra na abɔ amanneɛ sɛ: "Amannɔne nhyehyɛe(s) a wɔahu wɔ adapter so."
* BERE BIARA paw Import Foreign Configuration (anaasɛ Preview Foreign Configuration -> Import). "Amannɔne" tag no kyerɛ kɛkɛ sɛ RAID controller no hu RAID metadata a ɛwɔ hɔ dedaw a ɛfata a wɔakyerɛw wɔ hard drives no ankasa so (Disk Data Format / DDF anaa LSI nhyehyɛe sectors a ɛwɔ drive ahorow no awiei) a ɛsono no wɔ card no mprempren NVRAM tebea no ho. Importing kenkan array layout no tẽẽ fi drives no so na ɛde wo virtual disk no san ba intanɛt so a ɛnhwere byte biako mpo.
* MMApaw DA Clear Foreign Configuration anaasɛ Initialize Virtual Disk. Sɛ wopopa anaasɛ wohyɛ aseɛ a, ɛpopa array metadata no anaasɛ ɛma drives no yɛ zero.
* Exception Warning: Sɛ drive biako gyaee adapɛn abiɛsa a atwam ni a, wokɔɔ so kyerɛw data foforo kɔɔ degraded array no so adapɛn abiɛsa, na afei wode saa dedaw 3-week-stale single drive no san hyɛ mu, MMFA amannɔne nhyehyɛe no mfi saa stale drive biako no mu nkɔ wo healthy active drives no atifi; mmom no, sesa anaa yɛ clone drive a ayɛ dedaw no.
2. Na sɛ Hardware RAID Card no Ankasa Wu nso ɛ?¶
Sɛ wo server motherboard anaa PCIe hardware RAID controller card no nya ɛlɛtrɔnik huammɔdi na ɛrenbɔ a:
* 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 anaasɛ 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.
--- .
Nsɛm a wɔtaa bisa¶
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` na `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` anaasɛ `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.
--- .
Akwankyerɛ ahorow a ɛfa ho¶
- Hard drive a entumi nyɛ adwuma yiye ne data a wɔsan nya
- Fael a wɔpopa wɔ akwanhyia mu, formatted drive, ne mfonini a wɔsan nya
- Kɔmputa so backups: 3-2-1 nhyehyɛe ne atoyerɛnkyɛm bere mu ahotɔ
- Linux nhyehyɛe boot huammɔdi ne GRUB asiesie
- Ransomware and malware emergency response
- Wiase nyinaa dodow a egye ntɛmpɛ
--- .
Sources a wɔhwɛɛ mu¶
- Linux Kernel Organization (International): Linux RAID (
mdadm) Wiki (raid.wiki.kernel.org), Recovering a Failed Software RAID, and Btrfs Kernel Documentation (btrfs.readthedocs.iosobtrfs rescuenabtrfs restore). - OpenZFS Documentation Project (International):
zpool importRead-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 Ubuntumdadmnalvm2). - GNU Project / Free Software Foundation (International): GNU
ddrescueManual for Non-Destructive Block-Level Imaging of Degraded RAID Member Drives. - National Institute of Standards and Technology (NIST) (United States): Special Publication 800-86 and Storage Reliability Guidance on RAID Rebuild Exposure Windows and Uncorrectable Read Error (URE) Probabilities.