User Tools

Site Tools


nas:qnap:recover_raid_data

This is an old revision of the document!


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.

  • md1: Data.
  • md9: Save Profile. Configuration, updates and root.
  • md13: Web interface engine and other OS extension. Plugin Storage.
  • md256: Logs. Swap?
  • md322: Swap (unmounted)?
PartitionArrayTypeCapacity*1k=1000MountUse
sda1md9raid1542M/mnt/HDA_ROOTSave profile
sda2md256raid1542MLog storage area?
sda3md1Set by Storage PoolDisk free spaceStorage pool
sda4md13raid1469M/mnt/extPlug-in storage area*
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  

nas/qnap/recover_raid_data.1631536026.txt.gz · Last modified: 2021/09/13 12:27 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki