here a help for who, like me, need to retrive DATA from broken Qnap with RAID-1.
WARNING: Carry out the following commands under your responsibility. I do not hold myself responsible if you lose your data. Check with QNAP first if there is a way to repair your QNAP Nas and then access the data on the disks normally.
In my case, QNAP model is TS-251+ with Linux Software RAID + LVM2 and FileSystem is EXT4 :
1 - Verify 'dev' about attached HDD (USB or SATA). The bigger partition is where QNAP place your data :
Code: Select all
fdisk -l
Disk /dev/sdb: 2,75 TiB, 3000592982016 bytes, 5860533168 sectors
Disk model: EFRX-68AX9N0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: AEFC8B50-1DBC-46F6-844F-60D7BD2704AB
Dispositivo Start Fine Settori Size Tipo
/dev/sdb1 40 1060289 1060250 517,7M Microsoft basic data
/dev/sdb2 1060296 2120579 1060284 517,7M Microsoft basic data
/dev/sdb3 2120584 5842744109 5840623526 2,7T Microsoft basic data <<<<<<
/dev/sdb4 5842744112 5843804399 1060288 517,7M Microsoft basic data
/dev/sdb5 5843804408 5860511999 16707592 8G Microsoft basic data
Code: Select all
mdadm -E /dev/sdb3
/dev/sdb3:
Magic : a92b4efc
Version : 1.0
Feature Map : 0x0
Array UUID : 77976160:8f893135:eb6cdd71:733bb188
Name : 1
Creation Time : Mon Jun 22 01:07:33 2020
Raid Level : raid1
Raid Devices : 2
Avail Dev Size : 5840623240 (2785.03 GiB 2990.40 GB)
Array Size : 2920311616 (2785.03 GiB 2990.40 GB)
Used Dev Size : 5840623232 (2785.03 GiB 2990.40 GB)
Super Offset : 5840623504 sectors
Unused Space : before=0 sectors, after=264 sectors
State : clean
Device UUID : a997883d:504f6cc2:bd13a2e1:3c1e2e92
Update Time : Mon Aug 24 12:11:56 2020
Bad Block Log : 512 entries available at offset -8 sectors
Checksum : 7fb23406 - correct
Events : 708
Device Role : Active device 1
Array State : .A ('A' == active, '.' == missing, 'R' == replacing)
Code: Select all
cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md127 : active raid1 sdb3[1] <<<<<<
2920311616 blocks super 1.0 [2/1] [_U]
md322 : active (auto-read-only) raid1 sdb5[1]
7235136 blocks super 1.0 [2/1] [_U]
bitmap: 0/1 pages [0KB], 65536KB chunk
md256 : active (auto-read-only) raid1 sdb2[1]
530112 blocks super 1.0 [2/1] [_U]
bitmap: 0/1 pages [0KB], 65536KB chunk
md9 : active (auto-read-only) raid1 sdb1[1]
530048 blocks super 1.0 [64/1] [_U]
bitmap: 1/1 pages [4KB], 65536KB chunk
md13 : active (auto-read-only) raid1 sdb4[1]
458880 blocks super 1.0 [64/1] [_U]
bitmap: 1/1 pages [4KB], 65536KB chunk
unused devices: <none>
Code: Select all
mdadm --stop /dev/md127
Code: Select all
mdadm -A -R /dev/md127 /dev/sdb3
mdadm: /dev/md127 has been started with 1 drive.
6 - Verify LVM2 and grab volume/logical drive :
root@ubuntu:~# pvscan
PV /dev/md127 VG vg288 lvm2 [<2,72 TiB / 0 free]
Total: 1 [<2,72 TiB] / in use: 1 [<2,72 TiB] / in no VG: 0 [0 ]
root@ubuntu:~# vgdisplay
--- Volume group ---
VG Name vg288
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 21
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size <2,72 TiB
PE Size 4,00 MiB
Total PE 712966
Alloc PE / Size 712966 / <2,72 TiB
Free PE / Size 0 / 0
VG UUID E9eFWd-WRmR-C8W6-YSu4-tSgA-1WnT-P4eXqX
root@ubuntu:~# pvdisplay
--- Physical volume ---
PV Name /dev/md127
VG Name vg288
PV Size <2,72 TiB / not usable <1,78 MiB
Allocatable yes (but full)
PE Size 4,00 MiB
Total PE 712966
Free PE 0
Allocated PE 712966
PV UUID lkTOn4-W5Ni-kjaJ-5ok0-DjbA-h5cc-1xtN0J
root@ubuntu:~# lvdisplay
--- Logical volume ---
LV Path /dev/vg288/lv544
LV Name lv544
VG Name vg288
LV UUID 4KMo6U-AfNV-amSL-Th2U-UZoZ-qKQW-n0EtKz
LV Write Access read/write
LV Creation host, time Qnap, 2020-06-22 01:07:36 +0200
LV Status NOT available
LV Size <27,90 GiB
Current LE 7142
Segments 2
Allocation inherit
Read ahead sectors 8192
--- Logical volume ---
LV Path /dev/vg288/lv1
LV Name lv1
VG Name vg288
LV UUID CYGw0J-01iU-e9vv-GxZe-nWg9-kPL4-DOn3mP
LV Write Access read/write
LV Creation host, time Qnap, 2020-06-22 01:07:47 +0200
LV Status NOT available
LV Size 2,69 TiB
Current LE 705824
Segments 1
Allocation inherit
Read ahead sectors 8192
NB : If, after the command pvscan appear the following error 'WARNING: PV /dev/md127 in VG vg288 is using an old PV header, modify the VG to update' do the following command :
Code: Select all
vgck --updatemetadata vg288
Code: Select all
vgchange -a y
root@ubuntu:~# vgchange -a y
2 logical volume(s) in volume group "vg288" now active
8 - Mount volume :
Code: Select all
mkdir /media/x-qnap
mount /dev/vg288/lv1 /media/x-qnap/
chmod 0777 /media/x-qnap
Hope that can be helpful.
Bye!