[SOLVED] Recover data from ddrescue


Go to solution Solved by SidebandSamurai,

Recommended Posts

I have a question I am struggeling with.

 

I had a 3T drive experience errors, and at the same time I had a failed parity drive.  I removed both drives.  I replaced the parity drive with a 10T drive.  I did a new config so that my array can rebuild the parity of the existing data.

 

Now I had the bad parity drive and Drive2.

 

Drive 2 I ran a ddrescue successfully recovering 99.9 percent of the drive.  Its called drive2.img

 

Now I want to mount this image and copy the data off the image.  How can I do this.  I have been googling for a couple of hours but I am not getting anyware fast.  I read briefly that the UD plugin can mount these images, but I have not found out how yet.

 

Can someone help me with a solution?  I currently have the image on another unraid server  it is sitting in /mnt/disk1/recovery.

 

I have attempted to use this command:

mount -o loop /mnt/disk1/recovery/disk2.img /mnt/disks/drive2

which resulted in this error
 

mount: /mnt/disks/drive2: wrong fs type, bad option, bad superblock on /dev/loop4, missing codepage or helper program, or other error.

 

i have also ran this command

 

parted disk2.img print

 

Which resulted in this message:

 

Model:  (file)
Disk /mnt/disk1/recovery/disk2.img: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      32.8kB  3001GB  3001GB  reiserfs

 

I have also run this command as well

blkid disk2.img

 

Which resulted in this message:

disk2.img: PTUUID="d5a8d2fd-b918-4458-b8ff-bb7f65e0b171" PTTYPE="gpt"


I have also tried this command:

 

mount -t reiserfs -o loop /mnt/disk1/recovery/disk2.img /mnt/disks/drive2

 

Which resulted in this error:
 

mount: /mnt/disks/drive2: wrong fs type, bad option, bad superblock on /dev/loop4, missing codepage or helper program, or other error.

 

I have looked in dmesg to find any clues and found this message.

 

[ 2198.619991] REISERFS warning (device loop4): sh-2021 reiserfs_fill_super: can not find reiserfs on loop4
[ 8824.536014] REISERFS warning (device loop4): sh-2021 reiserfs_fill_super: can not find reiserfs on loop4

 

At this point i am not sure if the file system is corrupt or I am just entering the commands incorrectly.

 

any help is most appreaciated.

Edited by SidebandSamurai
Link to comment
  • Solution

Well I get to answer my very own question.

 

I went to dinner and came back to address this problem further.  I ran across an article were an NTFS disk was recovered with ddrescue but the person could not mount it.  I then ran across this article

 

 Guide to Using DDRescue to Recover Data

 

I read this article from beginning to end looking for a clue as to what i might be doing wrong.

 

There is a section called "Working with image files containing multiple partitions"

 

After reading this section, I decided to follow the steps in this section to see what I would find out.

 

I moved into the recovery folder on disk1

 

cd /mnt/disk1/recovery/

 

Next I executed this command

 

parted disk2.img

 

The server responded with:

 

GNU Parted 3.3
Using /mnt/disk1/recovery/disk2.img
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) 

 

The next command in Parted was:

 

unit

 

Parted responded with:

 

Unit?  [compact]?

 

The next command in Parted was:

 

B

 

Parted responded with:

 

(parted) 

 

Next command to Parted is:

 

print

 

Parted responded with this information

 

Model:  (file)
Disk /mnt/disk1/recovery/disk2.img: 3000592982016B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End             Size            File system  Name  Flags
 1      32768B  3000592965119B  3000592932352B  reiserfs

(parted)                                                                  

 

at this pont i only see one partition but having read this article I remembered that this has an offset.  See the start is at 32768.  but my mount command did not have an offset.  just a little further down the article was the command I hoped I was looking for:

 

mount -o loop,ro,offset=32768 /mnt/disk1/recovery/disk2.img /mnt/disks/drive2

 

Note with this mount command I am mounting it as ReadOnly (ro) and offering the start offset of 32768

 

After an agnizing minute as the drive1 spun up and started mounting the image I was greeted with the following in dmesg:

 

[32209.362880] REISERFS (device loop4): found reiserfs format "3.6" with standard journal
[32209.362890] REISERFS (device loop4): using ordered data mode
[32209.362890] reiserfs: using flush barriers
[32209.363866] REISERFS (device loop4): journal params: device loop4, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
[32209.363998] REISERFS (device loop4): checking transaction log (loop4)
[32209.397773] REISERFS (device loop4): Using r5 hash to sort names

 

I thought to myself, did it mount?

 

I went to /mnt/disks/drive2 and viola, I found my files.

 

Yea baby I am back in business!

 

A couple of things that made this attempt successful.

 

I set Parted to byte mode (not kilobyte) which gave me the precise location of the offset.

setting the image to read only (ro) protects the image from being written to.  but the key to making this successful was the offset=32768.  The mount command was able to locate the correct area to read and the mount completed successfully.

 

Thanks to @SpaceInvaderOne I was following his video on how to setup Krusader on my friends server. That video saved me a whole lot of headache.  This server is being setup for a friend and I am doing a lot of things I did not do on my server.  One of those was to setup short cuts in Krusader.  Thses short cuts made it easy as pie to copy my files from my friends server over to my server.  After the recovery is finished its time to renovate my server and make it better.

Edited by SidebandSamurai
Link to comment
  • SidebandSamurai changed the title to [SOLVED] Recover data from ddrescue

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.