You are not logged in.

#1 2014-06-14 10:33:52

bitbjorn
Member
Registered: 2014-05-03
Posts: 16

How do I recover data from a Software RAID partition

I have an (unreliable) computer with some kind of hardware problem. This system runs Arch Linux and have 2 hard drives with software raid configured on two partitions (one on each drive). What I want to do now is to save the data on this partition. Since the computer can crash due to hardware problem I removed one of the drives and inserted into an external USB adapter and connect to another computer and planned to copy onto that computer.
The question is how I mount this partition on this computer?

I've tried to follow the procedure on this link:
http://www.linuxjournal.com/article/8874?page=0,1

I can see the partitions on the disk

$ sudo sfdisk -l /dev/sdb

Disk /dev/sdb: 121601 cylinders, 255 heads, 63 sectors/track
sfdisk: Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          0+ 115074- 115075- 924333056   fd  Linux raid autodetect
/dev/sdb2   * 115074+ 115128-     55-    439612   83  Linux
/dev/sdb3     115129+ 121600    6472-  51986310    5  Extended
/dev/sdb4          0       -       0          0    0  Empty
/dev/sdb5     115129+ 121600    6472-  51986309   83  Linux

I load the md-mod module:

$ sudo modprobe md-mod

But I don't get any result when I scan disk for RAID members:

$ mdadm --examine --scan /dev/sdb1 /dev/sdb2 /dev/sdb3
$ 

Anyone know whats wrong or any other way to do what I want?

Offline

#2 2014-06-14 19:19:42

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: How do I recover data from a Software RAID partition

If you are talking about Raid 1, and the data is identical on each drive (and the drives are unencrypted), can't you just mount in on another machine and copy the data across?

You don't need to recreate the RAID array to access the data itself; you'd only need to do that to continue to write to the array.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-06-22 17:11:50

bitbjorn
Member
Registered: 2014-05-03
Posts: 16

Re: How do I recover data from a Software RAID partition

jasonwryan wrote:

If you are talking about Raid 1, and the data is identical on each drive (and the drives are unencrypted), can't you just mount in on another machine and copy the data across?

You don't need to recreate the RAID array to access the data itself; you'd only need to do that to continue to write to the array.

If I try to just mount I get this:

$ sudo mount -o ro /dev/sdb1 mounts/test/
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

That's why I thought I need to create the RAID array to access the data.

Maybe there is something else that is wrong.

In dmesg I can see the following messages:

[40119.465750] sdb: partition table partially beyond EOD, enabling native capacity
[40119.466175] sd 6:0:0:0: [sdb] 244190646 4096-byte logical blocks: (1.00 TB/931 GiB)
[40119.467087]  sdb: sdb1 sdb2 sdb3 < >
[40119.467089] sdb: partition table partially beyond EOD, truncated
[40119.467091] sdb: p1 size 14789328896 extends beyond EOD, truncated
[40119.467191] sdb: p2 start 14789345280 is beyond EOD, truncated
[40119.467193] sdb: p3 start 14796379560 is beyond EOD, truncated
[40119.467527] sd 6:0:0:0: [sdb] 244190646 4096-byte logical blocks: (1.00 TB/931 GiB)

Is this related to the error I get when I try to mount it?

Offline

#4 2014-06-22 17:26:00

bitbjorn
Member
Registered: 2014-05-03
Posts: 16

Re: How do I recover data from a Software RAID partition

If I try the other drive from the raid-array I get the following:

$ sudo sfdisk -l /dev/sdb

Disk /dev/sdb: 121601 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          0+ 115074- 115075- 924333056   fd  Linux raid autodetect
/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
$ 
$ sudo mount /dev/sdb1 mounts/komplett/
mount: unknown filesystem type 'linux_raid_member'
$ 

Offline

Board footer

Powered by FluxBB