Need to read files on QNAP HS-251+ drives

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
lenhen
Posts: 3
Joined: 07 Aug 2023, 07:28

Need to read files on QNAP HS-251+ drives

#1 Post by lenhen »

Hi,

I had a QNAP HS-251+ NAS configured with two SSD disks in a RAID 1 configuration. The QNAP died. Fortunately I had another QNAP HS-251+ so I could move the disks to the that one. Unfortunately the second QNAP died after a couple of months... So, I now only have the two SSD disks in my hand.

I made the two SSD disks available in my Linux box via USB and then installed testdisk. I've spent a couple of days trying to use testdisk-static to help me out, but with no success.

Linux view the disks (sdc and sdd) as RAID 1 and the LVM understands that data is managed as logical volumes. I strongly believe that the disks uses ext4 filsystems. However, the only logical volume identified is the small vg1-lv544, as can be seen below.

Code: Select all

sdc                        8:32   0 931.5G  0 disk  
├─sdc1                     8:33   0 517.7M  0 part  
│ └─md126                  9:126  0 517.6M  0 raid1 
├─sdc2                     8:34   0 517.7M  0 part  
│ └─md125                  9:125  0 517.7M  0 raid1 
├─sdc3                     8:35   0   922G  0 part  
│ └─md127                  9:127  0   922G  0 raid1 
│   └─vg1-lv544          253:3    0   9.2G  0 lvm 
├─sdc4                     8:36   0 517.7M  0 part  
│ └─md124                  9:124  0 448.1M  0 raid1 
└─sdc5                     8:37   0     8G  0 part  
  └─md123                  9:123  0   6.9G  0 raid1 
  sdd                        8:48   0 931.5G  0 disk  
├─sdd1                     8:49   0 517.7M  0 part  
│ └─md126                  9:126  0 517.6M  0 raid1 
├─sdd2                     8:50   0 517.7M  0 part  
│ └─md125                  9:125  0 517.7M  0 raid1 
├─sdd3                     8:51   0   922G  0 part  
│ └─md127                  9:127  0   922G  0 raid1 
│   └─vg1-lv544          253:3    0   9.2G  0 lvm
├─sdd4                     8:52   0 517.7M  0 part  
│ └─md124                  9:124  0 448.1M  0 raid1 
└─sdd5                     8:53   0     8G  0 part  
  └─md123                  9:123  0   6.9G  0 raid1 
When using lvdisplay --maps it finds the two logical volumes /dev/vg1/lv1 and /dev/vg1/lv2, but they are NOT available.

Code: Select all

  --- Logical volume ---
  LV Path                /dev/vg1/lv1
  LV Name                lv1
  VG Name                vg1
  LV UUID                eBtmAQ-VRFq-OQ30-a90c-TSGF-fPIT-mv5vz2
  LV Write Access        read/write
  LV Creation host, time NASF7596E, 2015-12-31 19:11:17 +0100
  LV Pool name           tp1
  LV Status              NOT available
  LV Size                <448.39 GiB
  Current LE             114787
  Segments               1
  Allocation             inherit
  Read ahead sectors     8192
   
  --- Segments ---
  Virtual extents 0 to 114786:
    Type		thin
    Device ID		1
   
   
  --- Logical volume ---
  LV Path                /dev/vg1/lv2
  LV Name                lv2
  VG Name                vg1
  LV UUID                DwF5qw-KMXO-sRbE-Gm5a-fP4J-mbp0-ptLcwu
  LV Write Access        read/write
  LV Creation host, time Honne, 2016-01-06 15:36:10 +0100
  LV Pool name           tp1
  LV Status              NOT available
  LV Size                <446.54 GiB
  Current LE             114314
  Segments               1
  Allocation             inherit
  Read ahead sectors     8192
   
  --- Segments ---
  Virtual extents 0 to 114313:
    Type		thin
    Device ID		2
I tried to make them available with a vgchange -ay vg1 but with no sucess. I get a "Manual repair required!" message and the volumes continous to be NOT available.

Code: Select all

Check of pool vg1/tp1 failed (status:1). Manual repair required! 
1 logical volume(s) in volume group "vg1" now active
I would be grateful if I could some help to access the files on these disks, to be more precise on /dev/sdc3/md127/vg1-lv1 and /dev/sdc3/md127/vg1-lv2.

If I new how to do it, I would have attached the output from a testdisk-static -lu command as well as the testdisk.log. I will try to find out how to do it...

Thanks in advance, Lennart Henang, Stockholm, Sweden

recuperation
Posts: 2737
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Need to read files on QNAP HS-251+ drives

#2 Post by recuperation »

For attachments use the attachments tab in the left corner on the bottom of the page.

lenhen
Posts: 3
Joined: 07 Aug 2023, 07:28

Re: Need to read files on QNAP HS-251+ drives

#3 Post by lenhen »

Many thanks for the tip. I must have overlooked that tab... Sorry about that!

Best regards, Len
testdisk.lu.txt
Output from testdisk-static -lu
(6.44 KiB) Downloaded 153 times
testdisk.log
The testdisk.log file
(94.22 KiB) Downloaded 145 times

recuperation
Posts: 2737
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Need to read files on QNAP HS-251+ drives

#4 Post by recuperation »

Lennart, unfortunately Testdisk cannot help in your case.

See the specs here:
https://www.cgsecurity.org/wiki/TestDisk

Your partitions on /dev/sdc and /dev/sdd span the whole disk. sdd looks like a copy of sdc. There are no holes between the partitions.
On a partition level, nothing seems to be necessary to recover.
This is where the abilities of Testdisk ends.

Other people would have simply formated the partitions.
You assumably have put one or two? layers on top and you are operating a RAID1 storage unit with LVM on top.
I don't know if the RAID layer was driven and/or generated by the firmware of your QNAP box by or MDADM tools or LVM.

The message
Check of pool vg1/tp1 failed (status:1). Manual repair required!
1 logical volume(s) in volume group "vg1" now active
is on LVM level, but can be caused by an error on a lower level as well.

Check both SSDs for SMART errors:
viewtopic.php?f=5&t=10910

If you created your storage setup yourself, buy the QNAP box again, put in two disk (size doesn't matter) try to recreate your original setup so that you are able to compare the differences in config files between the new box and the broken one.

I have no experience with MDADM and LVM under Linux, keep that in mind when reading my hints!

lenhen
Posts: 3
Joined: 07 Aug 2023, 07:28

Re: Need to read files on QNAP HS-251+ drives

#5 Post by lenhen »

Many thanks for your support!

As you point out the sdc and sdd disks are copies of each other. This is due to the fact that they have been configured with RAID 1 in the QNAP box.

Since the disks are not in any way corrupt there is no need for recovering the partitions (please see attached output from smartctl).

What happened was that the QNAP box just died on me, so it is a hardware problem in the box that makes it impossible for me to get at the data - by using the QNAP box. And yes, it would have been an option to buy another QNAP HS-251+ box and put in the disks in it - but it's sold anymore (it's from 2015) and it would be too expensive just to be able to read the disks once. I would not act as "other people" formatting the partitions, then the data would be gone...

The net of this is that I found that testdisk can read other partitions on the disks - as long as it has detected that the partiton has an ext4 filsystem on it - and I can copy files from it to my hard disk. In my case though, the partition is a volume in a volume group created by LVM in the Linux derivative running in the QNAP box. And testdisk finds out about that, but it does not let me read the files in these volumes. When trying to activate the pool my Linux box claims that it requires a manual repair. But it doesn't say what should be reparied and how to do the manual repair... So, it might be a Linux challenge to get the volumes to be activated in the volume group vg1. Maybe some Linux savvy people can help me out with that.

My thought was that I've done something wrong when using testdisk, but as I mentioned earlier I spent a couple of days with trial and error after reading the documentation. And probably, the problem is on a lower level than testdisk can manage.

Best regards, Len
sdcSMART.txt
smartctl output for sdc
(4.2 KiB) Downloaded 137 times
sdcSMART.txt
smartctl output for sdc
(4.2 KiB) Downloaded 137 times
Attachments
sddSMART.txt
smartctl output for sdd
(4.2 KiB) Downloaded 134 times

Locked