[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help with ddrescue



On Fri, 08 May 2015 13:40:01 -0400
The Wanderer <wanderer@fastmail.fm> wrote:

> On 05/08/2015 at 01:20 PM, German wrote:
> 
> > On Fri, 08 May 2015 12:10:38 -0400 Gary Dale <garydale@torfree.net>
> > wrote:
> > 
> >> On 08/05/15 10:32 AM, German wrote:
> >>> Hi list. Ok, now I have a spare 2TB USB drive where I can save
> >>> .img file. Is that the right procedure? Do I have make a snapshot
> >>> of failed drive and transfer it as a .img file to a spare drive, 
> >>> correct? R-studio for linux can display files of failed drive (
> >>> TestDisk coudn't do it ). So now I think I'll proceed. What is 
> >>> exact command to do it with ddrescue and what file system the
> >>> spare drive has to be formated? Thank you very much!
> >>> 
> >>> 
> >> You can try ddrescue if=/dev/sdb1 of=failed.img where /dev/sdb1
> >> would be the partition that you want to recover.
> > 
> > Thanks, but some clarification is needed. Now I have two drives,
> > failed and a spare. Both are 2TB in size. Failed drive probably has
> > 1.6 TB data I'd like to recover. It has only one partition I
> > suppose.
> 
> That's bad.
> 
> If the drive has only one partition, it probably has a single
> filesystem taking up all of its space.
> 
> When you create a ddrescue image from that partition, the new image
> will take up _at least as much_ space as the original filesystem.
> That's not the 1.6TB of "used" space; it's the full 2TB of "total"
> space. (Plus however much space is taken up by the "index" file used
> by ddrescue while doing its work.)
> 
> That means that if your two 2TB drives are actually the same size, the
> "good" one will not have enough space to store the image you need to
> rescue from the "bad" one.

Thanks Wanderer. So, I have no chances with two drives the same
capacity? Would you advise to wait when I can get more capacity drive
and only then to proceed as to save some head ache? Once again, thanks
for such a complete instructions.


> 
> > So, if failed drive is for instance /dev/sdb and spare drive is for 
> > isntance /dev/sdc, the right command will be ddrescue if=/dev/sdb 
> > of=/dev/sdc/failed.img ?
> 
> No.
> 
> With ddrescue, you do not (want to) create a new filesystem directly
> on the new device.
> 
> What you want to do is create a filesystem _image_, in a file which is
> stored on the new device.
> 
> Step-by-step, what you do is:
> 
> * Create a filesystem on your "good" drive (/dev/sdc). You can use any
> filesystem you want.
> 
> * Mount the newly created filesystem somewhere. For example, if you
> want to mount it to the empty directory '/mnt/new_disk', you could
> run the command:
>     mount /dev/sdc1 /mnt/new_disk
> 
> * Run the command
>     ddrescue /dev/sdb /mnt/new_disk/sdb_failed.img
> /tmp/sdb_failed.ddrescuelog
> Note that this will create _two_ files: the rescued filesystem image,
> and a "log file" which ddrescue uses to keep track of what it has
> already successfully rescued and where it has encountered errors. This
> second file will take up additional space.
> 
> * If you have enough free space, copy the resulting sdb_failed.img to
> a separate location, so you have a backup copy if something goes
> wrong.
> 
> * Run recovery tools (starting with fsck, as Gary Dale suggested) on
> sdb_failed.img, and see how much you can recover.
> 
> * Mount sdb_failed.img, using a loopback mount, and copy out whatever
> files you can to a new location.
> 
> 
> Recovering data from a failed drive using ddrescue, dd_rescue, or
> myrescue is entirely possible; I've done it myself. However, it is not
> trivial, and in my experience the process requires considerably more
> space than the size of whatever drive is being rescued.
> 
> 
> 
> Personally, I would probably recommend the use of myrescue rather than
> of ddrescue or dd_rescue, but any of them can work if you use them
> right.
> 


Reply to: