User Tools

Site Tools


nas:qnap:recover_raid_data

NAS - QNAP - Recover Raid Data

Determine Raid Status

cat /proc/mdstat

returns:

Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] 
md4 : active raid1 sdi3[0]
      23432007232 blocks super 1.0 [1/1] [U]
 
md3 : active raid1 sdk3[0]
      23432007232 blocks super 1.0 [1/1] [U]
 
md1 : active raid6 sdf3[0] sdd3[7] sdg3[6] sdh3[5] sdc3[4] sdb3[2] sda3[3] sde3[1]
      46824429696 blocks super 1.0 level 6, 64k chunk, algorithm 2 [8/8] [UUUUUUUU]
      bitmap: 21/59 pages [84KB], 65536KB chunk
 
md322 : active raid1 sdc5[7](S) sdd5[6](S) sda5[5](S) sdb5[4](S) sdg5[3](S) sdh5[2](S) sde5[1] sdf5[0]
      7235136 blocks super 1.0 [2/2] [UU]
      bitmap: 0/1 pages [0KB], 65536KB chunk
 
md256 : active raid1 sdc2[7](S) sdd2[6](S) sda2[5](S) sdb2[4](S) sdg2[3](S) sdh2[2](S) sde2[1] sdf2[0]
      530112 blocks super 1.0 [2/2] [UU]
      bitmap: 0/1 pages [0KB], 65536KB chunk
 
md13 : active raid1 sdd4[38] sdf4[0] sde4[32] sda4[34] sdb4[33] sdc4[35] sdh4[36] sdg4[37]
      458880 blocks super 1.0 [33/8] [UUUUUUUU_________________________]
      bitmap: 1/1 pages [4KB], 65536KB chunk
 
md9 : active raid1 sdd1[38] sdf1[0] sde1[32] sda1[34] sdb1[33] sdc1[35] sdh1[36] sdg1[37]
      530048 blocks super 1.0 [32/8] [UUUUUUUU________________________]
      bitmap: 1/1 pages [4KB], 65536KB chunk
 
unused devices: <none>

NOTE: Some of these can be ignored, as used internally by QNAP.

QNAP NAS will be automatically cut the internal hard disk into 5 partitions after being connected.

PartitionArrayTypeCapacity*1k=1000MountUse
sda1md9raid1542M/mnt/HDA_ROOTSave profile. Configuration, updates and root.
sda2md256raid1542MLog storage area?
sda3md1Set by Storage PoolDisk free spaceData. Storage pool.
sda4md13raid1469M/mnt/extPlug-in storage area*. Web interface engine and other OS extension.
sda5md322raid17408MSWAP.
  • *sda4/md13 is for programs like Apache and Python, but apps like HybridBackup will soft-link to /share/XXXXXXXX/.qpkg/ (XXXXXXX may be CACHEDEV1_DATA), the actual location is the storage of sda3/md1 Pool area.

Determine Salient Raids

To ignore the internal RAIDs used by QNAP.

/bin/cat /proc/mdstat | /bin/sed '/md/i \break' | /bin/tr '\n' ' ' | /bin/awk -v RS=break '/([sv]d[a-z][a-z]*)3/' 
 
or
 
/bin/cat /proc/mdstat | /bin/sed '/md/i \break' | /bin/tr '\n' ' ' | /bin/awk -v RS=break '/([sv]d[a-z][a-z]*|nvme[0-9a-z]*p|loop[0-9a-z]*p)3|dm-/'

returns:

 md4 : active raid1 sdi3[0]       23432007232 blocks super 1.0 [1/1] [U]        
 md3 : active raid1 sdk3[0]       23432007232 blocks super 1.0 [1/1] [U]        
 md1 : active raid6 sdf3[0] sdd3[7] sdg3[6] sdh3[5] sdc3[4] sdb3[2] sda3[3] sde3[1]       46824429696 blocks super 1.0 level 6, 64k chunk, algorithm 2 [8/8] [UUUUUUUU]       bitmap: 17/59 pages [68KB], 65536KB chunk  

Run md_checker

md_checker is a QNAP script which checks the software RAID.

md_checker

returns:

Welcome to MD superblock checker (v2.0) - have a nice day~
 
Scanning system...
 
 
RAID metadata found!
UUID:		85d45e53:913fde8a:55ba7e06:ee932838
Level:		raid6
Devices:	8
Name:		md1
Chunk Size:	64K
md Version:	1.0
Creation Time:	Mar 6 17:46:54 2018
Status:         ONLINE (md1) [UUUUUUUU]
===============================================================================================
 Enclosure | Port | Block Dev Name | # | Status |   Last Update Time   | Events | Array State
===============================================================================================
 NAS_HOST       3        /dev/sdf3   0   Active   Sep 12 13:00:07 2021 16304340   AAAAAAAA                 
 NAS_HOST       4        /dev/sde3   1   Active   Sep 12 13:00:07 2021 16304340   AAAAAAAA                 
 NAS_HOST       8        /dev/sda3   2   Active   Sep 12 13:00:07 2021 16304339   AAAAAAAA                 
 NAS_HOST       7        /dev/sdb3   3   Active   Sep 12 13:00:07 2021 16304339   AAAAAAAA                 
 NAS_HOST      10        /dev/sdc3   4   Active   Sep 12 13:00:07 2021 16304339   AAAAAAAA                 
 NAS_HOST       5        /dev/sdh3   5   Active   Sep 12 13:00:07 2021 16304340   AAAAAAAA                 
 NAS_HOST       6        /dev/sdg3   6   Active   Sep 12 13:00:07 2021 16304339   AAAAAAAA                 
 NAS_HOST       9        /dev/sdd3   7   Active   Sep 12 13:00:07 2021 16304339   AAAAAAAA                 
===============================================================================================
 
 
RAID metadata found!
UUID:		a854a177:bc9e00db:b74ad2cc:2d12160c
Level:		raid1
Devices:	1
Name:		md3
Chunk Size:	-
md Version:	1.0
Creation Time:	Aug 21 18:43:43 2019
Status:         ONLINE (md3) [U]
===============================================================================================
 Enclosure | Port | Block Dev Name | # | Status |   Last Update Time   | Events | Array State
===============================================================================================
 EXDR#1       101        /dev/sdk3   0   Active   Sep 12 12:58:42 2021      154   A                        
===============================================================================================
 
 
RAID metadata found!
UUID:		a3eade8c:17af5977:cb38c229:1635d0a0
Level:		raid1
Devices:	1
Name:		md4
Chunk Size:	-
md Version:	1.0
Creation Time:	Jun 21 00:14:24 2019
Status:         ONLINE (md4) [U]
===============================================================================================
 Enclosure | Port | Block Dev Name | # | Status |   Last Update Time   | Events | Array State
===============================================================================================
 EXDR#3       101        /dev/sdi3   0   Active   Sep 12 12:58:36 2021      162   A                        
===============================================================================================

nas/qnap/recover_raid_data.txt · Last modified: 2021/09/13 13:28 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki