]> git.proxmox.com Git - mirror_zfs.git/blame - man/man1/ztest.1
Multi-modifier protection (MMP)
[mirror_zfs.git] / man / man1 / ztest.1
CommitLineData
5cd0add2
MG
1'\" t
2.\"
3.\" CDDL HEADER START
4.\"
5.\" The contents of this file are subject to the terms of the
6.\" Common Development and Distribution License (the "License").
7.\" You may not use this file except in compliance with the License.
8.\"
9.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10.\" or http://www.opensolaris.org/os/licensing.
11.\" See the License for the specific language governing permissions
12.\" and limitations under the License.
13.\"
14.\" When distributing Covered Code, include this CDDL HEADER in each
15.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16.\" If applicable, add the following below this CDDL HEADER, with the
17.\" fields enclosed by brackets "[]" replaced with your own identifying
18.\" information: Portions Copyright [yyyy] [name of copyright owner]
19.\"
20.\" CDDL HEADER END
21.\"
22.\"
23.\" Copyright (c) 2009 Oracle and/or its affiliates. All rights reserved.
24.\" Copyright (c) 2009 Michael Gebetsroither <michael.geb@gmx.at>. All rights
25.\" reserved.
26.\"
ac826e16 27.TH ztest 1 "2009 NOV 01" "ZFS on Linux" "User Commands"
5cd0add2
MG
28
29.SH NAME
30\fBztest\fR \- was written by the ZFS Developers as a ZFS unit test.
31.SH SYNOPSIS
32.LP
33.BI "ztest <options>"
34.SH DESCRIPTION
35.LP
36This manual page documents briefly the \fBztest\fR command.
37.LP
38\fBztest\fR was written by the ZFS Developers as a ZFS unit test. The
39tool was developed in tandem with the ZFS functionality and was
40executed nightly as one of the many regression test against the daily
41build. As features were added to ZFS, unit tests were also added to
42\fBztest\fR. In addition, a separate test development team wrote and
43executed more functional and stress tests.
44.LP
45By default \fBztest\fR runs for ten minutes and uses block files
46(stored in /tmp) to create pools rather than using physical disks.
47Block files afford \fBztest\fR its flexibility to play around with
48zpool components without requiring large hardware configurations.
49However, storing the block files in /tmp may not work for you if you
50have a small tmp directory.
51.LP
52By default is non-verbose. This is why entering the command above will
53result in \fBztest\fR quietly executing for 5 minutes. The -V option
54can be used to increase the verbosity of the tool. Adding multiple -V
55option is allowed and the more you add the more chatty \fBztest\fR
56becomes.
57.LP
58After the \fBztest\fR run completes, you should notice many ztest.*
59files lying around. Once the run completes you can safely remove these
60files. Note that you shouldn't remove these files during a run. You
61can re-use these files in your next \fBztest\fR run by using the -E
62option.
63.SH OPTIONS
64.HP
65.BI "\-?" ""
66.IP
67Print a help summary.
68.HP
69.BI "\-v" " vdevs" " (default: 5)
70.IP
71Number of vdevs.
72.HP
73.BI "\-s" " size_of_each_vdev" " (default: 64M)"
74.IP
75Size of each vdev.
76.HP
77.BI "\-a" " alignment_shift" " (default: 9) (use 0 for random)"
78.IP
79Used alignment in test.
80.HP
81.BI "\-m" " mirror_copies" " (default: 2)"
82.IP
83Number of mirror copies.
84.HP
85.BI "\-r" " raidz_disks" " (default: 4)"
86.IP
87Number of raidz disks.
88.HP
89.BI "\-R" " raidz_parity" " (default: 1)"
90.IP
91Raidz parity.
92.HP
93.BI "\-d" " datasets" " (default: 7)"
94.IP
95Number of datasets.
96.HP
97.BI "\-t" " threads" " (default: 23)"
98.IP
99Number of threads.
100.HP
101.BI "\-g" " gang_block_threshold" " (default: 32K)"
102.IP
103Gang block threshold.
104.HP
105.BI "\-i" " initialize_pool_i_times" " (default: 1)"
106.IP
107Number of pool initialisations.
108.HP
109.BI "\-k" " kill_percentage" " (default: 70%)"
110.IP
111Kill percentage.
112.HP
113.BI "\-p" " pool_name" " (default: ztest)"
114.IP
115Pool name.
116.HP
117.BI "\-V(erbose)"
118.IP
119Verbose (use multiple times for ever more blather).
120.HP
121.BI "\-E(xisting)"
122.IP
123Use existing pool (use existing pool instead of creating new one).
124.HP
125.BI "\-T" " time" " (default: 300 sec)"
126.IP
127Total test run time.
128.HP
129.BI "\-z" " zil_failure_rate" " (default: fail every 2^5 allocs)
130.IP
131Injected failure rate.
132.SH "EXAMPLES"
133.LP
134To override /tmp as your location for block files, you can use the -f
135option:
136.IP
137ztest -f /
138.LP
139To get an idea of what ztest is actually testing try this:
140.IP
141ztest -f / -VVV
142.LP
143Maybe you'd like to run ztest for longer? To do so simply use the -T
144option and specify the runlength in seconds like so:
145.IP
146ztest -f / -V -T 120
aa0ac7ca
BB
147
148.SH "ENVIRONMENT VARIABLES"
149.TP
379ca9cf
OF
150.B "ZFS_HOSTID=id"
151Use \fBid\fR instead of the SPL hostid to identify this host. Intended for use
152with ztest, but this environment variable will affect any utility which uses
153libzpool, including \fBzpool(8)\fR. Since the kernel is unaware of this setting
154results with utilites other than ztest are undefined.
155.TP
aa0ac7ca
BB
156.B "ZFS_STACK_SIZE=stacksize"
157Limit the default stack size to \fBstacksize\fR bytes for the purpose of
89666a8e
BB
158detecting and debugging kernel stack overflows. This value defaults to
159\fB32K\fR which is double the default \fB16K\fR Linux kernel stack size.
aa0ac7ca 160
89666a8e 161In practice, setting the stack size slightly higher is needed because
aa0ac7ca
BB
162differences in stack usage between kernel and user space can lead to spurious
163stack overflows (especially when debugging is enabled). The specified value
164will be rounded up to a floor of PTHREAD_STACK_MIN which is the minimum stack
165required for a NULL procedure in user space.
166
167By default the stack size is limited to 256K.
5cd0add2 168.SH "SEE ALSO"
379ca9cf 169.BR "spl-module-parameters (5)" ","
5cd0add2
MG
170.BR "zpool (1)" ","
171.BR "zfs (1)" ","
172.BR "zdb (1)" ","
173.SH "AUTHOR"
174This manual page was transvered to asciidoc by Michael Gebetsroither
175<gebi@grml.org> from http://opensolaris.org/os/community/zfs/ztest/