Page 1 of 1

Recovering Data

Posted: Wed Sep 30, 2009 12:00 pm
by Misam Shah

I had Ubuntu 6.06 machine with 2 Sata drives on which software RAID was installed (I forgot whether it was RAID0 or RAID1). Unfortunately the system crashed and I did not have the backup of data. I am trying to recover the old data of /home folder which holds all the data of users.

I plugged the drive with the Sata to USB cable on Ubuntu but while mounting it shown the error of wrong fstype.

I have not formatted the drives as yet, how can I recover the data? Please help.

Misam Shah

Posted: Wed Sep 30, 2009 12:59 pm
by lambda
well, how did the system crash? did a hard drive fail? how had you set up raid? did you use mdadm? if it's raid 0, you definitely need both drives plugged in to access the data.

Posted: Wed Sep 30, 2009 2:02 pm
by Misam Shah
Yes one of the drive failed, and I remember that I used mdadm. Is there any chance?? :(

Posted: Thu Oct 01, 2009 9:54 am
by lambda
again: raid 0 or raid 1? if it was raid 0, there's no chance at all of recovering all your data. what does

Code: Select all

mdadm --detail --scan

Posted: Mon Oct 05, 2009 10:56 am
by Misam Shah
Well brother, I've now plugged the disk with Ubuntu. But this command is not showing any messages
mdadm --detail --scan

If I run fdisk -l it shows this

Device Boot Start End Blocks Id System
/dev/sda1 1 62 497983+ fd Linux raid autodetect
/dev/sda2 63 548 3903795 fd Linux raid autodetect
/dev/sda3 549 6627 48829567+ fd Linux raid autodetect
/dev/sda4 6628 19457 103056975 fd Linux raid autodetect

and on mounting it is showing this

mount -l /dev/sda4 /media/bk4
mount: you must specify the filesystem type

Posted: Mon Oct 05, 2009 1:16 pm
by lambda
assuming it's an ext3 filesystem, what does "mount -t ext3 /dev/sda4 /mnt" say?
what are the last few lines in the output of "dmesg" after you try to mount it?

Posted: Mon Oct 05, 2009 1:44 pm
by lambda
i found a page that said

Code: Select all

mdadm -A -R /dev/md0 /dev/sda4
mount -o ro /dev/md0 /mnt

Posted: Tue Oct 06, 2009 6:24 pm
by eternal peace
First change partition type of all your four partitions to 83 (Linux) from fd (linux raid) and then try to mount partition normally.

Another solution is to simply boot the system with both drives using Ubuntu Live CD which will automatically detect your raid partitions, To check do this,

cat /proc/mdstat

and then mount the respective raid device and backup your data.

Posted: Thu Oct 08, 2009 9:52 am
by Misam Shah
Thanks for your replies and sorry for the delay.
Well brother lambda i tried this

what does "mount -t ext3 /dev/sda4 /mnt" say?

It said
Wrong fs type, bad option, bad superblock on /dev/sda4,
missing codepage or other error ..... try dmesg

and on dmesg it shows
VFS: Can't find ext3 filesystem on dev sda4

I've plugged the Sata HDD back to my system and have booted the system with Ubuntu 7.04 whereas the system to be recovered has Ubuntu 6.06

Posted: Thu Oct 08, 2009 10:32 am
by lambda
what about the other things i wrote? did you try them?

Posted: Thu Oct 08, 2009 11:18 am
by Misam Shah
Here you are sir.

mdadm -A -R /dev/md0 /dev/sda4

mdadm: no RAID superblock on /dev/sda4
mdadm: /dev/sda4 has no superblock - assembly aborted

:( What to do now??