How to recover RAID5 taken from QNAP on Raspberry Pi

I had an installation issue that I finally resolved today.
I’m now stuck at another problem.

[folaht@Stohrje-uq /]$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0   1,8T  0 disk
├─sda1        8:1    0 517,7M  0 part
├─sda2        8:2    0 517,7M  0 part
├─sda3        8:3    0   1,8T  0 part
├─sda4        8:4    0 517,7M  0 part
└─sda5        8:5    0     8G  0 part
mmcblk0     179:0    0  29,8G  0 disk
├─mmcblk0p1 179:1    0 213,6M  0 part /boot
└─mmcblk0p2 179:2    0  29,6G  0 part /home
[folaht@Stohrje-uq /]$ sudo mount /dev/sda1 /mnt
mount: /mnt: type de système de fichiers « linux_raid_member » inconnu.
[folaht@Stohrje-uq /]$ sudo mount /dev/sda2 /mnt
mount: /mnt: type de système de fichiers « linux_raid_member » inconnu.
[folaht@Stohrje-uq /]$ sudo mount /dev/sda3 /mnt
mount: /mnt: type de système de fichiers « linux_raid_member » inconnu.
[folaht@Stohrje-uq /]$ sudo mount /dev/sda4 /mnt
mount: /mnt: type de système de fichiers « linux_raid_member » inconnu.
[folaht@Stohrje-uq /]$ sudo mount /dev/sda5 /mnt
mount: /mnt: type de système de fichiers « linux_raid_member » inconnu.

I’m dealing with 5 raid partitions.
Anyone familiar with this?

There’s a lvm2_member underneath sda3 and doing lvdisplay on it I get this.

[folaht@Stohrje-uq /]$ sudo lvdisplay
  WARNING: Unrecognised segment type tier-thin-pool
  WARNING: Unrecognised segment type thick
  WARNING: Unrecognised segment type flashcache
  WARNING: PV /dev/md2 in VG vg1 is using an old PV header, modify the VG to update.
  LV vg1/tp1, segment 1 invalid: does not support flag ERROR_WHEN_FULL. for tier-thin-pool segment.
  Internal error: LV segments corrupted in tp1.
  Cannot process volume group vg1

But I might be getting ahead of myself there, so I first want to understand what to do about raid partitions first.

The QNAP usually uses mdadm to build RAID.
See https://forum.qnap.com/viewtopic.php?f=25&t=159692

1 Like

I have an internal error. Is it still possible?

[folaht@Stohrje-uq ~]$ sudo vgscan
  WARNING: Unrecognised segment type tier-thin-pool
  WARNING: Unrecognised segment type thick
  WARNING: Unrecognised segment type flashcache
  WARNING: PV /dev/md125 in VG vg1 is using an old PV header, modify the VG to update.
  LV vg1/tp1, segment 1 invalid: does not support flag ERROR_WHEN_FULL. for tier-thin-pool segment.
  Internal error: LV segments corrupted in tp1.
  Cannot process volume group vg1
[folaht@Stohrje-uq ~]$ sudo lvscan
  WARNING: Unrecognised segment type tier-thin-pool
  WARNING: Unrecognised segment type thick
  WARNING: Unrecognised segment type flashcache
  WARNING: PV /dev/md125 in VG vg1 is using an old PV header, modify the VG to update.
  LV vg1/tp1, segment 1 invalid: does not support flag ERROR_WHEN_FULL. for tier-thin-pool segment.
  Internal error: LV segments corrupted in tp1.
  Cannot process volume group vg1

As per forum post, you need to use mdadm first.

1 Like

What of mdadm have I skipped?

[folaht@Stohrje-uq ~]$ sudo mdadm --assemble --scan
mdadm: No arrays found in config file or automatically
[folaht@Stohrje-uq ~]$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda           8:0    0   1,8T  0 disk
├─sda1        8:1    0 517,7M  0 part
│ └─md127     9:127  0 517,6M  0 raid1
├─sda2        8:2    0 517,7M  0 part
│ └─md123     9:123  0 517,7M  0 raid1
├─sda3        8:3    0   1,8T  0 part
│ └─md125     9:125  0   1,8T  0 raid1
├─sda4        8:4    0 517,7M  0 part
│ └─md124     9:124  0 448,1M  0 raid1
└─sda5        8:5    0     8G  0 part
  └─md126     9:126  0   6,9G  0 raid1
mmcblk0     179:0    0  29,8G  0 disk
├─mmcblk0p1 179:1    0 213,6M  0 part  /boot
└─mmcblk0p2 179:2    0  29,6G  0 part  /home
                                       /
zram0       253:0    0   2,7G  0 disk  [SWAP]
[folaht@Stohrje-uq ~]$ sudo cat /proc/mdstat
Personalities : [raid1]
md123 : active (auto-read-only) raid1 sda2[0]
      530112 blocks super 1.0 [2/1] [U_]
      bitmap: 1/1 pages [4KB], 65536KB chunk

md124 : active (auto-read-only) raid1 sda4[0]
      458880 blocks super 1.0 [64/1] [U_______________________________________________________________]
      bitmap: 1/1 pages [4KB], 65536KB chunk

md125 : active (auto-read-only) raid1 sda3[0]
      1943559616 blocks super 1.0 [1/1] [U]

md126 : active (auto-read-only) raid1 sda5[0]
      7235136 blocks super 1.0 [2/1] [U_]
      bitmap: 1/1 pages [4KB], 65536KB chunk

md127 : active (auto-read-only) raid1 sda1[0]
      530048 blocks super 1.0 [64/1] [U_______________________________________________________________]
      bitmap: 1/1 pages [4KB], 65536KB chunk

unused devices: <none>
[folaht@Stohrje-uq ~]$ sudo fdisk -l /dev/md125
Disque /dev/md125 : 1,81 TiB, 1990205046784 octets, 3887119232 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 4096 octets
taille d'E/S (minimale / optimale) : 4096 octets / 4096 octets
[folaht@Stohrje-uq ~]$ sudo mkdir /mnt/raid
[folaht@Stohrje-uq ~]$ sudo mount /dev/md125 /mnt/raid
mount: /mnt/raid: type de système de fichiers « LVM2_member » inconnu.
1 Like

This is hard problem to solve, as I can see there:

You need to contact a QNAP support. I would not able to guide you through using a custom Linux kernel and modified system tools.
The other way - you need a working QNAP to be able to recover and read disks, because QNAP used a custom lvm2, which they are not pushed back to open source community.

Let’s try the last attempt (taken from https://forum.qnap.com/viewtopic.php?f=25&t=143408&start=15#p702846):

sudo pvscan

and

sudo vgdisplay

It is a one way trip, once you will have remove the drive, you will NEVER be able to replug it and recover the content from your NAS.

I removed the drive thinking I’m just going to recover it from an external harddrive.
So if this is the case, I will consider all contents lost.

Luckily I made a copy of the identity files.

This is will not help, if data is lost. You need both - identity and data. One without other is useless.
As soon as you bring your identity with empty storage - it will be disqualified almost instantly.

Let’s try to recover your data anyway. What do these commands return?

I believe that that is now too late.

I misinterpreted your

Let’s try the last attempt

as “Here is some links, but really, this is unsalvageable”.

Especially after pvscan

[folaht@Stohrje-uq ~]$ sudo pvscan
  WARNING: Unrecognised segment type tier-thin-pool
  WARNING: Unrecognised segment type thick
  WARNING: Unrecognised segment type flashcache
  WARNING: PV /dev/md125 in VG vg1 is using an old PV header, modify the VG to update.
  LV vg1/tp1, segment 1 invalid: does not support flag ERROR_WHEN_FULL. for tier-thin-pool segment.
  Internal error: LV segments corrupted in tp1.
  Cannot process volume group vg1
  No matching physical volumes found

resulted in the same internal error.

I’ve already formatted the disk to ext4.
I have not yet brought my identity to an empty storage.

If it’s disqualified, what about the payout from previous months?

What’s the best thing for me to do?

Why didn’t you get another QNAP to try to restore your data. I haven’t run QNAP, but if you use a Synology and the NAS died, get another Synology NAS, pop in the drives and let it rebuild the array.

Because I paid money for that QNAP and it died rather quick.
I’m no longer paying for any new NAS server. I’m going to use a raspberry from now on.

:frowning: I’m sorry. But don’t you have warranty on QNAP?

So, you can either wait when the fee would be low enough to sent a terminal wallet balance via L1, or opt-in for zkSync and receive the outstanding payout (to opt-in you need to bring your identity online to commit the wallet option to the satellites).

The warranty usually too short for such devices, and I think it’s ended for @folaht

I just want to bring my identity back online and continue like before, despite maybe a month loss. Is that possible?

No, it will commit the change to the satellites and will be disqualified for lost data a short time after.

Okay, I guess I will have to start over again on a new identity then?

So after 4/5 months I have zero money made.

You can opt-in for zkSync to receive all outstanding payout, or use the same wallet on a new node.
It should gather enough somewhere in the future to be paid via L1.

A new node?
After 4/5 months of not even earning a dollar equivalent I’m going to have to start a new node?

By that time competitors will have launched better products with better payout models.

I’m sorry, but I’m drawing the line here.
I’m out.

I still wish you good luck with the project Alexey!

Then I would recommend to opt-in for zkSync to receive all outstanding payout, otherwise I’m afraid it could take a long time when the small amount could be sent via Ethereum.

Thank you for the participation in the network!
I’m sorry that your NAS is died and the vendor is locked you in.

4 Likes