LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Recovering data from MD array (using Knoppix) (https://www.linuxquestions.org/questions/linux-software-2/recovering-data-from-md-array-using-knoppix-884077/)

leosgb 06-02-2011 12:53 AM

Recovering data from MD array (using Knoppix)
 
Hi all,

I have been searching the forums w/o success for some help on this old problem I have. I had a major OS crash (Gentoo) maybe 2 months ago and completely neglected my system. Now I want to recover all my mirror raid data back so that I can restore the system.

My plan is this:
1) copy all data so that I can have a backup
2) rebuild system with some HW upgrades

First step is to get the data out. I managed to boot with Knoppix and I have full access to my ext2 partitions. My mistake was to create the mirror partitions and these are not working now.

I copied my /etc/mdadm.conf into /etc/mdadm/mdadm.conf in Knoppix and then tried to start the services. This is what I got:

knoppix@Microknoppix:~$ /etc/init.d/mdadm start
knoppix@Microknoppix:~$ /etc/init.d/mdadm-raid start
Assembling MD arrays...failed (failed to load MD subsystem).

I can see the partitions:
knoppix@Microknoppix:~$ fdisk -l

Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0004a60f

Device Boot Start End Blocks Id System
/dev/sda1 1 12450 100004593+ 83 Linux
/dev/sda2 * 12451 12459 72292+ 83 Linux
/dev/sda3 17432 29881 100004625 83 Linux
/dev/sda4 12460 12584 1004062+ 82 Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdb: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 1 31125 250011531 fd Linux raid autodetect
/dev/sdb2 31126 41086 80011732+ fd Linux raid autodetect
/dev/sdb3 41087 48641 60685537+ fd Linux raid autodetect
knoppix@Microknoppix:~$ sudo mount /dev/sdb1 /mnt/sdb/
mount: unknown filesystem type 'mdraid'

These are my current ideas:

1) Can I change the filesystem type from mdraid to ext2 or ext3 safely?

2) How can I mount these raid filesystems so that I can copy my data?

Thanks for any help!

leosgb 06-02-2011 01:15 AM

I got it. Now I am copying it by hand. This is how I mounted the partitions:

knoppix@Microknoppix:~$ sudo mount -o ro /dev/sdb2 /mnt/sdb2 -t ext3
knoppix@Microknoppix:~$ sudo mount -o ro /dev/sdb3 /mnt/sdb3 -t ext3

ButterflyMelissa 06-02-2011 01:16 AM

As simple as that...tnx for this solution!

Luck with the rebuild!

Thor


All times are GMT -5. The time now is 05:23 PM.