manpagez: man pages & more
info ddrescue
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7. Direct Disc Access

If you notice that the sizes and offsets in the log file are ALWAYS multiples of the sector size, maybe your kernel is caching the disc accesses and grouping them. In this case you may want to use direct disc access or a raw device to bypass the kernel cache and rescue more of your data.

NOTE! Sector size must be correctly set with the ‘--block-size’ option for this to work. Try the ‘--direct’ option first. If direct disc access is not available in your system, try raw devices. Read your system documentation to find how to bind a raw device to a regular block device.

Ddrescue aligns its I/O buffer to the sector size so that it can be used for direct disc access or to read from raw devices. For efficiency reasons, also aligns it to the memory page size if page size is a multiple of sector size. Ddrescue can’t determine the size of a raw device, so a explicit ‘--max-size’ or ‘--complete-only’ option is needed.

Using direct disc access, or reading from a raw device, may be slower than normal cached reading for hard discs (but faster for floppies). In this case you may want to make a first pass using normal cached reads, and use direct disc access, or a raw device, only to recover the good sectors inside the failed blocks.


Example 1: using direct disc access.

 
ddrescue -f -n /dev/hdb1 /dev/hdc1 logfile
ddrescue -d -f -r3 /dev/hdb1 /dev/hdc1 logfile
e2fsck -v -f /dev/hdc1
mount -t ext2 -o ro /dev/hdc1 /mnt

Example 2: using a raw device.

 
raw /dev/raw/raw1 /dev/hdb1
ddrescue -f -n /dev/hdb1 /dev/hdc1 logfile
ddrescue -C -f -r3 /dev/raw/raw1 /dev/hdc1 logfile
raw /dev/raw/raw1 0 0
e2fsck -v -f /dev/hdc1
mount -t ext2 -o ro /dev/hdc1 /mnt

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2017
Individual documents may contain additional copyright information.