LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-27-2014, 10:23 AM   #1
roby827
LQ Newbie
 
Registered: Apr 2014
Posts: 4

Rep: Reputation: Disabled
Help with mounting a dd-rescue image of a partition from a RAID drive


I have searched extensively, but can't seem to find the answer to my question. I still consider myself a new user, so I apologize for any wrong terminology I may use.

I have a NAS box that had two drives in a JBOD configuration. I had to reset the box, and now it won't boot with the disks installed. So I am hoping to pull the original data off of them, reinitialize the box with two new drive, and then re-copy the data back over. The original drives are new, and seem to be intact, so I don't think I will have any read errors when trying to copy the data. Also, MDADM examine did verify the RAID type was linear, so the data shouldn't be striped across the two drives.

On a different computer, I used dd-rescue to copy the single data partition off one of the drives, and now I am trying to mount it. From everything I have read, I should just be able to mount it normally. But I am getting errors.

I tried:

user@SERVER:sudo mount -o loop sdg3.img /media/img
mount: unknown filesystem type 'linux_raid_member'

I tried specifying the file type:

user@SERVER:/storage/data$ sudo mount -t ext4 -o loop sdg3.img /media/img
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

dmesg | tail shows:
[38661.273206] EXT4-fs (loop0): VFS: Can't find ext4 filesystem

I've also tried EXT3 and EXT2 with the same results.

From what I have read, since I just have the individual partition, I should be able to just mount it. However, I can't seem to.

I think my final option would be to use dd-rescue on the second HDD, and try and rebuild the raid locally, but I would prefer to get the data off the individual disks if I can.

Thanks in advance!

Last edited by roby827; 04-27-2014 at 10:26 AM.
 
Old 04-27-2014, 07:33 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
A JBOD set must have volume metadata stored somewhere, and if it's stored at the beginning of the partition, mount won't be able to find the file system.

The error message from mount (unknown filesystem type 'linux_raid_member') seems to indicate that this is indeed the case with your drive image. You'll either have to assemble the RAID/JBOD device and mount the md device, or figure out how far into the partition the actual file system begins and use the "offset=" parameter when mounting it.
 
Old 04-27-2014, 07:38 PM   #3
roby827
LQ Newbie
 
Registered: Apr 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks.

Is that the case even if I only copied the one particular partition that the data is on? The original disk had multiple partitions and I only copied partition number 2. Can I rebuild if I copied partition #2 from both drives, or will I need to make copies of all the partitions?

Here is the output from parted for the drive in question. I copied partition #2.

Model: WDC WD20 EFRX-68AX9N0 (scsi)
Disk /dev/sdf: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
4 1049kB 10.7GB 10.7GB i686-THECUS raid
5 10.7GB 21.5GB 10.7GB raid
1 21.5GB 23.6GB 2147MB raid
3 23.6GB 24.2GB 537MB raid
2 24.2GB 2000GB 1976GB THECUS raid

Last edited by roby827; 04-27-2014 at 07:44 PM.
 
Old 04-27-2014, 07:44 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by roby827 View Post
From what I have read, since I just have the individual partition, I should be able to just mount it. However, I can't seem to.
That might be true if you had the partition the filesystem was created on - but mdadm interposes another block device layer (/dev/md0 say) that the mkfs is run on.
So I imagine you would need to associate a loop device to that img and proceed from there ("man losetup"). Then you would need to try to build the array degraded and then mount the filesystem. That will probably fail as the filesystem will be incomplete.
Testdisk may get the files off at this point, but it can be time consuming recognising and renaming all the files - and you will need as much space again to write the recovered files.
Quote:
I think my final option would be to use dd-rescue on the second HDD, and try and rebuild the raid locally
Much better idea IMHO.

Edit: slow typing while the above discussion was going on.

Last edited by syg00; 04-27-2014 at 07:45 PM.
 
Old 04-27-2014, 07:58 PM   #5
roby827
LQ Newbie
 
Registered: Apr 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Much better idea IMHO.
Thanks. I assume I will need to copy all 5 partitions in order to properly rebuild the RAID?

Or, I just thought of another way I could get this done. I think I should be able to remove the ZPOOL in my second computer and pull the drives. Then replace the drives with the 2 RAID drives, then build the RAID in that computer and copy off the data. Does that sound more feasible?
 
Old 04-27-2014, 08:08 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Normally I would say stick the physical drives in and see if the array(s) will rebuild. But if the drives themselves are suspect (something must have caused the failure), I'd try and get images of (all) the partitions and try recovery from them.
I've no idea why there are so many partitions - if they "pair up" on both drives I'd start with number 1 and see if it has array info on it. Just a matter of legwork from here.
 
Old 04-27-2014, 08:14 PM   #7
roby827
LQ Newbie
 
Registered: Apr 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Normally I would say stick the physical drives in and see if the array(s) will rebuild. But if the drives themselves are suspect (something must have caused the failure), I'd try and get images of (all) the partitions and try recovery from them.
I've no idea why there are so many partitions - if they "pair up" on both drives I'd start with number 1 and see if it has array info on it. Just a matter of legwork from here.
The drives are relatively new, and were working fine earlier. I think the NAS box firmware got corrupted, which is what started this whole mess. I ended up having to reflash the firmware.

I just removed the 4-disk pool from my other server and stuck these two RAID disks in. I was able to mount them with no problems. I think I was too scared to try this earlier.

Thanks everyone for the suggestions! I will be copying this data off. This is what I get for procrastinating on getting a backup done!
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
get data off a RAID partition - rescue from server crash ken_ken_ken Linux - Hardware 2 10-10-2011 03:58 PM
mounting an iso image to a partition bjamison Linux - Hardware 3 02-09-2010 12:51 AM
Mounting cdrom drive in rescue mode rrbalajikmu Linux - Newbie 1 05-11-2008 09:56 PM
Mounting split raid drive as normal drive via USB William_Syd Linux - Newbie 2 11-01-2006 07:07 PM
How can I create an image of a software raid partition? hamish Linux - Software 1 10-02-2006 06:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:41 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