%PDF- %PDF-
Direktori : /proc/309157/task/309157/root/usr/share/doc/gddrescue/html/ |
Current File : //proc/309157/task/309157/root/usr/share/doc/gddrescue/html/Direct-disc-access.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"> <title>Direct disc access (GNU ddrescue Manual)</title> <meta name="description" content="Direct disc access (GNU ddrescue Manual)"> <meta name="keywords" content="Direct disc access (GNU ddrescue Manual)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> <link href="index.html" rel="start" title="Top"> <link href="Concept-index.html" rel="index" title="Concept index"> <link href="index.html" rel="up" title="Top"> <link href="Fill-mode.html" rel="next" title="Fill mode"> <link href="Examples.html" rel="prev" title="Examples"> <style type="text/css"> <!-- a.summary-letter {text-decoration: none} blockquote.indentedblock {margin-right: 0em} div.display {margin-left: 3.2em} div.example {margin-left: 3.2em} div.lisp {margin-left: 3.2em} kbd {font-style: oblique} pre.display {font-family: inherit} pre.format {font-family: inherit} pre.menu-comment {font-family: serif} pre.menu-preformatted {font-family: serif} span.nolinebreak {white-space: nowrap} span.roman {font-family: initial; font-weight: normal} span.sansserif {font-family: sans-serif; font-weight: normal} ul.no-bullet {list-style: none} --> </style> </head> <body lang="en"> <span id="Direct-disc-access"></span><div class="header"> <p> Next: <a href="Fill-mode.html" accesskey="n" rel="next">Fill mode</a>, Previous: <a href="Examples.html" accesskey="p" rel="prev">Examples</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> [<a href="Concept-index.html" title="Index" rel="index">Index</a>]</p> </div> <hr> <span id="Direct-disc-access-1"></span><h2 class="chapter">11 Direct disc access</h2> <span id="index-direct-disc-access"></span> <span id="index-raw-devices"></span> <p>If you notice that the positions and sizes in <var>mapfile</var> 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 for <var>infile</var>, or read from a raw device, to bypass the kernel cache and rescue more of your data. </p> <p>NOTE! Sector size must be correctly set with the ‘<samp>--sector-size</samp>’ option for direct disc access to work. </p> <p>NOTE: Direct disc access can copy arbitrary domains by reading whole sectors and then writing only the requested part. This is the only case where ddrescue will try to read data outside of the rescue domain. </p> <p>Try the ‘<samp>--idirect</samp>’ 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. Some OSs provide raw access through especial device names, like /dev/rdisk. </p> <p>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. On some systems, ddrescue can’t determine the size of a raw device, so an explicit ‘<samp>--size</samp>’ or ‘<samp>--complete-only</samp>’ option may be needed. </p> <p>Using direct disc access, or reading from a raw device, may be slower or faster than normal cached reading depending on your OS and hardware. In case it is slower 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. </p> <br> <p>Example 1: using direct disc access. </p> <div class="example"> <pre class="example">ddrescue -f -n /dev/sdb1 /dev/sdc1 mapfile ddrescue -d -f -r3 /dev/sdb1 /dev/sdc1 mapfile e2fsck -v -f /dev/sdc1 mount -t ext2 -o ro /dev/sdc1 /mnt </pre></div> <br> <p>Example 2: using a raw device. </p> <div class="example"> <pre class="example">raw /dev/raw/raw1 /dev/sdb1 ddrescue -f -n /dev/sdb1 /dev/sdc1 mapfile ddrescue -C -f -r3 /dev/raw/raw1 /dev/sdc1 mapfile raw /dev/raw/raw1 0 0 e2fsck -v -f /dev/sdc1 mount -t ext2 -o ro /dev/sdc1 /mnt </pre></div> <hr> <div class="header"> <p> Next: <a href="Fill-mode.html" accesskey="n" rel="next">Fill mode</a>, Previous: <a href="Examples.html" accesskey="p" rel="prev">Examples</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> [<a href="Concept-index.html" title="Index" rel="index">Index</a>]</p> </div> </body> </html>