summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2014-02-26 07:55:04 +0100
committerBernhard Voelker <mail@bernhard-voelker.de>2014-02-26 07:55:04 +0100
commitdf5e69705f66e4fc6bcd939846bc4fb2de90a614 (patch)
tree3ef5b0b4d5485012a4f3ac30b5a1ff0218eb8c0b
parent9f60f37a28c37acb66aa38003ccaa07f13abbd9d (diff)
downloadcoreutils-df5e69705f66e4fc6bcd939846bc4fb2de90a614.tar.xz
doc: add dd example for failing disks
* doc/coreutils.texi (dd invocation): Add an example for how to call dd to save data from a failing disk. Mention GNU 'ddrescue' as one of the more specialized tools in such a case.
-rw-r--r--doc/coreutils.texi19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 95453c746..12ff31162 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -8928,6 +8928,25 @@ tape=/dev/rmt/0
(dd bs=4k seek=1 count=0 && dd bs=512k) <$tape >$disk
@end example
+@cindex ddrescue
+@cindex disks, failing
+For failing disks, other tools come with a great variety of extra
+functionality to ease the saving of as much data as possible before the
+disk finally dies, e.g.
+@uref{http://www.gnu.org/software/ddrescue/, GNU @command{ddrescue}}.
+However, in some cases such a tool is not available or the administrator
+feels more comfortable with the handling of @command{dd}.
+As a simple rescue method, call @command{dd} as shown in the following
+example: the options @samp{conv=noerror,sync} are used to continue
+after read errors and to pad out bad reads with NULs, while
+@samp{iflag=fullblock} caters for short reads (which traditionally never
+occur on disk based devices):
+
+@example
+# Rescue data from an (unmounted!) partition of a failing disk.
+dd conv=noerror,sync iflag=fullblock </dev/sda1 > /mnt/rescue.img
+@end example
+
Sending an @samp{INFO} signal to a running @command{dd}
process makes it print I/O statistics to standard error
and then resume copying. In the example below,