DISKRESCUE(1) OpenBSD Reference Manual DISKRESCUE(1)
NAME
diskrescue - disk recovery tool
SYNOPSIS
diskrescue [-aqv] [-R results file] [-b block size] [-o out file]
[-r raw device] operation
DESCRIPTION
diskrescue is a tool to verify and/or recover as much data as possible
from failed disks.
The idea is to read all sectors of a disk and let the disk reallocate bad
or soon to be bad sectors. While the disk is being read it can clone the
data to a file or a disk as well. The resulting disk/file can be checked
with fsck(8) and analyzed with dumpfs(8) and fsdb(8) while not having to
deal with a failing disk.
When a sector can not be read it will be filled with zeroes and
diskrescue continues on to the next sector. For all intents and purposes
this is a fancy dd(1) that takes some of the complexity out of dealing
with a failed disk.
The options are as follows:
-R results file
Write the results of the rescue process to the specified file.
If the results file already exists the program will attempt to
restart the recovery. Other parameters such as block size and
out file can not be specified when attempting to restart a recov-
ery.
-a Abort on read error.
-b block size
This is the block size that the disk uses to read and write data.
A large value speeds things up and once a bad spot on the disk is
hit diskrescue reverts to the natural block size of 512 bytes
during the recovery process. Default is 512, which is very slow!
The argument accepts the following quantifiers: b, k, m, g and
the following multipliers: * and x. For example 1 mega byte can
be expressed as: -b 1m or -b 1k*1k
-o out file or disk
This is the target file or disk of the operation.
-q Don't report completion percentage.
-r raw disk
This is the raw disk device that will be attempted to be recov-
ered. For example: /dev/rsd2c
-v Print version number and exit.
operation
verify The verify operation reads the entire disk and lets
it do its thing to reallocate bad or questionable
blocks.
recover
Essentially the same as verify but write the read
data to a file or disk.
SEE ALSO
dd(1) fsck(8) dumpfs(8) fsdb(8)
HISTORY
diskrescue was written to recover a disk of a friend and it became useful
enough for the general public.
AUTHORS
diskrescue was written by Marco Peereboom <marco@peereboom.us>.
EXAMPLES
Verify a disk and force it to reallocate bad blocks:
diskrescue -b 1m -r /dev/rsd2c verify
Recover a disk to a file and write a results file:
diskrescue -r /dev/rsd2c -R res -o disk.img -b 1m recover
Restart a recovery operation with a results file:
diskrescue -r /dev/rsd2c -R res recover
DISCLAIMER
Use this at your own risk! Recovering disks can make them worse and the
author takes no responsibility for any data loss or corruption. Also
when used wrong a good disk could be overwritten permanently losing all
data on it. Use this tool wisely and leave the author alone if you mess
up.
BUGS
Lots of features are still missing.
OpenBSD 4.6 September 27, 2009 2