The following is a description of the following stress tests:
disktest, diskrand, rawdisk, rdwr, sectorcheck
diskrand <raw partition> <block count>
Disk rand fills <block count> sectors with 32 bit values equal to
their block number. It then reads randomly in chunks from 1 to
1024 sectors. There is a 50% chance that requests will be sequential,
and 50% that requests will be to a random sector. This test is
destructive of data, and multiple copies can be run on a single
partition. The minimum <block count> is 1024 sectors.
disktest [OPTIONS] <filename>
Uses a 32 bit test pattern that starts at 0 and increments by 4
every 32 bits.
OPTIONS
-c Indicates that <filename> is a character device. Should
always be used if <filename> is a character device.
-d Deletes the file after it finishes reading.
-k stop on error (assumed with -c)
-l Causes disktest to loop forever instead of stopping after
the first pass.
-q quiet
-r readonly (default is to write the data, then read it back)
-R random blocksize (up to specified amount)
-b <count> sets blocksize to <count> bytes
-B <count> sets blocksize to <count> sectors
-o <count> starts reading at offset <count> bytes (requires -r)
-O <count> starts reading at offset <count> sectors (requires -r)
-s <count> sets size to <count> bytes
-S <count> sets size to <count> sectors
rawdisk <block device name> <character device name> [[-]iterations]
rawdisk tests a disk partition in the following steps:
1) It first divides the partition into randomly sized regions and
then forks a child for each one. The number of regions is between
5 and 10.
2) Each child starts at the beginning of its region and write a random
number of blocks sequentially until the whole region is filled.
3) The child will seek back to the start of its region and read a
random number of blocks. The child will verify that the blocks
contain the appropriate contents, and then do another read.
4) After the contents of all the blocks have been verified, the child
will exit.
5) When all child processes have completed, the parent will log the
time to standard output.
<block device name> and <character device> name should be disk devices
that correspond to the same disk partition (e.g. /dev/dsk/dks0d2s6 and
/dev/rdsk/dks0d2s6)
The pattern written and read is made up of 32 bit values. The first 8
bits is the child number, and the last 24 are the block (or sector)
number.
The number of iterations is the absolute value of the interations
argument. If iterations is negative, the full 128 words of each
sector are compared. If iterations is positive, only one word is
compared (allowing more disk I/O). If the argument is omitted,
the default is '1'.
rdwr [OPTIONS]
rdwr will read a specified amount of data into one buffer, and then
read and write (according to OPTIONS) random locations.
Reads go into a second buffer so that the data can be compared with
the original read.
This test is non-destructive, but should be run on unmounted raw disk
partitions. Note that there is no data initialization, so the disk
should somehow be initialized with an interesting pattern. Also,
multiple copies of the test can be run, since the writes are
non-destructive.
Note that since a buffer equal to the specified size (-s option) is
allocated, this test will take up a lot of memory when used with a
large -s.
OPTIONS
-r readonly -- no writes will be done
-s <count> size (in bytes) of data to be compared
-b <count> buffer size (in bytes) of reads and writes
-i <count> iterations -- number of reads/writes to perform
after initial read
-f <partition> partition to use
sectorcheck [number of passes]
sectorcheck creates 600 files, each of which is up to 1MB
in size, with the size being linearly distributed between 0 and
1MB. It then reads each one to check for data consistency.
Each block in each file is labeled with the path name of the file,
followed by the pass number and block number.
[number of passes] controls how many times the 400 files are written
and read. If the argument is omitted, sectorcheck will run until
killed.
diocmpall -s [threads] -n [passes] file1 file2
This tests the IP28/pacecar user direct IO workaround. It should work
on all platforms as we don't explicitly touch the cachelines that
IO goes to, however T5 based will speculate to them. They should
either fix this in SW, or be coherent.
NOTE: file1 == copy of file2