The advanced options in the settings window

There are a lot of options here that we didn't cover in Chapter 3, so let's get started.

Direct Disk Access

This is one of GNU ddrescue's best features. Surely, though, if we're recovering from the file that represents the device, we're reading directly from it anyway? The answer is no, for a variety of reasons.

The Linux Kernel (or Mach Kernel for Mac users) buffers input and output to devices. This is good:

  • It means we can write to devices faster (up to a point).

  • Reading data can also be faster if we've already read that bit of data since booting.

Basically, it makes our devices seem faster. When you read from a device file like "/dev/sda", the kernel manages all the reads through its buffer. The problem is that the buffer holds data in sections, of, say, 4 KB. This is normally fine, but if you can only read 3KB from a damaged disk before getting an error, you won't get ANY of that data from the kernel, because it can't fill the buffer.

Direct disk access solves this by bypassing the kernel's buffer entirely. Note that it can make recoveries slower, but you normally want to leave it enabled anyway.

Reading backwards

GNU ddrescue will normally start by reading from the start of the drive to the end of the drive ("forwards"). After that, it does several forwards and backwards passes to get as much data as possible.

However, it is possible to start by reading from the end of the disk to the start ("backwards"). Using this option also reverses all of the other passes. Reading backwards is often slower, but if you have a lot of bad sectors at the start of your drive, this might help you.

Preallocating disk space

[Note]Note

This feature is only available on Linux.

This is only really meaningful if you're using an image file. Say, you're recovering an 8GB USB drive. What it will do is make an 8GB disk image and then fill it with data, rather than expanding the disk image as new data arrives. This is useful if you're not sure you have enough disk space for the data. It's also possible it might speed the recovery up.

Soft run

As the name suggests, this option will skip over bad sectors. This option can be helpful if you want to make a really quick first pass before trying the difficult parts of the disk in some situations. Normally, it's not very helpful though, as all it does is disable the last phase, "Retrying bad sectors".

Overwrite output file

You need to enable this option if you're doing a device to device recovery, rather than recovering to an image file. This is just a safety feature.

[Tip]Tip

DDRescue-GUI will automatically set this option for you when it is needed. If it's set wrong by the GUI you can override it though.

Number of times to retry bad sectors

When it's finished getting all of the good data off of the drive, GNU ddrescue will retry all of the bad sectors it's found. You can use this option to skip this step, or run it as many times as you want. Values range from 0 - 5, and then forever. The default of 2 is normally fine.

Maximum number of errors before exiting

You can tell ddrescue to exit after it's encountered a certain number of bad areas on the drive. This could be useful if you're just reading through the drive to see if there are any bad sectors, or if you're impatient and want to try different settings when the threshold is reached. Values range from infinite, and 1000 - 10. You normally just want to leave this as it is (infinite).

Number of clusters to copy at a time

On the first pass, you can set how many clusters you want ddrescue to copy at a time. It's ignored on later passes, but it can make the recovery a lot faster or slower, depending on how you set it, and what kind of disk you're recovering from.

Values range from 32 - 256. Mostly, the default of 128 is fine, but if you find it to be slow, you can adjust it. Bigger values are often faster.