# [Solved]Reading a raided disc in another system?

## Letharion

A server caught a hardware problem a few days ago.

The server had two 1.5TiB drive in software raid 1, and the guy who set that up isn't around anymore.

Now I have one of those drives in my system and have been asked to read the data from it.

I don't have much experience with raid-systems, so I'm not sure what I need to be able to read it,

I assume that on the "system" disc the server kept some sort of record that would be useful/necessary?

fdisk reports "Disk /dev/sdb doesn't contain a valid partition table".

I found some information here: http://superuser.com/questions/83923/can-a-mirrored-raid-1-disk-be-plugged-into-another-system-to-be-read that basically says I should be able to plug it in and read it.

"in the case of software raid in Linux (md+raid1) then yes, there's no disk header or secret block-level optimization going on there"

But then the gentoo wiki says:

"do not try to mount elements of the RAID 1 separately...can make the RAID 1 as a whole unmountable."

So, where do I start?  :Smile: Last edited by Letharion on Tue Oct 26, 2010 2:56 pm; edited 1 time in total

----------

## richard.scott

It could be that he didn't create any partitions on the two disks, and just raid-1'd the whole thing.

plug in the disk to a new system and try this:

```
mdadm --examine --scan /dev/sda
```

where /dev/sda is the device name of the disk you want to check.

You should see something like this:

```
# mdadm --examine --scan /dev/sda

ARRAY /dev/md0 UUID=13d3ce8c:2544d8de:577b071e:1687b53f
```

This is good, as it means the device has a RAID superblock.

If this is the same for both devices, you can use this to re-assemble the raid:

```
mdadm --assemble /dev/md3 /dev/sda /dev/sdb
```

Now, the /dev/md3 device needs to be the next number device available. To check use this command:

```
# cat /proc/mdstat

Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear]

md0 : active raid1 hdb1[0] hda1[1]

      96256 blocks [2/2] [UU]

md1 : active raid1 hdb2[0] hda2[1]

      2000000 blocks [2/2] [UU]

md2 : active raid1 hdb3[0] hda3[1]

      486287424 blocks [2/2] [UU]

unused devices: <none>
```

As you can see, from my system md3 is the next available device so I will need to use /dev/md3 when assembling it.

This will then create a /dev/md3 device that you can then mount:

```
# mkdir /mnt/raid

# mount /dev/md3 /mnt/raid
```

Once you have that, you should be able to see your data.

Hope this helps.

Rich

----------

## Letharion

```
# mdadm --examine --scan /dev/sdb

ARRAY /dev/md0 UUID=87f422b7:49a82cf4:d24c74ac:60e22e5f
```

Looks good  :Smile: 

So I can't read the data without the other disc then? It's in another facility unfortunately, so I can't try it right now.

Thanks a lot for helping me out  :Smile: 

----------

## richard.scott

 *Letharion wrote:*   

> So I can't read the data without the other disc then? 

 

You could try this:

```
# mdadm --assemble /dev/md3 --run /dev/sdb
```

That may force it to start with only one disk.

Rich

----------

## Letharion

The wording "may", and "force" combined with my in-experience makes me wanna be careful  :Wink: 

No ones gonna be breathing down my neck over this for quite a while, so I'll wait til I get hold of the other harddrive.

----------

## depontius

I believe you can use the keyword "missing" when you assemble a RAID:

```
mdadm --assemble /dev/md3 /dev/sda missing
```

Then later you can add an extra drive, if that's what you're doing.  I run a RAID-1 on 2 channels of a Promise card, and a few years back I lost one channel.  A few days gyration and I was back running, with the second drive replacing the cdrom on the 2nd channel on the motherboard.

----------

## Uli Sing

In some cases

```
mount -t auto -o ro /dev/sdb /mountpoint
```

might work and could be done without causing damages.  :Very Happy:   :Very Happy:   :Very Happy: 

Probably you have to test some possible types of file systems to succeed.

e. g.

```
mount -t ext3 -o ro /dev/sdb /mountpoint
```

----------

## Letharion

Got the other drive, their UUIDs matched, they are assembled and mounted. Worked great. Thank you so much.  :Smile: 

----------

