Recover data from RAID-1 (Seagate NAS 440)

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
^rooker
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

Recover data from RAID-1 (Seagate NAS 440)

Post by ^rooker »

The disks were configured, used and marked as failed by a Seagate NAS 440.

Mounting the disks (using grml) worked as follows:

1) Partition type is "GPT":
Running "fdisk /dev/sda" showed the following partition table:
Device Boot Start End Blocks Id System
/dev/sda1 1 243202 1953514583+ ee GPT
Therefore, you must use "gdisk" to see the real partition table:
gdisk /dev/sda
Listing the partition table (shortcut "p") returns the following:
Number Start (sector) End (sector) Size Code Name
1 195312 2283203 1019.5 MiB FD00
2 2283204 4373046 1020.4 MiB FD00
3 4373047 5416015 509.3 MiB FD00
4 5416016 3907019855 1.8 TiB FD00
2) Linux RAID member:
When trying to mount the data partition (/dev/sda4), the following error appeared:
mount: unknown filesystem type 'linux_raid_member'
Ok. So it's a Linux soft-raid... Fine.

http://serverfault.com/questions/383362 ... aid-member
http://www.linuxquestions.org/questions ... sk-723225/

/proc/mdstat didn't list any softraid volumes, so they have to be scanned for:

Code: Select all

mdadm --assemble --scan
Which then returns the following:
mdadm: /dev/md0 has been started with 1 drive (out of 4).
mdadm: /dev/md1 has been started with 1 drive (out of 4).
mdadm: /dev/md2 has been started with 1 drive (out of 4).
mdadm: /dev/md3 has been started with 1 drive (out of 2).
3) Inside the RAID there's a LVM. Let's activate it!
The 4 softraid partitions now show up as /dev/mdx, where in our case the data-partition is "/dev/md4".

Still can't mount it, because:
mount: unknown filesystem type 'LVM2_member'
So I ran "lvdisplay", which said there are no LVM volumes currently known.
No problem: scan for them, using "pvscan":

Code: Select all

pvscan
Then they should show up when running "lvdisplay", like this:
--- Logical volume ---
LV Name /dev/vg1/lv1
VG Name vg1
LV UUID R3d1Lw-RW46-FDv5-zZW2-D1zW-gYpS-Mo7z7e
LV Write Access read/write
LV Status NOT available
# open 0
LV Size 1,82 TiB
Current LE 476269
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:4
We have to enable it, as it says:
LV Status NOT available
You can do this, using "vgchange":

Code: Select all

vgchange -a y
Afterwards, running "lvdisplay" returns the same information as above, but now with:
LV Status available
Now the device should show up as "/dev/vg1/lv1".

4) Mount it!
Now, we've unpealed all required onion layers and we're ready to mount:

Code: Select all

mount -o ro /dev/vg1/lv1 /mnt/whatever
As we're dealing with data-rescue here, it's a very (very!) good idea to mount it readonly (-o ro).
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply