Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ddrescue slows down to a crawl
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Aquous
l33t
l33t


Joined: 08 Jan 2011
Posts: 700

PostPosted: Tue Mar 24, 2015 10:07 am    Post subject: ddrescue slows down to a crawl Reply with quote

Hello,

Yesterday morning, I very unexpectedly lost my external 1 TB USB drive :(. The initial symptom was Windows refusing to open a certain directory, with the drive needle audibly skipping back and retrying to read the problematic sector, while the GUI was totally frozen. After four such audible retries, I thought 'oh crap' and unplugged the drive. When I plugged it back in, Windows couldn't read the disk at all anymore. Linux, however, can read from the (undamaged) areas of the disk just fine; if I do a 'dd if=/dev/sdg bs=512 count=1', I happily see what looks like a regular MBR.

None of the data on it is critical, but obviously I'd still like to salvage as much as I can. So, I bought a new drive, and started to ddrescue the bad drive to the new one. This is the command I'm using:
Code:
sudo ddrescue -fdOK 100M /dev/sdg /dev/sdb ddrescue.log

(the '-K 100M' I found through Googling; it is supposed to help it skip over large consecutive damaged areas on the first pass)

The problem is... it's really, really slow. The first 100GB or so it read relatively fine, but now I'm getting read speeds of mere kilobytes per second:
Code:
GNU ddrescue 1.19
Press Ctrl-C to interrupt
Initial status (read from logfile)
rescued:    59357 MB,  errsize:  72301 kB,  errors:    1185

Current status
rescued:    59380 MB,  errsize:  72301 kB,  current rate:    21845 B/s
   ipos:   104472 MB,   errors:    1185,    average rate:    45511 B/s
   opos:   104472 MB, run time:    8.40 m,  successful read:       0 s ago
Copying non-tried blocks... Pass 1 (forwards)

The exact speed fluctuates between 32768 B/s and 21845 B/s, both obviously horrendously slow given I've still got about 830 GBs of data to read.

One thing I'm noticing is that the ipos (and of course concomitant opos) parameters increase steadily rather than in 100M increments. From this I deduce that the reading itself is going just fine, but is just genuinely slow. Is that correct?

In any case, is there anything I can do to prevent myself from having to sit and wait for the next year and a half (I calculated :P )?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5855

PostPosted: Tue Mar 24, 2015 2:17 pm    Post subject: Reply with quote

It may be useful to run `smartctl -a /dev/sdg` every so often while that's running. It won't make it go any faster, but it might at least explain why it's slow.

Hopefully it's just struggling to read a (small) bad part of the disk, and not something permanently dead.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Tue Mar 24, 2015 4:18 pm    Post subject: Reply with quote

ddrescue is doing all it can already, so, sitting around is all you can do. It is perfectly normal that it is taking so long, and whether you'll get the relevant pieces of data back is unpredictable. How long it will take depends only in how much of the disk is broken. It might be a small part, or most of it.

ddrescue will attempt its best, and continue if the data can't be recovered after some tries. In fact, you won't even know if your data is being recovered at all until it finishes.

That's the best you can get without getting to the physical level, that is, disassembling the driver and using specialized hardware to get the data, or whatever they do in data recovery laboratories. :P
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2971
Location: Germany

PostPosted: Tue Mar 24, 2015 7:09 pm    Post subject: Reply with quote

You can manually send it to another region. And then retry the problematic one later. The examples in the manpage should show this.

The "best" option should be to get as much data off it as quickly as possible, I don't know of any software that meets this criteria out of the box. Slowing down to a crawl and thus spending hours not reading perfectly readable regions further behind is far from the "best" you could do.

Also you might try your luck with the --min-read-rate= option...


Last edited by frostschutz on Wed May 11, 2016 8:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
Aquous
l33t
l33t


Joined: 08 Jan 2011
Posts: 700

PostPosted: Wed Mar 25, 2015 9:16 am    Post subject: Reply with quote

Thank you very much for your replies!

smartctl doesn't show anything interesting; it shows 8 errors which have all popped up at the same moment, indicating that I probably damaged the drive during transport (I move it around rather frequently; must be more careful with that, it seems :cry: ). I can't see any hint of specific regions being (or becoming) damaged during the ddrescue.

frostschutz, thank you for suggesting I use --min-read-rate! That helps a lot - can't believe I missed that reading the man page :oops:
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2971
Location: Germany

PostPosted: Thu Mar 26, 2015 11:19 pm    Post subject: Reply with quote

Aquous wrote:
frostschutz, thank you for suggesting I use --min-read-rate! That helps a lot - can't believe I missed that reading the man page :oops:


It's my first time seeing it as well. Maybe it's a new option... anyway, it should be the default behaviour.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum