LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-20-2012, 08:56 PM   #1
denisps
LQ Newbie
 
Registered: Nov 2012
Posts: 3

Rep: Reputation: Disabled
Recover data from raid1 drive


I've used my western digital mybook world white light 1TB NAS for over a year and it suddenly stopped booting. It did not respond to reset so I took out the drive and connected it to my laptop.

Ubuntu 12.04 64bit did not mount it automatically.
Gparted shows it as unallocated.
fdisk shows 4 "Linux raid autodetect" partitions (/dev/sdc*).
ls /dev/md* shows nothing
I tried mounting them with sudo mount -t ext3 /dev/sdc1 /mnt/wd
and got: "wrong fs type, bad option, bad superblock"
I found all kind of suggestions how to mount it with mdadm but nothing worked. In most cases it says:
mdadm: no recogniseable superblock on /dev/sdc2
mdadm: /dev/sdc2 has no superblock - assembly aborted
Then I found "Mybook Rescue tool"
It finished successfully and it looked like it restored the linux system partitions. So I put the drive back in the box but it still did not boot.
I'm already trying to recover the data from it for a few days with no success.
I tried other commands and I might have accidentally messed up on of the partitions (/dev/sdc1) with it:
sudo mdadm -B /dev/md0 --level=1 -n 2 /dev/sda1 /dev/sdc1
or my boot system partition(/dev/sda1) I didn't reboot yet. But it's not important, that I can recreate. What important is /dev/sdc4 (xfs) partition with almost TB of my data.

So far I understand that the drive is MBR based
with linux software raid 1
first 3 partitions are ext3
and the 4th partition(/dev/sdc4) is the data with xfs file system.

I've ran out of ideas. I need help. Please.
 
Old 11-21-2012, 01:14 PM   #2
NyteOwl
Member
 
Registered: Aug 2008
Location: Nova Scotia, Canada
Distribution: Slackware, OpenBSD, others periodically
Posts: 512

Rep: Reputation: 139Reputation: 139
Is this a single drive? You can't do RAID 1 with one drive, you need at least 2.

I assume you've tried mounting just /dev/sdc4? What happens when you do?
 
Old 11-21-2012, 01:47 PM   #3
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
I doubt that it is RAID 1. Linux is reading the partition type in the drive label and interpreting as "Linux raid autodetect", but if it is some proprietary format, then it could be anything.

To recover your data, use dd to copy the entire drive to a file. Then put the original drive on a shelf for safekeeping. Using your favorite hex dump tool, find the start of the Linux ext3 partition. It may well be stored as contiguous on the NAS. Copy the partition to a file and see if you can mount it as a loop device (lets you mount a file containing a whole filesystem).

It may take some work, but you will learn a lot about filesystems.
 
Old 11-21-2012, 03:27 PM   #4
denisps
LQ Newbie
 
Registered: Nov 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you for responses.

I don't think the hard drive is seriously damaged and I don't have TB of continuous space for full image.

Yes, I tried mounting them with:
sudo mount -t ext3 /dev/sdc1 /mnt/wd
and got: "wrong fs type, bad option, bad superblock..."

Yes, it doesn't make sense to do raid 1 on single drive, but that's what it appears to be. I have ssh access to same device at work, through I can't take it apart and connect my hard drive there.
mount
Code:
/dev/root on / type ext3 (rw,noatime,data=ordered)
proc on /proc type proc (rw)
sys on /sys type sysfs (rw)
/dev/pts on /dev/pts type devpts (rw)
securityfs on /sys/kernel/security type securityfs (rw)
/dev/md3 on /var type ext3 (rw,noatime,data=ordered)
/dev/md2 on /DataVolume type xfs (rw,noatime,uqnoenforce)
/dev/ram0 on /mnt/ram type tmpfs (rw)
/dev/md2 on /shares/bak type xfs (rw,noatime,uqnoenforce)
/dev/md2 on /shares/den type xfs (rw,noatime,uqnoenforce)
cat /proc/mdstat
Code:
Personalities : [linear] [raid0] [raid1]
md1 : active raid1 sda2[0]
      256896 blocks [2/1] [U_]

md3 : active raid1 sda3[0]
      987904 blocks [2/1] [U_]

md2 : active raid1 sda4[0]
      973522880 blocks [2/1] [U_]

md0 : active raid1 sda1[0]
      1959872 blocks [2/1] [U_]

unused devices: <none>
Is there something that I need to check there, that can help me to recover?

[EDIT]
The last 2 code-quotes are from a working hard drive of the same model that I have ssh access to at work. And not from my Ubuntu system at home where I connect my problematic hard drive.

Last edited by denisps; 11-21-2012 at 04:42 PM.
 
Old 11-21-2012, 04:18 PM   #5
NyteOwl
Member
 
Registered: Aug 2008
Location: Nova Scotia, Canada
Distribution: Slackware, OpenBSD, others periodically
Posts: 512

Rep: Reputation: 139Reputation: 139
Well since the drive you are talking about in your first post is /dev/sdc and the md volumes are /dev/sda (your system drive) the RAID reference is not the USB drive at all.

When I said mount I meant try mounting /dev/sdc4 where you indicated the data to be recovered resides, not the boot sector.

ie. mount -t xfs /dev/sdc4 /mnt/wd


I'd also use smartclt and check the status of the drive when you're done retrieving data.
 
Old 11-21-2012, 04:27 PM   #6
denisps
LQ Newbie
 
Registered: Nov 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by NyteOwl View Post
Well since the drive you are talking about in your first post is /dev/sdc and the md volumes are /dev/sda (your system drive) the RAID reference is not the USB drive at all.

When I said mount I meant try mounting /dev/sdc4 where you indicated the data to be recovered resides, not the boot sector.

ie. mount -t xfs /dev/sdc4 /mnt/wd


I'd also use smartclt and check the status of the drive when you're done retrieving data.
I should have make it more clear. The last 2 code-quotes are from a working hard drive of the same model that I have ssh access to at work. And not from my Ubuntu system at home where I connect my problematic hard drive.

Last edited by denisps; 11-23-2012 at 02:44 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recover mdadm raid1 data after recreate new array over old Murz Linux - General 2 12-15-2011 05:04 AM
[SOLVED] Recover data from Raid 1 drive trippap Linux - Hardware 2 10-18-2010 09:36 AM
Best way to recover file off of single RAID1 drive? ddc441 Linux - Hardware 5 02-24-2009 08:11 PM
LXer: Recover Data From RAID1 LVM Partitions With Knoppix Linux LiveCD LXer Syndicated Linux News 0 04-24-2007 04:01 PM
recover data from physically damaged drive kc8tbe Linux - General 11 05-29-2004 01:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration