OS Manuals

/usr/bin/ztest

Advanced filesystem and volume manager

From zfs 2.4.4-r4 (os), captured 2026-11-05 by running ztest --help (exit 0). permalink

Usage: ztest [OPTIONS...]
    -v --vdevs=INTEGER                       Number of vdevs (default: 5)
    -s --vdev-size=INTEGER                   Size of each vdev (default: 256M)
    -a --alignment-shift=INTEGER             Alignment shift; use 0 for random (default: 9)
    -m --mirror-copies=INTEGER               Number of mirror copies (default: 2)
    -r --raid-disks=INTEGER                  Number of raidz/draid disks (default: 4)
    -R --raid-parity=INTEGER                 Raid parity (default: 1)
    -K --raid-kind=raidz|eraidz|draid|random Raid kind (default: random)
    -D --draid-data=INTEGER                  Number of draid data drives (default: 4)
    -S --draid-spares=INTEGER                Number of draid spares (default: 1)
    -d --datasets=INTEGER                    Number of datasets (default: 7)
    -t --threads=INTEGER                     Number of ztest threads (default: 23)
    -g --gang-block-threshold=INTEGER        Metaslab gang block threshold (default: 64K)
    -i --init-count=INTEGER                  Number of times to initialize pool (default: 1)
    -k --kill-percentage=INTEGER             Kill percentage (default: 70%)
    -p --pool-name=STRING                    Pool name (default: ztest)
    -f --vdev-file-directory=PATH            File directory for vdev files (default: /tmp)
    -M --multi-host                          Multi-host; simulate pool imported on remote host
    -E --use-existing-pool                   Use existing pool instead of creating new one
    -T --run-time=INTEGER                    Total run time (default: 300 sec)
    -P --pass-time=INTEGER                   Time per pass (default: 60 sec)
    -F --freeze-loops=INTEGER                Max loops in spa_freeze() (default: 50)
    -B --alt-ztest=PATH                      Alternate ztest path
    -C --vdev-class-state=on|off|random      vdev class state (default: random)
    -X --raidz-expansion                     Perform a dedicated raidz expansion test
    -o --option="NAME=VALUE"                 Set the named tunable to the given value
    -G --dump-debug-msg                      Dump zfs_dbgmsg buffer before exiting due to an error
    -V --verbose                             Verbose (use multiple times for ever more verbosity)
    -h --help                                Show this help
Options (28)
OptionDescriptionSource
-v, --vdevs --vdevs=INTEGERNumber of vdevs (default: 5)help + man
-s, --vdev-size --vdev-size=INTEGERSize of each vdev (default: 256M)help + man
-a, --alignment-shift --alignment-shift=INTEGERAlignment shift used in test.help + man
-m, --mirror-copies --mirror-copies=INTEGERNumber of mirror copies (default: 2)help + man
-r, --raid-disks --raid-disks=INTEGERNumber of raidz/draid disks (default: 4)help + man
-R, --raid-parity --raid-parity=INTEGERRaid parity (raidz & draid).help + man
-D, --draid-data --draid-data=INTEGERNumber of data disks in a dRAID redundancy group.help + man
-S, --draid-spares --draid-spares=INTEGERNumber of dRAID distributed spare disks.help + man
-d, --datasets --datasets=INTEGERNumber of datasets (default: 7)help + man
-t, --threads --threads=INTEGERNumber of ztest threads (default: 23)help + man
-g, --gang-block-threshold --gang-block-threshold=INTEGERMetaslab gang block threshold (default: 64K)help + man
-i, --init-count --init-count=INTEGERNumber of times to initialize pool (default: 1)help + man
-k, --kill-percentage --kill-percentage=INTEGERKill percentage (default: 70%)help + man
-p, --pool-name --pool-name=STRINGPool name (default: ztest)help + man
-f, --vdev-file-directory --vdev-file-directory=PATHFile directory for vdev files (default: /tmp)help + man
-M, --multi-host --multi-hostMulti-host;help + man
-E, --use-existing-pool --use-existing-poolUse existing pool (use existing pool instead of creating new one).help + man
-T, --run-time --run-time=INTEGERTotal run time (default: 300 sec)help + man
-P, --pass-time --pass-time=INTEGERTime per pass (default: 60 sec)help + man
-F, --freeze-loops --freeze-loops=INTEGERMax loops in spa_freeze() (default: 50)help + man
-B, --alt-ztest --alt-ztest=PATHPath to alternate ("older") ztest to drive, which will be used to initialize the pool, and, a stochastic half the time, to run the tests.help + man
-C, --vdev-class-state --vdev-class-state=on|off|randomvdev class state (default: random)help + man
-X, --raidz-expansion --raidz-expansionPerform a dedicated raidz expansion test.help + man
-o, --option --option="NAME=VALUE"Set the given tunable to the provided value.help + man
-G, --dump-debug --dump-debug-msgDump zfs_dbgmsg buffer before exiting due to an error.help + man
-V, --verbose --verboseVerbose (use multiple times for ever more verbosity).help + man
-h, -?, --help --helpPrint a help summary.help + man
-K, --raid-kind raidz|eraidz|draid|randomThe kind of RAID config to use. (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.