ztest.1: modernise

I fixed a few typos, but avoided changing anything beyond that;
the sould of the document should be preserved

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12125
This commit is contained in:
наб 2021-05-26 14:10:56 +02:00 committed by Brian Behlendorf
parent b1821d06c3
commit 8134178f3b

View File

@ -1,4 +1,3 @@
'\" t
.\" .\"
.\" CDDL HEADER START .\" CDDL HEADER START
.\" .\"
@ -19,198 +18,216 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Oracle and/or its affiliates. All rights reserved. .\" Copyright (c) 2009 Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2009 Michael Gebetsroither <michael.geb@gmx.at>. All rights .\" Copyright (c) 2009 Michael Gebetsroither <michael.geb@gmx.at>. All rights
.\" reserved. .\" reserved.
.\" Copyright (c) 2017, Intel Corporation. .\" Copyright (c) 2017, Intel Corporation.
.\" .\"
.TH ZTEST 1 "Aug 24, 2020" OpenZFS .Dd May 26, 2021
.Dt ZTEST 1
.SH NAME .Os
\fBztest\fR \- was written by the ZFS Developers as a ZFS unit test. .
.SH SYNOPSIS .Sh NAME
.LP .Nm ztest
.BI "ztest <options>" .Nd was written by the ZFS Developers as a ZFS unit test
.SH DESCRIPTION .Sh SYNOPSIS
.LP .Nm
This manual page documents briefly the \fBztest\fR command. .Op Fl VEG
.LP .Op Fl v Ar vdevs
\fBztest\fR was written by the ZFS Developers as a ZFS unit test. The .Op Fl s Ar size_of_each_vdev
tool was developed in tandem with the ZFS functionality and was .Op Fl a Ar alignment_shift
executed nightly as one of the many regression test against the daily .Op Fl m Ar mirror_copies
build. As features were added to ZFS, unit tests were also added to .Op Fl r Ar raidz_disks/draid_disks
\fBztest\fR. In addition, a separate test development team wrote and .Op Fl R Ar raid_parity
.Op Fl K Ar raid_kind
.Op Fl D Ar draid_data
.Op Fl S Ar draid_spares
.Op Fl C Ar vdev_class_state
.Op Fl d Ar datasets
.Op Fl t Ar threads
.Op Fl g Ar gang_block_threshold
.Op Fl i Ar initialize_pool_i_times
.Op Fl k Ar kill_percentage
.Op Fl p Ar pool_name
.Op Fl T Ar time
.Op Fl z Ar zil_failure_rate
.
.Sh DESCRIPTION
.Nm
was written by the ZFS Developers as a ZFS unit test.
The tool was developed in tandem with the ZFS functionality and was
executed nightly as one of the many regression test against the daily build.
As features were added to ZFS, unit tests were also added to
.Nm .
In addition, a separate test development team wrote and
executed more functional and stress tests. executed more functional and stress tests.
.LP .
By default \fBztest\fR runs for ten minutes and uses block files .Pp
(stored in /tmp) to create pools rather than using physical disks. By default
Block files afford \fBztest\fR its flexibility to play around with .Nm
runs for ten minutes and uses block files
(stored in
.Pa /tmp )
to create pools rather than using physical disks.
Block files afford
.Nm
its flexibility to play around with
zpool components without requiring large hardware configurations. zpool components without requiring large hardware configurations.
However, storing the block files in /tmp may not work for you if you However, storing the block files in
.Pa /tmp
may not work for you if you
have a small tmp directory. have a small tmp directory.
.LP .
By default is non-verbose. This is why entering the command above will .Pp
result in \fBztest\fR quietly executing for 5 minutes. The -V option By default is non-verbose.
can be used to increase the verbosity of the tool. Adding multiple -V This is why entering the command above will result in
option is allowed and the more you add the more chatty \fBztest\fR .Nm
quietly executing for 5 minutes.
The
.Fl V
option can be used to increase the verbosity of the tool.
Adding multiple
.Fl V
options is allowed and the more you add the more chatty
.Nm
becomes. becomes.
.LP .
After the \fBztest\fR run completes, you should notice many ztest.* .Pp
files lying around. Once the run completes you can safely remove these After the
files. Note that you shouldn't remove these files during a run. You .Nm
can re-use these files in your next \fBztest\fR run by using the -E run completes, you should notice many
.Pa ztest.*
files lying around.
Once the run completes you can safely remove these files.
Note that you shouldn't remove these files during a run.
You can re-use these files in your next
.Nm
run by using the
.Fl E
option. option.
.SH OPTIONS .
.HP .Sh OPTIONS
.BR "\-h, -?, --help" .Bl -tag -width "-v v"
.IP .It Fl h , \&? , -help
Print a help summary. Print a help summary.
.HP .It Fl v , -vdevs Ns = (default: Sy 5 )
.BR "\-v, --vdevs=" " (default: 5)
.IP
Number of vdevs. Number of vdevs.
.HP .It Fl s , -vdev-size Ns = (default: Sy 64M )
.BR "\-s, --vdev-size=" " (default: 64M)"
.IP
Size of each vdev. Size of each vdev.
.HP .It Fl a , -alignment-shift Ns = (default: Sy 9 ) No (use Sy 0 No for random)
.BR "\-a, --alignment-shift=" " (default: 9) (use 0 for random)"
.IP
Alignment shift used in test. Alignment shift used in test.
.HP .It Fl m , -mirror-copies Ns = (default: Sy 2 )
.BR "\-m, --mirror-copies=" " (default: 2)"
.IP
Number of mirror copies. Number of mirror copies.
.HP .It Fl r , -raid-disks Ns = (default: Sy 4 No for raidz/ Ns Sy 16 No for draid)
.BR "\-r, --raid-disks=" " (default: 4 for raidz/ 16 for draid)"
.IP
Number of raidz/draid disks. Number of raidz/draid disks.
.HP .It Fl R , -raid-parity Ns = (default: Sy 1 )
.BR "\-R, --raid-parity=" " (default: 1)"
.IP
Raid parity (raidz & draid). Raid parity (raidz & draid).
.HP .It Fl K , -raid-kind Ns = Ns Sy raidz Ns | Ns Sy draid Ns | Ns Sy random No (default: Sy random )
.BR "\-K, --raid-kind=" " (default: 'random') raidz|draid|random" The kind of RAID config to use.
.IP With
The kind of RAID config to use. With 'random' the kind alternates between raidz and draid. .Sy random
.HP the kind alternates between raidz and draid.
.BR "\-D, --draid-data=" " (default: 4)" .It Fl D , -draid-data Ns = (default: Sy 4 )
.IP
Number of data disks in a dRAID redundancy group. Number of data disks in a dRAID redundancy group.
.HP .It Fl S , -draid-spares Ns = (default: Sy 1 )
.BR "\-S, --draid-spares=" " (default: 1)"
.IP
Number of dRAID distributed spare disks. Number of dRAID distributed spare disks.
.HP .It Fl d , -datasets Ns = (default: Sy 7 )
.BR "\-d, --datasets=" " (default: 7)"
.IP
Number of datasets. Number of datasets.
.HP .It Fl t , -threads Ns = (default: Sy 23 )
.BR "\-t, --threads=" " (default: 23)"
.IP
Number of threads. Number of threads.
.HP .It Fl g , -gang-block-threshold Ns = (default: Sy 32K )
.BR "\-g, --gang-block-threshold=" " (default: 32K)"
.IP
Gang block threshold. Gang block threshold.
.HP .It Fl i , -init-count Ns = (default: Sy 1 )
.BR "\-i, --init-count=" " (default: 1)"
.IP
Number of pool initializations. Number of pool initializations.
.HP .It Fl k , -kill-percentage Ns = (default: Sy 70% )
.BR "\-k, --kill-percentage=" " (default: 70%)"
.IP
Kill percentage. Kill percentage.
.HP .It Fl p , -pool-name Ns = (default: Sy ztest )
.BR "\-p, --pool-name=" " (default: ztest)"
.IP
Pool name. Pool name.
.HP .It Fl f , -vdev-file-directory Ns = (default: Pa /tmp )
.BR "\-f, --vdev-file-directory=" " (default: /tmp)"
.IP
File directory for vdev files. File directory for vdev files.
.HP .It Fl M , -multi-host
.BR "\-M, --multi-host"
.IP
Multi-host; simulate pool imported on remote host. Multi-host; simulate pool imported on remote host.
.HP .It Fl E , -use-existing-pool
.BR "\-E, --use-existing-pool"
.IP
Use existing pool (use existing pool instead of creating new one). Use existing pool (use existing pool instead of creating new one).
.HP .It Fl T , -run-time Ns = (default: Sy 300 Ns s)
.BR "\-T, --run-time=" " (default: 300 sec)"
.IP
Total test run time. Total test run time.
.HP .It Fl P , -pass-time Ns = (default: Sy 60 Ns s)
.BR "\-P, --pass-time=" " (default: 60 sec)"
.IP
Time per pass. Time per pass.
.HP .It Fl F , -freeze-loops Ns = (default: Sy 50 )
.BR "\-F, --freeze-loops=" " (default: 50)" Max loops in
.IP .Fn spa_freeze .
Max loops in spa_freeze(). .It Fl B , -alt-ztest Ns =
.HP
.BR "\-B, --alt-ztest="
.IP
Alternate ztest path. Alternate ztest path.
.HP .It Fl C , -vdev-class-state Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy random No (default: Sy random )
.BR "\-C, --vdev-class-state=on|off|random" " (default: random)"
.IP
The vdev allocation class state. The vdev allocation class state.
.HP .It Fl o , -option Ns = Ns Ar variable Ns = Ns Ar value
.BR "\-o, --option=" Set global
.IP .Ar variable
Set global variable to an unsigned 32-bit integer value. to an unsigned 32-bit integer
.HP .Ar value
.BR "\-G, --dump-debug" (little-endian only).
.IP .It Fl G , -dump-debug
Dump zfs_dbgmsg buffer before exiting due to an error. Dump zfs_dbgmsg buffer before exiting due to an error.
.HP .It Fl V , -verbose
.BR "\-V, --verbose"
.IP
Verbose (use multiple times for ever more verbosity). Verbose (use multiple times for ever more verbosity).
.SH "EXAMPLES" .El
.LP .
To override /tmp as your location for block files, you can use the -f .Sh EXAMPLES
To override
.Pa /tmp
as your location for block files, you can use the
.Fl f
option: option:
.IP .Dl # ztest -f /
ztest -f / .Pp
.LP To get an idea of what
To get an idea of what ztest is actually testing try this: .Nm
.IP is actually testing try this:
ztest -f / -VVV .Dl # ztest -f / -VVV
.LP .Pp
Maybe you'd like to run ztest for longer? To do so simply use the -T Maybe you'd like to run
.Nm ztest
for longer? To do so simply use the
.Fl T
option and specify the runlength in seconds like so: option and specify the runlength in seconds like so:
.IP .Dl # ztest -f / -V -T 120
ztest -f / -V -T 120 .
.Sh ENVIRONMENT VARIABLES
.SH "ENVIRONMENT VARIABLES" .Bl -tag -width "ZF"
.TP .It Ev ZFS_HOSTID Ns = Ns Em id
.B "ZFS_HOSTID=id" Use
Use \fBid\fR instead of the SPL hostid to identify this host. Intended for use .Em id
with ztest, but this environment variable will affect any utility which uses instead of the SPL hostid to identify this host.
libzpool, including \fBzpool(8)\fR. Since the kernel is unaware of this setting Intended for use with
.Nm , but this environment variable will affect any utility which uses
libzpool, including
.Xr zpool 8 .
Since the kernel is unaware of this setting,
results with utilities other than ztest are undefined. results with utilities other than ztest are undefined.
.TP .It Ev ZFS_STACK_SIZE Ns = Ns Em stacksize
.B "ZFS_STACK_SIZE=stacksize" Limit the default stack size to
Limit the default stack size to \fBstacksize\fR bytes for the purpose of .Em stacksize
detecting and debugging kernel stack overflows. This value defaults to bytes for the purpose of
\fB32K\fR which is double the default \fB16K\fR Linux kernel stack size. detecting and debugging kernel stack overflows.
This value defaults to
.Em 32K
which is double the default
.Em 16K
Linux kernel stack size.
.Pp
In practice, setting the stack size slightly higher is needed because In practice, setting the stack size slightly higher is needed because
differences in stack usage between kernel and user space can lead to spurious differences in stack usage between kernel and user space can lead to spurious
stack overflows (especially when debugging is enabled). The specified value stack overflows (especially when debugging is enabled).
The specified value
will be rounded up to a floor of PTHREAD_STACK_MIN which is the minimum stack will be rounded up to a floor of PTHREAD_STACK_MIN which is the minimum stack
required for a NULL procedure in user space. required for a NULL procedure in user space.
.Pp
By default the stack size is limited to 256K. By default the stack size is limited to
.SH "SEE ALSO" .Em 256K .
.BR "spl-module-parameters (5)" "," .El
.BR "zpool (1)" "," .
.BR "zfs (1)" "," .Sh SEE ALSO
.BR "zdb (1)" "," .Xr zdb 1 ,
.SH "AUTHOR" .Xr zfs 1 ,
This manual page was transferred to asciidoc by Michael Gebetsroither .Xr zpool 1 ,
<gebi@grml.org> from http://opensolaris.org/os/community/zfs/ztest/ .Xr spl-module-parameters 5