User Tools

Site Tools


nas:qnap:recover_raid_data

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
nas:qnap:recover_raid_data [2021/09/13 11:48] peternas:qnap:recover_raid_data [2021/09/13 13:28] (current) – [Determine Raid Status] peter
Line 4: Line 4:
  
 <code bash> <code bash>
-cat /proc/mdstat                                                                                                                                                                                                                          +cat /proc/mdstat
 </code> </code>
  
Line 43: Line 43:
 **NOTE:**  Some of these can be ignored, as used internally by QNAP. **NOTE:**  Some of these can be ignored, as used internally by QNAP.
  
-  * **md1**:  Data+QNAP NAS will be automatically cut the internal hard disk into 5 partitions after being connected
-  * **md9**:  Configuration, update and root perhaps+ 
-  * **md13**:  Web interface engine and other OS extension. +^Partition^Array^Type^Capacity*1k=1000^Mount^Use^ 
-  * **md256**:  Swap+|sda1|md9|raid1|542M|/mnt/HDA_ROOT|Save profile.  Configuration, updates and root.| 
-  * **md321**:  Swap (unmountedit is used in some way?+|sda2|md256|raid1|542M||Log storage area?| 
 +|sda3|md1|Set by Storage Pool|Disk free space||Data.  Storage pool.| 
 +|sda4|md13|raid1|469M|/mnt/ext|Plug-in storage area* Web interface engine and other OS extension.| 
 +|sda5|md322|raid1|7408M||SWAP.
 + 
 +  * ***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. 
 + 
  
 </WRAP> </WRAP>
  
 +
 +----
 +
 +===== Determine Salient Raids =====
 +
 +To ignore the internal RAIDs used by QNAP.
 +
 +<code bash>
 +/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-/'
 +</code>
 +
 +returns:
 +
 +<code bash>
 + 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  
 +</code>
 +
 +----
 +
 +===== Run md_checker =====
 +
 +**md_checker** is a QNAP script which checks the software RAID.
 +
 +<code bash>
 +md_checker
 +</code>
 +
 +returns:
 +
 +<code bash>
 +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              /dev/sdf3     Active   Sep 12 13:00:07 2021 16304340   AAAAAAAA                 
 + NAS_HOST              /dev/sde3     Active   Sep 12 13:00:07 2021 16304340   AAAAAAAA                 
 + NAS_HOST              /dev/sda3     Active   Sep 12 13:00:07 2021 16304339   AAAAAAAA                 
 + NAS_HOST              /dev/sdb3     Active   Sep 12 13:00:07 2021 16304339   AAAAAAAA                 
 + NAS_HOST      10        /dev/sdc3     Active   Sep 12 13:00:07 2021 16304339   AAAAAAAA                 
 + NAS_HOST              /dev/sdh3     Active   Sep 12 13:00:07 2021 16304340   AAAAAAAA                 
 + NAS_HOST              /dev/sdg3     Active   Sep 12 13:00:07 2021 16304339   AAAAAAAA                 
 + NAS_HOST              /dev/sdd3     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#      101        /dev/sdk3     Active   Sep 12 12:58:42 2021      154                          
 +===============================================================================================
 +
 +
 +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#      101        /dev/sdi3     Active   Sep 12 12:58:36 2021      162                          
 +===============================================================================================
 +</code>
  
 ---- ----
  
nas/qnap/recover_raid_data.1631533732.txt.gz · Last modified: 2021/09/13 11:48 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki