/drvtool

A utility for analyzing / wiping hard drives

Primary LanguageCBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

# drvtool

A utility for analyzing / wiping hard drives.

Author: Peter Eriksson <pen@lysator.liu.se>
Source: https://github.com/ptrrkssn/drvtool

Developed primarily for FreeBSD currently.

BUILD INSTRUCTIONS

make && make install


USAGE:
  ./drvtool [<options>] [<device> [<commands>]]

OPTIONS:
  -h               Display this information
  -V               Print program verson and exit
  -d               Increase debug info level
  -v               Increase verbosity
  -w               Open device in R/W mode (needed for write tests)
  -y               Answer yes to all questions
  -r               Reverse block order
  -f               Flush device write buffer
  -t               Enable sending TRIM commands to device
  -R <size>        Enable Shuffled (size of deck)/Random (size 0) order
  -X <type>        Transform type [NONE]
  -D <type>        Digest (checksum) type [NONE]
  -T <time>        Test timeout (0 = no limit) [0]
  -P <num>         Number of passes (0 = no limit) [2]
  -S <pos>         Starting block offset [0]
  -L <size>        Number of blocks [ALL]
  -B <size>        Block size [NATIVE]

COMMANDS:
  drive            Select new drive
  current          Describe current drive
  config           Display test configuration
  read             Read-only test [doesn't harm OS]
  refresh          Read+Rewrite test [doesn't harm data]
  verify           Read+Rewrite+Read test [doesn't harm data]
  test             Read+Write+Read+Restore pattern test [doesn't harm data]
  write            Write-only pattern test [corrupts data]
  compare          Write+Read pattern test [corrupts data]
  purge            Multi-pass Write+Read NCSC-TG-025/DoD 5220.22-M purge [corrupts data]
  trim             Clean drive via TRIM commands [corrupts data]
  digest           Display last calculated digest (if enabled)
  print            Print last block buffer
  exit             Quit this program
  !<cmd>           Execute <cmd> shell command
  #<text>          Comment (ignored)

DIGESTS:
  NONE, ADLER32, CRC32, MD5, SKEIN256, SHA256, SHA384, SHA512

TRANSFORMS:
  NONE, XOR[-<value>], ROL[-<bits>], ROR[-<bits>]

NOTES:
  - Beware of using any of the write tests on SSD devices. Due
    to the way they operate (with remapping of blocks for wear levelling)
    you will not test what you intend and instead just make them fail faster.

  - Beware that the Shuffle (-R with size > 0) option allocates a lot of RAM,
    typically 8 bytes times the number of blocks of the device. One the other hand
    it guarantees that all blocks in the requested range will be visited.