Linux – Accessing a broken mdadm raid

hard drivelinuxmdadm

I used a western digital mybookworld (SOHO NAS storage using Linux) as backup for my Linux box. Suddenly, the mybookworld does not boot up any more. So I opened the box, removed the hard disk and put the hard disk into an external USB HDD case, and connected it to my Linux box.

[  530.640301] usb 2-1: new high speed USB device using ehci_hcd and address 3
[  530.797630] scsi7 : usb-storage 2-1:1.0
[  531.794844] scsi 7:0:0:0: Direct-Access     WDC WD75 00AAKS-00RBA0         PQ: 0 ANSI: 2
[  531.796490] sd 7:0:0:0: Attached scsi generic sg3 type 0
[  531.797966] sd 7:0:0:0: [sdc] 1465149168 512-byte logical blocks: (750 GB/698 GiB)
[  531.800317] sd 7:0:0:0: [sdc] Write Protect is off
[  531.800327] sd 7:0:0:0: [sdc] Mode Sense: 38 00 00 00
[  531.800333] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[  531.803821] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[  531.803836]  sdc: sdc1 sdc2 sdc3 sdc4
[  531.815831] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[  531.815842] sd 7:0:0:0: [sdc] Attached SCSI disk

The dmesg output looks normal, but I was wondering why the hardisk was not mounted at all. And why there are 4 different partitions on it. fdisk showed the following:

root@ubuntu:/home/ubuntu# fdisk /dev/sdc

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): p

Disk /dev/sdc: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00007c00

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               4         369     2939895   fd  Linux raid autodetect
/dev/sdc2             370         382      104422+  fd  Linux raid autodetect
/dev/sdc3             383         505      987997+  fd  Linux raid autodetect
/dev/sdc4             506       91201   728515620   fd  Linux raid autodetect

Oh no! Everything seems to be created as a mdadm software raid. Calling mdadm –examine with the different partitions seems to affirm that.

I think the only partition I am interested in, is /dev/sdc4 (because it is the largest). But nevertheless I called mdadm –examine with every partition.

root@ubuntu:/home/ubuntu# mdadm --examine /dev/sdc1 
/dev/sdc1:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 5626a2d8:070ad992:ef1c8d24:cd8e13e4
  Creation Time : Wed Feb 20 00:57:49 2002
     Raid Level : raid1
  Used Dev Size : 2939776 (2.80 GiB 3.01 GB)
     Array Size : 2939776 (2.80 GiB 3.01 GB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 1

    Update Time : Sun Nov 21 11:05:27 2010
          State : clean
 Active Devices : 1
Working Devices : 1
 Failed Devices : 1
  Spare Devices : 0
       Checksum : 4c90bc55 - correct
         Events : 16682


      Number   Major   Minor   RaidDevice State
this     0       8        1        0      active sync   /dev/sda1

   0     0       8        1        0      active sync   /dev/sda1
   1     1       0        0        1      faulty removed

root@ubuntu:/home/ubuntu# mdadm --examine /dev/sdc2
/dev/sdc2:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 9734b3ee:2d5af206:05fe3413:585f7f26
  Creation Time : Wed Feb 20 00:57:54 2002
     Raid Level : raid1
  Used Dev Size : 104320 (101.89 MiB 106.82 MB)
     Array Size : 104320 (101.89 MiB 106.82 MB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 2

    Update Time : Wed Oct 27 20:19:08 2010
          State : clean
 Active Devices : 1
Working Devices : 1
 Failed Devices : 1
  Spare Devices : 0
       Checksum : 55560b40 - correct
         Events : 9884


      Number   Major   Minor   RaidDevice State
this     0       8        2        0      active sync   /dev/sda2

   0     0       8        2        0      active sync   /dev/sda2
   1     1       0        0        1      faulty removed

root@ubuntu:/home/ubuntu# mdadm --examine /dev/sdc3
/dev/sdc3:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 08f30b4f:91cca15d:2332bfef:48e67824
  Creation Time : Wed Feb 20 00:57:54 2002
     Raid Level : raid1
  Used Dev Size : 987904 (964.91 MiB 1011.61 MB)
     Array Size : 987904 (964.91 MiB 1011.61 MB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 3

    Update Time : Sun Nov 21 11:05:27 2010
          State : clean
 Active Devices : 1
Working Devices : 1
 Failed Devices : 1
  Spare Devices : 0
       Checksum : 39717874 - correct
         Events : 73678


      Number   Major   Minor   RaidDevice State
this     0       8        3        0      active sync

   0     0       8        3        0      active sync
   1     1       0        0        1      faulty removed

root@ubuntu:/home/ubuntu# mdadm --examine /dev/sdc4
/dev/sdc4:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : febb75ca:e9d1ce18:f14cc006:f759419a
  Creation Time : Wed Feb 20 00:57:55 2002
     Raid Level : raid1
  Used Dev Size : 728515520 (694.77 GiB 746.00 GB)
     Array Size : 728515520 (694.77 GiB 746.00 GB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 4

    Update Time : Sun Nov 21 11:05:27 2010
          State : clean
 Active Devices : 1
Working Devices : 1
 Failed Devices : 1
  Spare Devices : 0
       Checksum : 2f36a392 - correct
         Events : 519320


      Number   Major   Minor   RaidDevice State
this     0       8        4        0      active sync

   0     0       8        4        0      active sync
   1     1       0        0        1      faulty removed

If I read the output correctly everything was removed, because it was faulty. Is there ANY way to see the contents of the largest partition? Or seeing somehow which files are broken? I see that everything is raid1 which is only mirroring, so this should be a normal partition. I am anxious to do anything with mdadm, in fear that I destroy the data on the hard disk. I would be very thankful for any help.

Best Answer

Already tried to mount them as single disks? Maybe you have to guess which file system was used. Try reiserfs, ext3, ext4.