Recovering Data

General discussion about Linux, Linux distribution, using Linux etc.
Post Reply
Misam Shah
Lance Naik
Posts: 32
Joined: Mon May 04, 2009 4:08 pm
Location: Hyderabad
Contact:

Recovering Data

Post by Misam Shah »

AOA,

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.

Thanks,
Misam Shah
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post 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.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Misam Shah
Lance Naik
Posts: 32
Joined: Mon May 04, 2009 4:08 pm
Location: Hyderabad
Contact:

Post by Misam Shah »

Yes one of the drive failed, and I remember that I used mdadm. Is there any chance?? :(
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post 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
say?
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Misam Shah
Lance Naik
Posts: 32
Joined: Mon May 04, 2009 4:08 pm
Location: Hyderabad
Contact:

Post 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
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post 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?
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

i found a page that said

Code: Select all

mdadm -A -R /dev/md0 /dev/sda4
mount -o ro /dev/md0 /mnt
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
eternal peace
Naik
Posts: 86
Joined: Thu Apr 03, 2003 6:44 pm

Post 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.
hail to linux!!!
Misam Shah
Lance Naik
Posts: 32
Joined: Mon May 04, 2009 4:08 pm
Location: Hyderabad
Contact:

Post 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
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

what about the other things i wrote? did you try them?
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Misam Shah
Lance Naik
Posts: 32
Joined: Mon May 04, 2009 4:08 pm
Location: Hyderabad
Contact:

Post 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??
Post Reply