Ukungaphumeleli kwe-RAID ye-Array, i-Pool yokuGcina i-NAS eyonakeleyo, kunye nokuvuselela uKhuseleko¶
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.
Yenza oku ngoku¶
- 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. - Stop all Docker containers, Virtual Machines, Plex media servers, surveillance camera recordings, and scheduled RAID Scrubs immediately. Every write operation to a degraded array increases the risk of a parity write-hole or pushing a marginal second drive over the edge. Log into the NAS web interface or SSH terminal and stop all background services and high-I/O tasks.
- 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 Ukungaphumeleli kwe-hard drive kunye nokubuyisela idatha). 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. * Ukuba i-Drive 3 iye yagcina ngokuthula i-14 amacandelo amabi angafundekiyo (Amacandelo alindileyo akhoyo, i-S.M.A.R.T. ID 197) kwifolda endala ongayivulanga kwiminyaka emibini, inkqubo yokwakhiwa kwakhona iya kubethelela intloko-phambili kuloo macandelo amabi kwi-Hour 19. Kwii-hardware ezininzi ze-RACTLER ezilawula ii-KErnels ze-NASTLER kunye ne-hardware yokulawula ii-KErnels ze-NASD i-multi-second read stall ibangela ukuba umlawuli makishe i-Drive 3 njenge "Failed/Faulted," elahla i-scond drive ngaphandle kwe-RAID eyodwa ye-5 kunye nokubetha umthamo wonke.
Trap 2: Never Insert an SMR (Shingled Magnetic Recording) Drive into a RAID or ZFS Array¶
Xa uthenga i-hard drive endaweni kaxakeka kwivenkile ye-electronics yasekhaya ukuze uvuse kwakhona i-NAS yakho, ** qinisekisa ukuba i-splacement drive isebenzisa i-CMR (i-Conventional Magnetic Recording), UNGAZE 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 sustainemulti-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** ile internally reading and rewriting entire shingled bands, or returns an ATA IDNF (Sector ID Not Found) timeout.
Linux mdadm, Synology DSM, and especially **ZFS (klzzwxh:15) interpret those 20-seconSMR stalls as a dead hard drive, kickg the brand-new replacement drive right back out of the array inhe 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. | Eyona nto ilula ukubuyiswa kwe-DIY: Nokuba i-NAS ife ngokupheleleyo, nayiphi na enye idrayivu esempilweni evela kwisibuko se-RAID 1 inokufakwa kwi-Linux PC kwaye ifakwe ngqo njengediski eqhelekileyo. |
| RAID 5 / Synology SHR-1 / ZFS RAIDZ1 | 3 | 1 qhuba | Ukuba i- 2nd drive iyehla (okanye ibethe amacandelo amabi ngexesha lokwakha kwakhona), uluhlu lungena kwi-**Ingqubano / i-Offline ** imeko. | I-1st Drive Ayiphumelelanga: Gcina iifayile ezibalulekileyo nge-USB kuqala, khangela i-S.M.A.R.T. kwiidrive ezisindileyo, emva koko uphinde wakhe nge-CMR drive. I-2nd Drive iyekile: Sukuqalisa. Vala zonke iidrives nge ddrescue, emva koko nyanzela udibaniso lokufunda-kuphela usebenzisa eyona idala idrive (mdadm --assemble --run --readonly okanye UFS Explorer). |
| I-RAID 6 / Synology SHR-2 / ZFS RAIDZ2 | 4 | 2 ukuqhuba | Ulungelelwaniso oluphindwe kabini (P + Q I-Reed-Solomon syndrome) iphila nakuphi na ** 2 ukusilela okupheleleyo kwe-drive ** ngaxeshanye. Iingozi kuphela ukuba 3rd drive iyehla. |
Ukuqina okuphezulu: nokuba i-1 drive ifile, uluhlu lusenezinga eli-1 elipheleleyo lokukhuselwa kwe-parity eshiywe ukuphatha amacandelo amabi ngexesha lokwakhiwa kwakhona. Sisaqinisekisa i-S.M.A.R.T. impilo phambi kokwakha kwakhona. |
| Ukungahlanjwanga (I-Dedicated Parity Drive + Independent XFS/Btrfs Data Drives) | 2+ | I-1 drive (I-Single Parity) okanye 2 iidrive (I-Dual Parity) | Inzuzo eyodwa ngaphezulu kweRAID enemigca: Idatha nganye yedrayivu kuluhlu lwe-Unraid yiezimeleyo, ezimele i-XFS okanye inkqubo yefayile ye-Btrfs. Nokuba ulahlekelwe ziidrive ezi-3 kuluhlu olu-1 lwe-Unraid, ulahlekelwa kuphela ziifayile ezigcinwe kwezo zixhobo zifileyo; zonke iidrive eziseleyo ezisempilweni zisenokufakwa kwaye zifundwe zodwa. | Clone data engaphumelelanga nge drives ddrescue, okanye unyuse yonke i-Unraid drive ephilayo ephilayo ngabanye kuyo nayiphi na inkqubo yeLinux ukufunda i-100% yeefayile zayo ngoko nangoko. |
Inyathelo ngenyathelo lenyathelo le-"Degraded" yeNAS Pool (i-1 drive ayiphumelelanga, idatha isafikeleleka)¶
Ukuba iNAS yakho iyakhala kuba 1 drive kwiRAID 1, RAID 5, SHR-1, RAID 6, okanye RAIDZ pool ayiphumelelanga, landela olu landelelwano ngqo phambi kokubuyisela idiski:
Inyathelo 1: Uphicotho S.M.A.R.T. iimpawu kuzo zonke i-SURVIVING drives kuqala¶
Vula Umphathi woGcino -> HDD/SSD -> Ulwazi lweMpilo -> S.M.A.R.T. Uphawu (kwi-Synology/QNAP) okanye qhuba smartctl -a /dev/sdX nge-SSH kuyo yonke esempilweni/kwi-intanethi ukuqhuba kushiyeke echibini. Jonga kwi RAW_VALUE ikholamu yezi mpawu zine zibalulekileyo:
* ID 5 (Reallocated_Sector_Ct): Kufuneka kube njalo 0. Ukuba i-drive ephilayo inamaninzi okanye amakhulu amacandelo anikezelwe ngokutsha, umphezulu wepleyiti okanye iintloko zayo ziyathotywa.
* ID 187 (Reported_Uncorrect): Kufuneka kube njalo 0.
* ID 197 (Current_Pending_Sector): OKUBALULEKILEYO. Naliphi na inani elikhulu kuno 0 kuthetha ukuba ukuqhubela phambili okusindileyo okwangoku kunamacandelo angafundekiyo alindele ukubangela ingozi mzuzu xa i-RAID iphinda izama ukuyifunda.
* ID 198 (Offline_Uncorrectable): Kufuneka kube njalo 0.
Umgaqo wesigqibo:
* Ukuba zonke iidrive ezisindileyo zibonisa 0 kwii-ID ze-5, i-187, i-197, kunye ne-198, unokugcina ngokukhuselekileyo iifolda zakho ezibalulekileyo kwi-USB drive yangaphandle kwaye uqhubeke ne-NAS GUI eqhelekileyo ** Ukulungisa / Ukwakha kwakhona ** usebenzisa i-CMR yokubuyisela i-drive enempilo.
* Ukuba nayiphi na ephilayo idrayivu kwindawo enye RAID 5 / SHR-1 / RAIDZ1 pool ibonisa Current_Pending_Sector > 0 okanye ukunyuka Reallocated_Sector_Ct, UNGABALISI UKWAKHA KWAKHONA. Khuphela yonke idatha kwi-NAS ethotyiweyo kwiidrive ze-USB zangaphandle ngokukhawuleza ngelixa ivolumu isanyuswa; ukuba umthamo sele utsala nzima, yenza amandla ezantsi iNAS kwaye ulinganise amalungu angaphumeleliyo aqhuba kwiLinux PC usebenzisa iGNU. ddrescue kuqala.
Inyathelo ngenyathelo lokuhlangula xa iRAID / NAS Volume "Ikophuka" (Iidrive ezininzi ziphumile)¶
Kuthekani ukuba uvuka kwaye i-4-bay RAID 5 NAS yakho ithi "I-Pool yokuGcina 1: Intlithekile" kuba I-Drive 2 ayiphumelelanga ngobusuku bangoLwesibini kwaye i-Drive 4 iphumile ngoLwesithathu ekuseni?
Kutheni uninzi "lweentsilelo ezi-2" zifumaneka ngokwenene: Ngaphandle kokuba indlu yakho ibethwe ngumbane okanye i-NAS iye yawiswa kwizinyuko, iidrive ezimbini ezinomatshini phantse azinakuze zehlelwe yintlekele yengozi kwisekondi enye kanye. Endaweni yoko, okwenzekileyo kulandelelwano: 1. I-Drive 2 iphuhlise amacandelo amabi ambalwa kwaye yakhatyelwa ngaphandle kweentsuku okanye iiyure ngaphambili (ishiya uluhlu olusebenza kwimowudi yoHleko kwi-Drives 1, 3, kunye ne-4). 2. Kamva, ** I-Drive 4 ** idibene * necandelo elinye elingafundekiyo * (okanye ixesha elifutshane le-SATA) ngelixa i-NAS yayiqhuba i-background scrub. Ngenxa yokuba uluhlu lwalungasenamsebenzi wokulungisa elo candelo libi elinye kwi-Drive 4, umqhubi we-RAID ukhabe i-Drive 4 naye kwaye waphawula ichibi lonke elithi Intlithekile.
Kule meko, I-Drive 4 ineyona ndawo intsha, ifike kumzuzu ikhawunta yohlaselo (Events count) kwaye yi-99.9999% esempilweni, ngelixa i-Drive 2 iphelelwe lixesha ("stale").
Uyifumana njani kwakhona i-Synology eyaphukileyo, i-QNAP, okanye i-Linux mdadm uluhlu ngokukhuselekileyo kwi Linux PC¶
Danger
Absolute Golden Rule of Multi-Drive RAID Recovery: Ungaze ubaleke mdadm --assemble --force ngqo kwiidrive zakho zoqobo ze-NAS ngaphandle kokudibanisa iidrive ezonakeleyo kuqala (okanye usebenzisa ikopi-ngokubhala-ukwaleka). Nini --force ibhala kwakhona izinto zokubala zesiganeko se-superblock kwaye inyuse inkqubo yefayile ebhalwe, impazamo enye inokonakalisa umlinganiso kuzo zonke iidiski.
Inyathelo 1: Yenza amandla ezantsi iNAS, ileyibhe yonke indawo yokuqhuba, kwaye uqhagamshele iidrive kwiPC yedesktop eqhuba Ubuntu Linux Live USB.¶
- Vala iNAS. Phawula idrayivu nganye (
Bay 1,Bay 2,Bay 3,Bay 4). - Qhagamshela iidrive kumazibuko e-SATA ebhodi yomama (okanye ikhadi le-HBA elifana ne-LSI 9211-8i/9300-8i kwiMowudi ye-IT; zithintele ii-hubs ze-USB ezingabizi kakhulu eziqhawula phantsi komthwalo) kwi-PC yedesktop eqalwe kwi Ubuntu Linux Live USB.
- Vula i-terminal kwaye uhlole uyilo lokwahlula kunye
mdadmiibhloko ezinkulu **ngokungqongqo kwimowudi yokufunda kuphela yoxilongo **:
# 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
Inyathelo 2: Funda i Events counter kunye Array State imveliso evela mdadm --examine¶
Jonga ngokusondeleyo kwimveliso ye sudo mdadm --examine /dev/sd[a-d]3 kuqhubo ngalunye:
* Uya kubona imigca efana nale:
* /dev/sda3: Events : 48210, Array State : A.AA (A = Iyasebenza, . = Akukho)
* /dev/sdb3 (Qhuba 2, uyehliswa kuqala): Events : 47950, Array State : AAAA
* /dev/sdc3: Events : 48210, Array State : A.AA
* /dev/sdd3 (Qhuba isi-4, uphume ekugqibeleni): Events : 48209, Array State : A.AA
* Qaphela ukuba yintoni na Events Ikhawuntara ikuxelela: Iqhuba 1, 3, kunye no-4 (sda3, sdc3, sdd3) ziphakathi kwesiganeko esinye kwesinye (48210 vs 48209), ngelixa Qhuba 2 (sdb3) yawa ngaphambili kakhulu kumsitho 47950.
* Umgaqo obalulekileyo: Kwi-4-drive RAID 5 array, ufuna kuphela **3 drives ** ukuvuselela ipesenti ze-100 zedatha. KUFUNEKA uhlanganise uluhlu lwezixhobo usebenzisa i 3 ezona drives zintsha (sda3, sdc3, kwaye sdd3) kwaye shiya ngaphandle idrayivu endala (sdb3). Ukuba unyanzela ngempazamo-ukudibanisa usebenzisa idrayivu endala (sdb3), indlela yefayile yemetadata esuka kwiintsuku ezimbini ezidlulileyo iyakungahambelani nemigca yedatha yangoku kwezinye iidrive kwaye yonakalise abalawuli bakho.
Inyathelo 3: Colanisa nayiphi na idrayivu enamacandelo amabi usebenzisa i-GNU ddrescue kuqala¶
Phambi kokudibanisa, fanisa idrayivu esandula kuwa phantsi (/dev/sdd) (kwaye ngokufanelekileyo onke amalungu aqhuba) ukuya kwindawo esempilweni yokutshintsha usebenzisa ddrescue (bona Ukungaphumeleli kwe-hard drive kunye nokubuyisela idatha ngokupheleleyo ddrescue isintaksi):
# 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
Ngoku khupha ukusilela koqobo /dev/sdd kwaye uyibeke ngokukhuselekileyo kwishelufu ukuze usebenze nge-clone enempilo (/dev/sde).
Inyathelo 4: Hlanganisa kwakhona uluhlu lweRAID, iqela levolumu yeLVM, kunye nenkqubo yefayile ngendlela engqongqo FUNDA KUPHELA.¶
Kwi-Synology (SHR / RAID) kunye neenkqubo ze-QNAP, i-stack yokugcina inamaleko amathathu: mdadm (RAID) -> LVM2 (Umphathi woMqulu oNgengqiqo) -> ext4 okanye Btrfs (Isixokelelwano seFayile). Nalu ulandelelwano lomyalelo oluchanekileyo lokuyinyusa ngokukhuselekileyo kwimowudi yokufunda kuphela ku-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
Kanye /mnt/nas_rescue inyusi, zonke iifolda ekwabelwana ngazo ngeNAS (photo, homes, video, documents) iya kuvela ngaphakathi /mnt/nas_rescue/ ukuze uzikhuphele ngqo kwi-USB yangaphandle drive drive.
- Kuthekani ukuba i-Synology NAS yakho ine "Synology Hybrid RAID (SHR)" enobungakanani obuxubeneyo bokuqhuba? I-Synology ye-SHR yahlula ngokulula iidrive ezinkulu zibe zizahlulo ezininzi (
sda5,sda6) kwaye yenza okwahlukileyomdadmuluhlu kwisigaba ngasinye sesahlulelo, emva koko idibanise ezomduluhlu kunye ngaphakathi kweqela elinye LVM Volume Group (vg1000). Ukubalekasudo mdadm --assemble --scan --readonlykwayesudo vgchange -ayithunga ngokuzenzekelayo iivolumu ezininzi ze-SHR zibuyele kunye ku-Ubuntu. - Eyenye indlela ye-GUI yoRhwebo (iWindows/macOS/Linux): Ukuba awukhululekanga ngemiyalelo ye-terminal ye-Linux okanye une-QNAP ecekethekileyo elungiselelwe i-LVM pool, UFS Explorer RAID Recovery okanye ReclaiMe Free RAID Recovery inokuhlola zonke iidrive zeNAS eziqhagamshelweyo kwi-Windows00 kwimowudi ye-Linux, funda ngokuzenzekela kwimowudi yeWindows1 okanye i-Linux ukujikeleziswa kwe-parity, kunye ne-LVM offsets, kwaye ukhuphele iifolda zakho ngaphandle kokuguqula icandelo elinye kwiidrive ze-NAS.
ZFS (zpool) kunye neBtrfs imiyalelo yohlangulo olungxamisekileyo¶
Amaqonga e-NAS anamhlanje (i-TrueNAS SCALE/CORE, i-Proxmox, i-Ubuntu Server, i-Unraid, kunye ne-Synology Btrfs imiqulu) iya isanda kusebenzisa iinkqubo zefayile zokukhuphela-ngokubhala (CoW) endaweni yelifa. ext4. Ukuba i ZFS zpool okanye i-Btrfs pool iyala ukunyuka okanye ibangele i-kernel panic kwi-boot emva kokuphuma kombane okanye ukungaphumeleli kwe-drive, ** ukunyuswa okuqhelekileyo kuya kusilela ngenxa yokuba i-OS izama ukuphinda idlale iintengiselwano zokubhala ezonakalisiweyo **. Kufuneka usebenzise i parameters yetransekshini efundwayo kuphela.
1. ZFS (zpool) UBuyiselo oluNgxamisekileyo (TrueNAS / Proxmox / Linux ZFS)¶
Ukuba iphuli ye-ZFS ithi FAULTED, UNAVAIL, okanye ingqube umncedisi (i-kernel panic) ngephanyazo uzama ukuyingenisa ngaphandle emva kwelahleko yamandla engacocekanga:
# 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>
Xa sele inyuswe ngaphantsi /mnt/zfs_rescue, Khuphela iiseti zedatha usebenzisa rsync okanye zfs send phambi kokuba uzame ukungenisa ngaphandle ichibi funda-bhala.
2. UBuyiselo oluNgxamisekileyo lwe-Btrfs (i-Synology Btrfs / i-Cache Pool engahlatywanga / i-Linux Btrfs)¶
Warning
UNGAZE ubaleke btrfs check --repair Ngaphandle kokuba sele wenze iidrive okanye ugqibile zonke iindlela zokufunda-kuphela zokunyuka ngezantsi. Uxwebhu olusemthethweni lweBtrfs kernel lulumkisa ngokucacileyo ukuba --repair inokutshabalalisa ngokusisigxina umthi owonakeleyo.
Endaweni yoko, zama ukunyusela okanye ukukhupha ivolyum ye-Btrfs ngolandelelwano olungqongqo oluqhubela phambili, ukusuka kokuncinci ukuya kwiskeni esinzulu:
# 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/
I-Hardware RAID Controller Emergency: "Uqwalaselo lwaNgaphandle" kunye namakhadi eRAID afileyo¶
Iiseva zeShishini (i-Dell PowerEdge enamakhadi e-PERC, i-HPE ProLiant ene-Smart Array, i-Lenovo ThinkSystem, okanye iindawo zokusebenza ezine-Broadcom/LSI MegaRAID controller) zisebenzisa amakhadi e-RAID e-hardware ane-inboard NVRAM kunye nebhetri/supercapacitor cache (BBU / CacheVault).
1. Ulungelelwaniso lwangaphandle lwangaphandle vs. Uqwalaselo olucacileyo (CRITICAL)¶
Xa idrayivu iqhawula okomzuzwana okanye uhambisa iidrive kwi-chassis yeseva yokutshintsha, iDell PERC okanye i-LSI MegaRAID BIOS yesikrini sesiqalo siyakunqumama kwaye sazise: "Ulungelelwaniso lwangaphandle lufunyenwe kwiadaptha."
* NJALO khetha Import Foreign Configuration (okanye Preview Foreign Configuration -> Import). Ithegi "yangaphandle" ithetha ngokulula ukuba umlawuli we-RAID ubona i-RAID ekhoyo imetadata ebhalwe kwii-hard drives ngokwazo (i- Disk Data Format / DDF okanye amacandelo oqwalaselo lwe-LSI ekupheleni kwee-drives) eyahluke kwimo ye-NVRAM yekhadi. Ukungenisa elizweni kufunda uyilo lweroyi ngqo kwiidrive kwaye izisa idiski yakho yenyani umva kwi-intanethi ngaphandle kokuphulukana ne-byte enye.
* UNGAZE ukhethe Clear Foreign Configuration okanye Initialize Virtual Disk. Ukucoca okanye ukuqalisa kosula uluhlu lwe metadata okanye ooziro bokuqhuba.
* Isilumkiso Ngaphandle: Ukuba idrayivu enye iye yaphuma kwiiveki ezintathu ezidlulileyo, ugcine ubhala idatha entsha kuluhlu oluthotyiweyo kangangeeveki ezintathu, kwaye emva koko uplagi idrayivu endala yeveki ezi-3-stale ukubuyisela ngaphakathi, USUKU kungenisa uqwalaselo lwangaphandle ukusuka kulaa drive yakudala enye ngaphezulu kweedrive zakho eziphilileyo ezisebenzayo; endaweni yoko, buyisela okanye ulinganise i-stale drive.
2. Kuthekani ukuba i-Hardware RAID Card ngokwalo iyafa?¶
Ukuba i-motherboard yakho ye-server okanye i-PCIe hardware RAID isilawuli ikhadi linengxaki yokusilela kwi-elektroniki kwaye ayizukuqalisa:
* AWUKHO mfuneko yokuba uthenge uhlaziyo olululo lwebhodi yomama, kwaye idata yakho iseyiyo kwiidrives.
* Thenga isilawuli esitshintshileyo se-RAID kwi- **isilawuli esifanayo sosapho lwe-chipset ** (umzekelo, nayiphi na i-LSI/Broadcom MegaRAID SAS 2108/2208/3108 okanye i-Dell PERC H710/H730/H740 ikhadi inokufunda imethadatha ye-DDF kwikhadi le-PERC endala).
* Faka ikhadi le-RAID lokubuyisela kwiPC esebenzayo, qhagamshela iidrive zakho ezibhaliweyo kwi-bay order yazo yoqobo, qala kwisilawuli seBIOS (Ctrl+R okanye Ctrl+H okanye UEFI HII imenyu), kwaye ukhethe Ngenisa Uqwalaselo lwaNgaphandle. Umlawuli uya kufunda uyilo lwe-RAID kwiidrive kwaye anyuse ivolumu yakho kwangoko.
Imibuzo edla ngokubuzwa¶
I-Synology yam okanye i-QNAP NAS ngokwayo ayisayi kuphinda ivule (unikezelo lwamandla afileyo okanye ibhodi yomama), ndizifumana njani iifayile zam kwii-hard drives?
Ukuba ibhokisi ye-NAS iyafa nge-elektroniki, ii-hard drives zakho kunye nedatha ngokuqinisekileyo ziphantse zibe yi-100 ekhulwini. Uneendlela ezimbini ezikhuselekileyo zokukhetha: ** (1) Ukufuduka kweDiskhi kwi-NAS eNtsha:** Unako ukukhupha iidrayivu ezinamanani ukusuka kwi-Synology yakho efileyo (okanye i-QNAP) kwaye uzilayishe ngendlela efanayo kwi-brand-bay order kwi-brand-new Synology (okanye i-QNAP) ebiyelweyo; xa iqalwe, i-NAS ibona "i-NAS OS efudukayo" kwaye ingenisa ngaphandle indawo yokugcina kunye nazo zonke iifayile zicocekile kwimizuzu eli-10. **(2) Nyuka kwi-Desktop PC:** Kuba i-Synology kunye ne-QNAP zisebenzisa i-Linux eqhelekileyo `mdadm` kwaye `LVM2` phantsi kwe-hood, ungaplaga zonke iidrive kwi-desktop yePC eqalwe kwi-Ubuntu Linux Live USB stick, run. `sudo mdadm --assemble --scan --readonly && sudo vgchange -ay`, kwaye ukope zonke iifolda zakho ngqo kwi-USB yangaphandle drive ngaphandle kokuthenga iNAS entsha.
Kutheni i-RAID 5 ingasacetyiswa kwi-12 TB enkulu ukuya kwi-24 TB hard drives?
Kuluhlu lwe-RAID 5 (okanye i-SHR-1 / RAIDZ1) eyakhiwe nge-16 TB enkulu okanye iidrive ze-TB ezingama-20, ukwakha kwakhona idrayivu enye engaphumeleliyo kufuna ukufunda yonke intwana phakathi kwama-48 ukuya kwi-100+ yeeterabytes zeepleyiti ezishiyekileyo ngaphezulu kwefestile yeentsuku ezi-2 ukuya kwezi-4. Consumer kunye ne-NAS hard drives ngokuqhelekileyo zinereyithi yempazamo yokufunda yomenzi engafumanekiyo yempazamo enye nge $10 ^{14}$ amasuntswana afundwayo (malunga ne-12.5 terabytes). Oko kuthetha ukuba manani, ngelixa ufunda i-60 TB yokuguga kwe-sibling drives ngexesha lokwakhiwa kwe-RAID 5, kukho amathuba aphezulu okubetha ubuncinane icandelo elinye elingafundekiyo okanye ukubangela ukusilela kwe-drive yesibini, okubulala i-RAID eyodwa ye-5. Ukuqhuba i-10 TB nangaphezulu, sebenzisa rhoqo i-double-parity (** RAID 6, Synology SHR-2, okanye i-ZFS RAIDZ2 **) okanye i-vdevs ebonisiweyo (** RAID 10 **), idibene ne-3-2-1 ezimeleyo yokugcinwa kwangaphandle.
Ngaba ndingatshintshanisa umqhubi we-4 we-TB ongaphumeleliyo kuluhlu lwam lwe-RAID ngoqhubo olukhulu lwe-8 TB ngexesha lolwakhiwo olungxamisekileyo?
Ewe. Yonke i-hardware kunye ne-software ye-RAID isilawuli, kunye ne-Synology SHR, i-QNAP, kunye ne-ZFS, ikuvumela ukuba ubuyisele i-drive engaphumelelanga nge-drive ye-*elinganayo okanye enkulu umthamo** (ungaze ube mncinci, nange-megabyte enye). Kumgangatho we-RAID 5/6 okanye i-ZFS vdev, uluhlu luya kusebenzisa kwangoko i-4 TB yokuqala ye-8 TB drive entsha ukugqiba ukwakhiwa kwakhona (kunye ne-Synology SHR, inokwandisa umthamo we-pool osebenzayo ngokuzenzekelayo ukuba ubuncinane iidrive ezimbini ziphuculwe). Qiniseka nje ukuba i-drive enkulu entsha isebenzisa **CMR (i-Conventional Magnetic Recording)** ubuchwepheshe, hayi i-SMR.
Kufuneka ndenze ntoni ukuba umbane uqhawuke kanye phakathi kwe-RAID yokwakhiwa kwakhona okanye ukwandiswa kwamandla?
Okokuqala, UNGAVUYI kwaye unganyanzeli-ukuqalisa kwakhona okanye ukuphinda uqalise idama ukuba lithe labuya lonakele. ILinux yangoku `mdadm` (isetyenziswa yi-Synology, i-QNAP, kunye ne-Unraid) kunye ne-ZFS irekhoda ** ukubhala-injongo ye-bitmap ** kwaye uphinde uphinde uphinde ukhangele indawo yokukhangela icandelo elichanekileyo apho ukwakhiwa kwakhona okanye ukubunjwa kwakhona kwaphazamiseka. Xa amandla acocekileyo ebuyiselwe (ngokufanelekileyo afakwe kwiSibonelelo saMandla esingaphazamisekiyo / i-UPS ngoko ke i-flicker yesibini ayikwazi ukubetha), qalisa i-NAS ngokwesiqhelo kwaye ulinde imizuzu eli-10: kwiimeko ezininzi, `mdadm` okanye `zpool resilver` iqala kwakhona ngokuzenzekelayo ukusuka kwindawo yokugqibela yokukhangela. Ukuba izitali zokubunjwa kwakhona okanye iingxelo zevolumu zitshonile, vala ngokukhawuleza, fanisa zonke iidrives `ddrescue`, kwaye usebenzise i-UFS Explorer RAID yoBuyiselo ukudibanisa indawo yokukhangela ekwahlulahlulayo.
Izikhokelo ezinxulumeneyo¶
- Ukungaphumeleli kwe-hard drive kunye nokubuyisela idatha
- Ucimo lwefayile ngengozi, idrayivu efomathiweyo, kunye nokubuyisela ifoto
- Ukugcinwa kwekhompyuter: isicwangciso se-3-2-1 kunye nokubuyiswa kweentlekele
- Ukusilela kwenkqubo yeLinux kunye nokulungiswa kweGRUB
- I-Ransomware kunye ne-malware impendulo engxamisekileyo
- Iinombolo zikaxakeka zehlabathi
Imithombo ijongiwe¶
- Umbutho we-Linux Kernel (International): Linux RAID (
mdadmWiki (raid.wiki.kernel.org), Ukufumana kwakhona i-RAID yeSoftware eFaileyo, kunye noXwebhu lwe-Btrfs Kernel (btrfs.readthedocs.iokwibtrfs rescuekwayebtrfs restore). - Iprojekthi yoxwebhu lwe-OpenZFS (yamazwe ngamazwe):
zpool importFunda-Kuphela kunye neQela leNtengiselwano Rollback (-F -o readonly=on) Isalathiso soLawulo. - Synology Inc. (Taiwan/International): ISiqendu seSiseko soLwazi lweSynology esisemthethweni
KB-1079(Ndingayisebenzisa njani iPC ukubuyisela idatha xa iSynology NAS yam ingasebenzi kakuhle usebenzisa Ubuntumdadmkwayelvm2). - IProjekthi ye-GNU / iSiseko seSoftwe saMahla (yaMazwe ngaMazwe): GNU
ddrescueIncwadi yoMfanekiso yeNqanaba leBhlohlo elingonakalisiyo leMifanekiso yeNqanaba le-RAID ethotyiweyo. - Iziko leSizwe leMigangatho kunye neTeknoloji (i-NIST) (eUnited States): Ushicilelo oluKhethekileyo lwe-800-86 kunye neSikhokelo sokuNyembeka kwiSitoreji kwi-RAID Yakha kwakhona i-Exposure yeWindows kunye ne-Urectable Read Error (URE) enokwenzeka.