DragonFly On-Line Manual Pages
dits(1) FreeBSD Reference Manual dits(1)
NAME
dits - Data Integrity Test Tool
SYNOPSIS
dits -i [-HvX] [-o skip] [-S max] partition [nblocks]
dits -t [gHnv] [-a naioreqs] [-b bps] [-C nprocs] [-E type:prob] [-I iter] [-o skip] [-r] [-S max] [-s min] [-T ttmax] partition
dits -c [-HRv] [-a naioreqs] [-o skip] [-r] [-S max] partition
dits -D sfrom sto
dits -d [-Hv] [-o skip] [-S max] partition [start [stop]]
dits -h
dits -V
DESCRIPTION
dits is a tool for validating disk drivers, file systems, and lock
managers. More than a simple exerciser, dits is able to verify that no
detectable data integrity errors have occurred.
The tool does its work in three mutually exclusive phases:
(1) Init - Write a unique ID to each sector in the test bed.
(2) Test - Continuously select arbitrary non-overlapping ranges of
sectors and swap them. File range locking is used to ensure mutual
exclusion amongst concurrently executing processes working in the same
test bed.
(3) Check - Verify that each and every unique ID written in phase (1)
is intact and neither missing nor duplicated.
OPTIONS
-a nreqs
use AIO, limit to nreqs outstanding requests
-b bps limit throughput to bps blocks/sec
-C nprocs
set concurrency (default: 4)
-c check the test bed
-D sfrom sto
duplicate session 'sfrom to 'sto
-d dump the given range of device blocks
-E type:prob
inject errors of the given type and probability
-g put the master and workers into their own process group
-H suppress column headers
-h show this help list
-I iter
max iterations
-i initialize test bed
-N name
specify the session name
-n don't perform write operations
-o skip
skip first skip number of blocks in partition
-R attempt to repair a corrupted test bed
-r disable run time sanity checking
-S max maximum device blocks to swap (default: 2048)
-s min minimum device blocks to swap (default: 1)
-T ttmax
specify the test mode maximum running time
-t run the swap test
-V print version
-v increase verbosity
-X use directIO
partition
a disk partition, volume, file, etc, ...
nblocks
number of blocks in test bed
prob a probability in the interval [0.0-1.0]
start starting block number
stop ending block number
type one of {rtck,before,during,after}
ttmax maximum test mode run time in seconds
EXAMPLES
Typically, one runs dits over a raw device, but it will run over a file
in a file system. Given a raw device, one must first initialize the
test bed in which dits will work. The larger the bed the longer it
takes to initialize and check.
To initialize the test bed, choose some number of sectors. For example,
a test bed that is 128MB in size requires 262144 512-byte sectors.
Given a logical volume named lvtest on AIX:
$ dits -vi 262144 /dev/rlvtest
Next, run the test process. By default this process will fork
and generate four test process that will access the test bed
concurrently.
$ dits -tv /dev/rlvtest
This process will run until interrupted with <CTRL>-C,
generating as much I/O as possible within the constraints of the
block swapping algorithm.
Finally, kill the test process (with <CTRL-C> and verify the
integrity of the test bed:
$ dits -cv -a2 /dev/rlvtest
If successful, the check process will report statistics on the
state of the test bed and exit with a zero result code. If any
data integrity errors are detected, the check process will
produce error messages to that effect and return a non-zero
result.
To use POSIX AIO, give dits the -a flag during the test process.
The parameter to the -a flags is the maximum number of
concurrent requests that you wish for the test process to have
outstanding at any one time. Note: AIO mode currently only
works with one test process because of a locking problem.
$ dits -v -a32 /dev/rlvtest
To use dits on a file system, first create a file that will be
used as the test bed:
$ dd if=/dev/zero of=/tmp/testbed bs=1024k count=128
Then simply run dits as before, but give it the name of the file
(/tmp/testbed) instead of /dev/rlvtest.
DIAGNOSTICS
The dits utility exits 0 on success, and non-zero if an error occurs.
CAVEATS
Be warned that because of file system caching and such, the behavior of
running dits on a file in a file system or on a block device will
produce significantly different results than running on a raw device.
In particular, if the machine crashes while dits is running in test
mode, the test bed will most likely be corrupted beyond repair.
AUTHORS
Greg Becker greg@codeconcepts.com
Thanks to Jeff d'Arcy for explaining the functional concept and
inspiring the first of a number of predecessors to this particular
incarnation.
src 01 July 2013 dits(1)