jimmy5
Data Recovery Noob
Posts: 17
Joined: Fri Oct 23, 2015 9:21 am

Re: How to Clone a Hard Drive With Bad Sectors Using ddrescue

Fri Oct 23, 2015 9:27 am

hi
this looks interesting, but how long does it take to clone a 1TB drive? my log file is already 40MB, but it keeps doing something in a loop without giving any numbers for the "rescued" or "current rate" sections, so i'm not sure what to do next...

User avatar
Jared
Forum Admin
Posts: 3517
Joined: Mon Jan 12, 2015 12:32 pm
Location: Providence, RI
Contact: Website Facebook Twitter Skype YouTube Google+

Re: How to Clone a Hard Drive With Bad Sectors Using ddrescue

Fri Oct 23, 2015 12:08 pm

That sounds odd, it should be updating that number of rescued bytes. What's the specific command you issued?

jimmy5
Data Recovery Noob
Posts: 17
Joined: Fri Oct 23, 2015 9:21 am

Re: How to Clone a Hard Drive With Bad Sectors Using ddrescue

Fri Oct 23, 2015 12:22 pm

well, i had a problem with the log file first because noone told me where to write it... (or how to mount a usb stick..)
so when i just typed the main command and /logfile at the end, it did start to rescue something i think, but then stopped because the log file got full... then i managed to mount the usb stick to /mnt and ran a new command with a new logfile location and that created the 40MB log file...
and when i now look at the log file(with ddrescueviewer), the whole thing is red with couple of blue spots, and it says that the error size is 1000GB?

and i ran this first command from here, thinking that i have to do it in 2 passes:
https://www.technibble.com/forums/threa ... ost-417101
so i didnt use any flags(only -f), because im not really sure what is the difference between -d and -v...
and the scan itself took 12.2 hours or something, but then i interrrupted it with the interruption command... thinking that i can later perhaps resume it and view the logfile in the meantime...

but should i just run a new scan with the -d or -v flag then and forget about the 2 pass technique?
and i also noticed that the ddrescue version was 1.14... (from somekind of rescue mix live cd...)
and perhaps i should then boot up a new linux live cd and install the latest ddrescue on that live system and then run the command with a flag?

User avatar
Jared
Forum Admin
Posts: 3517
Joined: Mon Jan 12, 2015 12:32 pm
Location: Providence, RI
Contact: Website Facebook Twitter Skype YouTube Google+

Re: How to Clone a Hard Drive With Bad Sectors Using ddrescue

Fri Oct 23, 2015 2:30 pm

If you just re-issue the same exact command in ddrescue as before it'll resume based on the log file. You can adjust the flags too, as long as you're using the same log file it'll keep track of what ranges still need to be imaged.

jimmy5
Data Recovery Noob
Posts: 17
Joined: Fri Oct 23, 2015 9:21 am

Re: How to Clone a Hard Drive With Bad Sectors Using ddrescue

Fri Oct 23, 2015 3:02 pm

but could i do a completely new clone with the linux mint live cd? (and dumping the old log)
because then i could also use the ddrescue 1.19 version, which is said to be better than 1.14...?
and i guess that the live cd will not mount any drives and that is a good thing?

User avatar
Jared
Forum Admin
Posts: 3517
Joined: Mon Jan 12, 2015 12:32 pm
Location: Providence, RI
Contact: Website Facebook Twitter Skype YouTube Google+

Re: How to Clone a Hard Drive With Bad Sectors Using ddrescue

Fri Oct 23, 2015 7:00 pm

You can certainly start over if you want, though I can't see why it'd be beneficial. You can keep the old log, just move it to a more convenient location if needed and still use the newer version of ddrescue. I don't think anything changed with how it reads/writes the log file. The log file is just how it keeps track of the range of sectors that are read or not read. You can even still resume if you're in a different version of Linux and the paths of the drives has changed.

Will save you time and avoid unnecessarily straining the drive re-reading sectors that were already read. Just my two cents.

jimmy5
Data Recovery Noob
Posts: 17
Joined: Fri Oct 23, 2015 9:21 am

Re: How to Clone a Hard Drive With Bad Sectors Using ddrescue

Fri Oct 23, 2015 10:58 pm

ok thanks. but which flag should i use? -d or -v? :roll:

User avatar
Jared
Forum Admin
Posts: 3517
Joined: Mon Jan 12, 2015 12:32 pm
Location: Providence, RI
Contact: Website Facebook Twitter Skype YouTube Google+

Re: How to Clone a Hard Drive With Bad Sectors Using ddrescue

Sat Oct 24, 2015 6:30 am

-d means "direct" connection. It attempts to override the kernel IO controller to the drive and gain better control. It often makes no difference and sometimes even gives errors. I've basically stopped using it.

-v means verbose. I'm honestly not sure what difference it actually makes, haven't really used it enough or paid much attention to it.

Keep in mind that if it's imaging away well and not hanging and giving a lot of issues your triggers are fine. Data is binary, each sector is either read or not read. If it's reading, go with it.

jimmy5
Data Recovery Noob
Posts: 17
Joined: Fri Oct 23, 2015 9:21 am

Re: How to Clone a Hard Drive With Bad Sectors Using ddrescue

Sat Oct 24, 2015 2:09 pm

ok thanks.
and i've actually 'researched' it a bit more and looks like the latest version is the best bet:
http://www.nic.funet.fi/pub/gnu/ftp.gnu ... u/ddrescue

and use these commands:
ddrescue -f -n /dev/hda /dev/hdb /mnt/usbflash/mapfile241015
ddrescue -d -f -r3 /dev/hda /dev/hdb /mnt/usbflash/mapfile241015

im currently running the 1st phase and it actually shows alot better information than the 1.14 version did...
and smartctl also said that the drive is going to fail within 24hrs :shock: ("Save all data!")
(reallocated sector count is 003, while the threshold is 036? somekind of 0x0033 code. and the drive has run only 3.1 years...)

and it also says that it rescued 3200MB... so i guess i have somehow lost all of it? :roll:
but can it be retrieved in a lab or something?

and i'm not sure if there is any difference if you add something at the end of the 'mapfile' text or not... (eg the date numbers)

User avatar
Jared
Forum Admin
Posts: 3517
Joined: Mon Jan 12, 2015 12:32 pm
Location: Providence, RI
Contact: Website Facebook Twitter Skype YouTube Google+

Re: How to Clone a Hard Drive With Bad Sectors Using ddrescue

Sun Oct 25, 2015 11:21 am

The "rescued" amount of data is how much has been copied to the new drive or image file. If it's a 500Gb drive then the final number should be somewhere near that amount. Ddrescue is a cloning tool which works around the bad sectors to image what data is still readable.

However if you've been at it for a while and only rescued that amount, I'd suggest you get the drive to a professional. It very well may be that the drive is unstable or needs a firmware fix to stabilize it. Pushing it too far can ultimately result in losing all your data.

Return to “Data Recovery Tutorials”

Who is online

Users browsing this forum: No registered users and 0 guests