# Howto recover RAID1 disk from QNAP [SOLVED]

## luispa

Hi, 

A friend of mine gave me a disk from a QNAP box. He had 2 disks in Raid1 and it no longer works. 

I would like to try and mount this disk in my Gentoo and recover data from the partition.

It's a SATA disk (500GB) configured in Raid1. So I installed Raid support in my box, mdadm, etc.

The disk is recognized as /dev/sdb and fdisk reports its structure correctly. My interest is in the data partition (/dev/sdb3).

```

totobo ~ # fdisk /dev/sdb 

:

Command (m for help): p

Disk /dev/sdb: 500.1 GB, 500107862016 bytes

255 heads, 63 sectors/track, 60801 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1   *           1          66      530113+  83  Linux

/dev/sdb2              67         132      530145   82  Linux swap / Solaris

/dev/sdb3             133       60791   487243417+  83  Linux

/dev/sdb4           60792       60800       72292+  83  Linux

```

I actived the disk with:

```
mdadm --create /dev/md1 --level=1 --force --raid-devices=1 /dev/sdb3

```

Then I check that it's available:

```
totobo ~ # mdadm -D /dev/md1

/dev/md1:

        Version : 00.90.03

  Creation Time : Thu Dec  6 09:44:05 2007

     Raid Level : raid1

     Array Size : 487243328 (464.67 GiB 498.94 GB)

  Used Dev Size : 487243328 (464.67 GiB 498.94 GB)

   Raid Devices : 2

  Total Devices : 1

Preferred Minor : 1

    Persistence : Superblock is persistent

    Update Time : Sun Jul 27 14:59:12 2008

          State : clean, degraded

 Active Devices : 1

Working Devices : 1

 Failed Devices : 0

  Spare Devices : 0

           UUID : 47c8d283:caeba9e1:cb468c11:e7858f5e

         Events : 0.2569058

    Number   Major   Minor   RaidDevice State

       0       0        0        0      removed

       1       8       19        1      active sync   /dev/sdb3

```

However, when I try to mount it, I get this error: 

```
totobo ~ # mount /dev/md1 /mnt/lalo

mount: wrong fs type, bad option, bad superblock on /dev/md1,

       missing codepage or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

```

And Under dmesg:

```
EXT3-fs: md1: couldn't mount because of unsupported optional features (40).

```

Any help, idea or suggestion is very wellcome, as I have no experience in Raid disks and can't find an answer in google for this situation...

Thanks in advance, 

LuisLast edited by luispa on Mon Jul 28, 2008 6:05 am; edited 1 time in total

----------

## NeddySeagoon

luispa,

The ext3 filesystem on the raid has been made with some of the optional security features enabled in the kernel.

You will need to add these to your kernel. However, I'm not sure what that will do for any existing ext3 partitions of your own.

----------

## luispa

 *NeddySeagoon wrote:*   

> luispa,
> 
> The ext3 filesystem on the raid has been made with some of the optional security features enabled in the kernel.
> 
> You will need to add these to your kernel. However, I'm not sure what that will do for any existing ext3 partitions of your own.

 

Thanks for the info. 

I activated:

```
File systems-->Ext3 journalling file system support

 [*] Ext3 extended atributes

 [*]    Ext3 POSIX Access Control Lists

 [*]    Ext3 POSIX Security Labels

```

But unfortunately same error appears. Good new is that existing ext3 partitions are still working, so thanks for the advise. 

Any other tip you may think of?

**EDIT 1**

Found the extended features (that I don't have in my own ext3 partitions)

```
dumpe2fs -h /dev/md1

features: has_journal filetype extents sparse_super large_file

                               =======              ==========

```

extents and large_file seems to be the ones...

** EDIT 2**

Found also that QNAP is using ext3 with the extents and 48bit ext3 patch set, so making it incompatible with kernel mainline. Also found that someone was able to mount such partitions using EXT4 support. 

I'll try and report.

Thanks again

Luis

----------

## NeddySeagoon

luispa,

ext4 is under development be sure to use the read only option

----------

## robel

the raid has been made with some of the optional security features enabled in the kernel.

You will need to add these to your kernel.

----------

## luispa

Thanks to all again, 

I finally mounted it using ext4 which worked and recover most of the files. Didn't try to wite anything in the filesystem just in case  :Smile: 

Thanks again, 

Luis

----------

