# How to recover RAID5 taken from QNAP on Raspberry Pi

**URL:** <https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509>\
**Category:** troubleshooting\
**Tags:** raid, raspberry, qnap-nas\
**Created:** [July 6, 2021, 5:50am UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509 "2021-07-06T05:50:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![folaht](https://storj.bcdn.literatehosting.com/letter_avatar/folaht/32/5_5575768a8748004e209b776fc1b2916d.png) [@folaht](https://forum.storj.io/u/folaht)\
**Post date:** [July 6, 2021, 5:50am UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/1 "2021-07-06T05:50:01Z")

</div>

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

```auto
[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

```

```auto
[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.

```nohighlight
[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.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [July 6, 2021, 6:47am UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/2 "2021-07-06T06:47:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![folaht](https://storj.bcdn.literatehosting.com/letter_avatar/folaht/32/5_5575768a8748004e209b776fc1b2916d.png) [@folaht](https://forum.storj.io/u/folaht)\
**Post date:** [July 8, 2021, 3:21pm UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/3 "2021-07-08T15:21:42Z")

</div>

I have an internal error. Is it still possible?

```auto
[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

```

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [July 8, 2021, 6:39pm UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/4 "2021-07-08T18:39:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![folaht](https://storj.bcdn.literatehosting.com/letter_avatar/folaht/32/5_5575768a8748004e209b776fc1b2916d.png) [@folaht](https://forum.storj.io/u/folaht)\
**Post date:** [July 8, 2021, 6:55pm UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/5 "2021-07-08T18:55:44Z")

</div>

What of mdadm have I skipped?

```auto
[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.

```

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [July 8, 2021, 7:39pm UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/6 "2021-07-08T19:39:07Z")

</div>

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

- [https://forum.qnap.com/viewtopic.php?t=93862&start=15#p500457](https://forum.qnap.com/viewtopic.php?t=93862&start=15#p500457)
- [https://forum.qnap.com/viewtopic.php?t=147495](https://forum.qnap.com/viewtopic.php?t=147495)
- [https://www.reddit.com/r/qnap/comments/k2zzux/qnap\_ts431p\_successfull\_recovery\_of\_iscsi\_lun/](https://www.reddit.com/r/qnap/comments/k2zzux/qnap_ts431p_successfull_recovery_of_iscsi_lun/)

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](https://forum.qnap.com/viewtopic.php?f=25&t=143408&start=15#p702846)):

```auto
sudo pvscan

```

and

```auto
sudo vgdisplay

```

---

<div class="post-metadata">

**Author:** ![folaht](https://storj.bcdn.literatehosting.com/letter_avatar/folaht/32/5_5575768a8748004e209b776fc1b2916d.png) [@folaht](https://forum.storj.io/u/folaht)\
**Post date:** [July 9, 2021, 6:55am UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/7 "2021-07-09T06:55:23Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [July 9, 2021, 8:03am UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/8 "2021-07-09T08:03:32Z")

</div>

> [@folaht](#):
>
> 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?

---

<div class="post-metadata">

**Author:** ![folaht](https://storj.bcdn.literatehosting.com/letter_avatar/folaht/32/5_5575768a8748004e209b776fc1b2916d.png) [@folaht](https://forum.storj.io/u/folaht)\
**Post date:** [July 9, 2021, 10:19am UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/9 "2021-07-09T10:19:57Z")

</div>

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`

```auto
[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?

---

<div class="post-metadata">

**Author:** ![Iigloo](https://storj.bcdn.literatehosting.com/letter_avatar/iigloo/32/5_5575768a8748004e209b776fc1b2916d.png) [@Iigloo](https://forum.storj.io/u/Iigloo)\
**Post date:** [July 9, 2021, 8:06pm UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/10 "2021-07-09T20:06:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![folaht](https://storj.bcdn.literatehosting.com/letter_avatar/folaht/32/5_5575768a8748004e209b776fc1b2916d.png) [@folaht](https://forum.storj.io/u/folaht)\
**Post date:** [July 9, 2021, 8:12pm UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/11 "2021-07-09T20:12:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Iigloo](https://storj.bcdn.literatehosting.com/letter_avatar/iigloo/32/5_5575768a8748004e209b776fc1b2916d.png) [@Iigloo](https://forum.storj.io/u/Iigloo)\
**Post date:** [July 10, 2021, 7:57am UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/12 "2021-07-10T07:57:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [July 10, 2021, 8:03am UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/13 "2021-07-10T08:03:15Z")

</div>

> [@folaht](#):
>
> If it’s disqualified, what about the payout from previous months?

> [@Feedback on Layer 2 Payouts](https://forum.storj.io/t/feedback-on-layer-2-payouts/13908/1):
>
> We propose to no longer close out terminal wallet balances. Many active node operators perhaps did not know we were even doing this, but it does affect nodes that are gracefully exiting. So, the proposal is instead, if you are interested in getting your final payment and your balance is less than the payment threshold, then you can either:  
> a. let us hang on to your balance for you if and until the payment threshold drops enough or the layer 1 technology advances, or  
> b. you can configure your node to opt into a lower-fee option such as zkSync.

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).

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [July 10, 2021, 8:05am UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/14 "2021-07-10T08:05:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![folaht](https://storj.bcdn.literatehosting.com/letter_avatar/folaht/32/5_5575768a8748004e209b776fc1b2916d.png) [@folaht](https://forum.storj.io/u/folaht)\
**Post date:** [July 10, 2021, 9:56am UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/15 "2021-07-10T09:56:23Z")

</div>

> [@Feedback on Layer 2 Payouts](https://forum.storj.io/t/feedback-on-layer-2-payouts/13908/1):
>
> (to opt-in you need to bring your identity online to commit the wallet option to the satellites)

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

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [July 10, 2021, 9:58am UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/16 "2021-07-10T09:58:34Z")

</div>

> [@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.

---

<div class="post-metadata">

**Author:** ![folaht](https://storj.bcdn.literatehosting.com/letter_avatar/folaht/32/5_5575768a8748004e209b776fc1b2916d.png) [@folaht](https://forum.storj.io/u/folaht)\
**Post date:** [July 10, 2021, 9:59am UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/17 "2021-07-10T09:59:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [July 10, 2021, 10:01am UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/18 "2021-07-10T10:01:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![folaht](https://storj.bcdn.literatehosting.com/letter_avatar/folaht/32/5_5575768a8748004e209b776fc1b2916d.png) [@folaht](https://forum.storj.io/u/folaht)\
**Post date:** [July 10, 2021, 9:36pm UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/19 "2021-07-10T21:36:18Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [July 11, 2021, 8:18am UTC](https://forum.storj.io/t/how-to-recover-raid5-taken-from-qnap-on-raspberry-pi/14509/20 "2021-07-11T08:18:59Z")

</div>

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.
