1 .\" Copyright (c) 2004-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd "control utility for NOP GEOM class"
37 .Op Fl c Ar count_until_fail
41 .Op Fl p Ar stripesize
42 .Op Fl P Ar stripeoffset
43 .Op Fl q Ar rdelayprob
48 .Op Fl x Ar wdelayprob
55 .Op Fl c Ar count_until_fail
58 .Op Fl q Ar rdelayprob
61 .Op Fl x Ar wdelayprob
82 utility is used for setting up transparent providers on existing ones.
83 Its main purpose is testing other GEOM classes, as it allows forced provider
84 removal and I/O error simulation with a given probability.
85 It also gathers statistics on the number of read, write, delete,
86 getattr, flush, and other requests, and the number of bytes read and written.
88 can also be used as a good starting point for implementing new GEOM
93 indicates an action to be performed:
94 .Bl -tag -width ".Cm configure"
96 Set up a transparent provider on the given devices.
97 If the operation succeeds, the new provider should appear with name
98 .Pa /dev/ Ns Ao Ar dev Ac Ns Pa .nop .
101 will be loaded if it is not loaded already.
103 Configure existing transparent provider.
104 At the moment it is only used for changing failure probability.
106 Turn off the given transparent providers.
108 Reset statistics for the given transparent providers.
124 .Bl -tag -width "-c count_until_fail"
125 .It Fl c Ar count_until_fail
126 Specifies the number of I/O requests to allow before setting the read, write and
127 delay failure probabilities.
128 .It Fl d Ar delaymsec
129 Specifies the delay of the requests in milliseconds.
130 Note that requests will be delayed before they are sent to the backing device.
132 Specifies the error number to return on failure.
134 Force the removal of the specified provider.
136 Where to begin on the original provider.
137 .It Fl p Ar stripesize
138 Value of the stripesize property of the transparent provider.
139 .It Fl P Ar stripeoffset
140 Value of the stripeoffset property of the transparent provider.
141 .It Fl q Ar rdelayprob
142 Specifies read delay probability in percent.
143 .It Fl r Ar rfailprob
144 Specifies read failure probability in percent.
146 Size of the transparent provider.
148 Sector size of the transparent provider.
149 .It Fl w Ar wfailprob
150 Specifies write failure probability in percent.
153 .It Fl x Ar wdelayprob
154 Specifies write delay probability in percent.
156 Physical path of the transparent provider.
158 The name of the new provider.
161 will be appended to the provider name.
166 variables can be used to control the behavior of the
169 The default value is shown next to each variable.
170 .Bl -tag -width indent
171 .It Va kern.geom.nop.debug : No 0
175 This can be set to a number between 0 and 2 inclusive.
176 If set to 0, minimal debug information is printed.
177 If set to 1, basic debug information is logged along with the I/O requests
178 that were returned as errors.
179 If set to 2, the maximum amount of debug information is printed including
183 Exit status is 0 on success, and 1 if the command fails.
185 The following example shows how to create a transparent provider for disk
187 with 50% write failure probability, and how to destroy it.
188 .Bd -literal -offset indent
189 gnop create -v -w 50 da0
190 gnop destroy -v da0.nop
193 The traffic statistics for the given transparent providers can be obtained
197 The example below shows the number of bytes written with
199 .Bd -literal -offset indent
213 .An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org