Corrupt superblock or partition table

How to use TestDisk to recover lost partition
Post Reply
Message
Author
SirDakkon
Posts: 2
Joined: 15 Jan 2016, 13:29

Corrupt superblock or partition table

#1 Post by SirDakkon » 15 Jan 2016, 14:45

Hello,

I have some problems with the partitions on my NAS (QNAP 431) and I wonder whether Testdisk might be able to solve it.

What happened?
I migrated from an RAID 1 setup to an RAID 5 setup (not via shell but via an NAS inbuilt GUI). On a first glance everything seems to be ok.

Code: Select all

mdadm --detail /dev/md1
        Version : 1.0
  Creation Time : Thu Dec 31 01:56:55 2015
     Raid Level : raid5
     Array Size : 5840623232 (5570.05 GiB 5980.80 GB)
  Used Dev Size : 2920311616 (2785.03 GiB 2990.40 GB)
   Raid Devices : 3
  Total Devices : 3
    Persistence : Superblock is persistent

    Update Time : Tue Jan  5 19:23:37 2016
          State : clean
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           Name : 1
           UUID : 553fe61b:9f23ed34:d2d6c2d4:9b2a59cf
         Events : 10759

    Number   Major   Minor   RaidDevice State
       0       8        3        0      active sync   /dev/sda3
       2       8       19        1      active sync   /dev/sdb3
       3       8       35        2      active sync   /dev/sdc3
However, I am not longer able to mount the volume.

Code: Select all

[/] # mdadm -A /dev/md1 /dev/sd[a-c]3
mdadm: /dev/sda3 is busy - skipping
mdadm: /dev/sdb3 is busy - skipping
mdadm: /dev/sdc3 is busy - skipping
I did some googling and a helpful person from the qnap forums (thread is in german) suggested that the RAID is active but most probably has a broken filesystem due to errors during the resize.

Code: Select all

[/] # e2fsck -v -f /dev/mapper/cachedev1
e2fsck 1.42.6 (21-Sep-2012)
The filesystem size (according to the superblock) is 986873856 blocks
The physical size of the device is 724834304 blocks
Either the superblock or the partition table is likely to be corrupt!
Several posts refer to TestDisk, but I did not find the find the courage to try it out (since there is some precious data on my RAID). Hence, before trying I thought I'd ask the experts whether TestDisk might be suitable for this problem.

I'd appreciate any help and suggestions you might have. Thanks a lot.
Last edited by SirDakkon on 16 Jan 2016, 23:18, edited 2 times in total.

Sponsored links

User avatar
cgrenier
Site Admin
Posts: 3694
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Corrupt superblock or partition table

#2 Post by cgrenier » 16 Jan 2016, 09:41

You can try to migrate back to Raid 1, copy your data, recreate the Raid, reformat and restore your files.

SirDakkon
Posts: 2
Joined: 15 Jan 2016, 13:29

Re: Corrupt superblock or partition table

#3 Post by SirDakkon » 16 Jan 2016, 23:45

Hello Christophe and thanks for your reply,

unfortunately I think I'm not able to just revert to the former state. The migration to RAID 5 was complete (at least according to the GUI and the mdadm output) but I do not have access to the volume due to corrupt superblock or partition table.

I tried to manually use alternative superblocks via "e2fsck -b". However, this did not work since e2fsck was not able to set the alternative superblock flag.

Code: Select all

# e2fsck -b 644972544 /dev/mapper/cachedev1
e2fsck 1.42.6 (21-Sep-2012)
DataVol1: recovering journal
e2fsck: unable to set superblock flags on DataVol1

DataVol1: ***** FILE SYSTEM WAS MODIFIED *****

DataVol1: ********** WARNING: Filesystem still has errors **********
Right now, I'm running PhotoRec to backup the data (should have done a proper backup way earlier). This will take some time (it's 3 TB of data). But it will also give me time to look for possible solutions :-) Of course, I'd appreciate any futher suggestions you might have.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest