xref: /freebsd/lib/geom/stripe/gstripe.8 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1*e4b0a90eSBrooks Davis.\" Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
2*e4b0a90eSBrooks Davis.\" All rights reserved.
3*e4b0a90eSBrooks Davis.\"
4*e4b0a90eSBrooks Davis.\" Redistribution and use in source and binary forms, with or without
5*e4b0a90eSBrooks Davis.\" modification, are permitted provided that the following conditions
6*e4b0a90eSBrooks Davis.\" are met:
7*e4b0a90eSBrooks Davis.\" 1. Redistributions of source code must retain the above copyright
8*e4b0a90eSBrooks Davis.\"    notice, this list of conditions and the following disclaimer.
9*e4b0a90eSBrooks Davis.\" 2. Redistributions in binary form must reproduce the above copyright
10*e4b0a90eSBrooks Davis.\"    notice, this list of conditions and the following disclaimer in the
11*e4b0a90eSBrooks Davis.\"    documentation and/or other materials provided with the distribution.
12*e4b0a90eSBrooks Davis.\"
13*e4b0a90eSBrooks Davis.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14*e4b0a90eSBrooks Davis.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15*e4b0a90eSBrooks Davis.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16*e4b0a90eSBrooks Davis.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17*e4b0a90eSBrooks Davis.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18*e4b0a90eSBrooks Davis.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19*e4b0a90eSBrooks Davis.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20*e4b0a90eSBrooks Davis.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21*e4b0a90eSBrooks Davis.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22*e4b0a90eSBrooks Davis.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23*e4b0a90eSBrooks Davis.\" SUCH DAMAGE.
24*e4b0a90eSBrooks Davis.\"
25*e4b0a90eSBrooks Davis.Dd May 21, 2004
26*e4b0a90eSBrooks Davis.Dt GSTRIPE 8
27*e4b0a90eSBrooks Davis.Os
28*e4b0a90eSBrooks Davis.Sh NAME
29*e4b0a90eSBrooks Davis.Nm gstripe
30*e4b0a90eSBrooks Davis.Nd "control utility for striped devices"
31*e4b0a90eSBrooks Davis.Sh SYNOPSIS
32*e4b0a90eSBrooks Davis.Nm
33*e4b0a90eSBrooks Davis.Cm create
34*e4b0a90eSBrooks Davis.Op Fl v
35*e4b0a90eSBrooks Davis.Op Fl s Ar stripesize
36*e4b0a90eSBrooks Davis.Ar name
37*e4b0a90eSBrooks Davis.Ar prov prov ...
38*e4b0a90eSBrooks Davis.Nm
39*e4b0a90eSBrooks Davis.Cm destroy
40*e4b0a90eSBrooks Davis.Op Fl fv
41*e4b0a90eSBrooks Davis.Ar name ...
42*e4b0a90eSBrooks Davis.Nm
43*e4b0a90eSBrooks Davis.Cm label
44*e4b0a90eSBrooks Davis.Op Fl hv
45*e4b0a90eSBrooks Davis.Op Fl s Ar stripesize
46*e4b0a90eSBrooks Davis.Ar name
47*e4b0a90eSBrooks Davis.Ar prov prov ...
48*e4b0a90eSBrooks Davis.Nm
49*e4b0a90eSBrooks Davis.Cm stop
50*e4b0a90eSBrooks Davis.Op Fl fv
51*e4b0a90eSBrooks Davis.Ar name ...
52*e4b0a90eSBrooks Davis.Nm
53*e4b0a90eSBrooks Davis.Cm clear
54*e4b0a90eSBrooks Davis.Op Fl v
55*e4b0a90eSBrooks Davis.Ar prov ...
56*e4b0a90eSBrooks Davis.Nm
57*e4b0a90eSBrooks Davis.Cm dump
58*e4b0a90eSBrooks Davis.Ar prov ...
59*e4b0a90eSBrooks Davis.Nm
60*e4b0a90eSBrooks Davis.Cm list
61*e4b0a90eSBrooks Davis.Nm
62*e4b0a90eSBrooks Davis.Cm status
63*e4b0a90eSBrooks Davis.Nm
64*e4b0a90eSBrooks Davis.Cm load
65*e4b0a90eSBrooks Davis.Nm
66*e4b0a90eSBrooks Davis.Cm unload
67*e4b0a90eSBrooks Davis.Sh DESCRIPTION
68*e4b0a90eSBrooks DavisThe
69*e4b0a90eSBrooks Davis.Nm
70*e4b0a90eSBrooks Davisutility is used for setting up a stripe on two or more disks.
71*e4b0a90eSBrooks DavisThe striped device can be configured using two different methods:
72*e4b0a90eSBrooks Davis.Dq manual
73*e4b0a90eSBrooks Davisor
74*e4b0a90eSBrooks Davis.Dq automatic .
75*e4b0a90eSBrooks DavisWhen using the
76*e4b0a90eSBrooks Davis.Dq manual
77*e4b0a90eSBrooks Davismethod, no metadata are stored on the devices, so the striped
78*e4b0a90eSBrooks Davisdevice has to be configured by hand every time it is needed.
79*e4b0a90eSBrooks DavisThe
80*e4b0a90eSBrooks Davis.Dq automatic
81*e4b0a90eSBrooks Davismethod uses on-disk metadata to detect devices.
82*e4b0a90eSBrooks DavisOnce devices are labeled, they will be automatically detected and
83*e4b0a90eSBrooks Davisconfigured.
84*e4b0a90eSBrooks Davis.Pp
85*e4b0a90eSBrooks DavisThe first argument to
86*e4b0a90eSBrooks Davis.Nm
87*e4b0a90eSBrooks Davisindicates an action to be performed:
88*e4b0a90eSBrooks Davis.Bl -tag -width ".Cm destroy"
89*e4b0a90eSBrooks Davis.It Cm create
90*e4b0a90eSBrooks DavisSet up a striped device from the given devices with specified
91*e4b0a90eSBrooks Davis.Ar name .
92*e4b0a90eSBrooks DavisThis is the
93*e4b0a90eSBrooks Davis.Dq manual
94*e4b0a90eSBrooks Davismethod and the stripe will not exist after a reboot (see
95*e4b0a90eSBrooks Davis.Sx DESCRIPTION
96*e4b0a90eSBrooks Davisabove).
97*e4b0a90eSBrooks DavisThe kernel module
98*e4b0a90eSBrooks Davis.Pa geom_stripe.ko
99*e4b0a90eSBrooks Daviswill be loaded if it is not loaded already.
100*e4b0a90eSBrooks Davis.It Cm label
101*e4b0a90eSBrooks DavisSet up a striped device from the given devices with the specified
102*e4b0a90eSBrooks Davis.Ar name .
103*e4b0a90eSBrooks DavisThis is the
104*e4b0a90eSBrooks Davis.Dq automatic
105*e4b0a90eSBrooks Davismethod, where metadata are stored in every device's last sector.
106*e4b0a90eSBrooks DavisThe kernel module
107*e4b0a90eSBrooks Davis.Pa geom_stripe.ko
108*e4b0a90eSBrooks Daviswill be loaded if it is not loaded already.
109*e4b0a90eSBrooks Davis.It Cm stop
110*e4b0a90eSBrooks DavisTurn off an existing striped device by its
111*e4b0a90eSBrooks Davis.Ar name .
112*e4b0a90eSBrooks DavisThis command does not touch on-disk metadata!
113*e4b0a90eSBrooks Davis.It Cm destroy
114*e4b0a90eSBrooks DavisSame as
115*e4b0a90eSBrooks Davis.Cm stop .
116*e4b0a90eSBrooks Davis.It Cm clear
117*e4b0a90eSBrooks DavisClear metadata on the given devices.
118*e4b0a90eSBrooks Davis.It Cm dump
119*e4b0a90eSBrooks DavisDump metadata stored on the given devices.
120*e4b0a90eSBrooks Davis.It Cm list
121*e4b0a90eSBrooks DavisSee
122*e4b0a90eSBrooks Davis.Xr geom 8 .
123*e4b0a90eSBrooks Davis.It Cm status
124*e4b0a90eSBrooks DavisSee
125*e4b0a90eSBrooks Davis.Xr geom 8 .
126*e4b0a90eSBrooks Davis.It Cm load
127*e4b0a90eSBrooks DavisSee
128*e4b0a90eSBrooks Davis.Xr geom 8 .
129*e4b0a90eSBrooks Davis.It Cm unload
130*e4b0a90eSBrooks DavisSee
131*e4b0a90eSBrooks Davis.Xr geom 8 .
132*e4b0a90eSBrooks Davis.El
133*e4b0a90eSBrooks Davis.Pp
134*e4b0a90eSBrooks DavisAdditional options:
135*e4b0a90eSBrooks Davis.Bl -tag -width ".Fl s Ar stripesize"
136*e4b0a90eSBrooks Davis.It Fl f
137*e4b0a90eSBrooks DavisForce the removal of the specified striped device.
138*e4b0a90eSBrooks Davis.It Fl h
139*e4b0a90eSBrooks DavisHardcode providers' names in metadata.
140*e4b0a90eSBrooks Davis.It Fl s Ar stripesize
141*e4b0a90eSBrooks DavisSpecifies size of stripe block in bytes.
142*e4b0a90eSBrooks DavisThe
143*e4b0a90eSBrooks Davis.Ar stripesize
144*e4b0a90eSBrooks Davismust be a multiple of the largest sector size of all the providers.
145*e4b0a90eSBrooks Davis.It Fl v
146*e4b0a90eSBrooks DavisBe more verbose.
147*e4b0a90eSBrooks Davis.El
148*e4b0a90eSBrooks Davis.Sh SYSCTL VARIABLES
149*e4b0a90eSBrooks DavisThe following
150*e4b0a90eSBrooks Davis.Xr sysctl 8
151*e4b0a90eSBrooks Davisvariables can be used to control the behavior of the
152*e4b0a90eSBrooks Davis.Nm STRIPE
153*e4b0a90eSBrooks DavisGEOM class.
154*e4b0a90eSBrooks DavisThe default value is shown next to each variable.
155*e4b0a90eSBrooks Davis.Bl -tag -width indent
156*e4b0a90eSBrooks Davis.It Va kern.geom.stripe.debug : No 0
157*e4b0a90eSBrooks DavisDebug level of the
158*e4b0a90eSBrooks Davis.Nm STRIPE
159*e4b0a90eSBrooks DavisGEOM class.
160*e4b0a90eSBrooks DavisThis can be set to a number between 0 and 3 inclusive.
161*e4b0a90eSBrooks DavisIf set to 0 minimal debug information is printed, and if set to 3 the
162*e4b0a90eSBrooks Davismaximum amount of debug information is printed.
163*e4b0a90eSBrooks Davis.It Va kern.geom.stripe.fast : No 0
164*e4b0a90eSBrooks DavisIf set to a non-zero value enable
165*e4b0a90eSBrooks Davis.Dq "fast mode"
166*e4b0a90eSBrooks Davisinstead of the normal
167*e4b0a90eSBrooks Davis.Dq "economic mode" .
168*e4b0a90eSBrooks DavisCompared to
169*e4b0a90eSBrooks Davis.Dq "economic mode" ,
170*e4b0a90eSBrooks Davis.Dq "fast mode"
171*e4b0a90eSBrooks Davisuses more memory, but it is much faster for smaller stripe sizes.
172*e4b0a90eSBrooks DavisIf enough memory cannot be allocated,
173*e4b0a90eSBrooks Davis.Nm STRIPE
174*e4b0a90eSBrooks Daviswill fall back to
175*e4b0a90eSBrooks Davis.Dq "economic mode" .
176*e4b0a90eSBrooks Davis.It Va kern.geom.stripe.maxmem : No 13107200
177*e4b0a90eSBrooks DavisMaximum amount of memory that can be consumed by
178*e4b0a90eSBrooks Davis.Dq "fast mode"
179*e4b0a90eSBrooks Davis(in bytes).
180*e4b0a90eSBrooks DavisThis
181*e4b0a90eSBrooks Davis.Xr sysctl 8
182*e4b0a90eSBrooks Davisvariable is read-only and can only be set as a tunable in
183*e4b0a90eSBrooks Davis.Xr loader.conf 5 .
184*e4b0a90eSBrooks Davis.It Va kern.geom.stripe.fast_failed
185*e4b0a90eSBrooks DavisA count of how many times
186*e4b0a90eSBrooks Davis.Dq "fast mode"
187*e4b0a90eSBrooks Davishas failed due to an insufficient amount of memory.
188*e4b0a90eSBrooks DavisIf this value is large, you should consider increasing the
189*e4b0a90eSBrooks Davis.Va kern.geom.stripe.maxmem
190*e4b0a90eSBrooks Davisvalue.
191*e4b0a90eSBrooks Davis.El
192*e4b0a90eSBrooks Davis.Sh EXIT STATUS
193*e4b0a90eSBrooks DavisExit status is 0 on success, and 1 if the command fails.
194*e4b0a90eSBrooks Davis.Sh EXAMPLES
195*e4b0a90eSBrooks DavisThe following example shows how to set up a striped device from four disks with a
196*e4b0a90eSBrooks Davis128KB stripe size for automatic configuration,
197*e4b0a90eSBrooks Daviscreate a file system on it,
198*e4b0a90eSBrooks Davisand mount it:
199*e4b0a90eSBrooks Davis.Bd -literal -offset indent
200*e4b0a90eSBrooks Davisgstripe label -v -s 131072 data /dev/da0 /dev/da1 /dev/da2 /dev/da3
201*e4b0a90eSBrooks Davisnewfs /dev/stripe/data
202*e4b0a90eSBrooks Davismount /dev/stripe/data /mnt
203*e4b0a90eSBrooks Davis[...]
204*e4b0a90eSBrooks Davisumount /mnt
205*e4b0a90eSBrooks Davisgstripe stop data
206*e4b0a90eSBrooks Davisgstripe unload
207*e4b0a90eSBrooks Davis.Ed
208*e4b0a90eSBrooks Davis.Sh COMPATIBILITY
209*e4b0a90eSBrooks DavisThe
210*e4b0a90eSBrooks Davis.Nm
211*e4b0a90eSBrooks Davisinterleave is in number of bytes,
212*e4b0a90eSBrooks Davisunlike
213*e4b0a90eSBrooks Davis.Xr ccdconfig 8
214*e4b0a90eSBrooks Daviswhich use the number of sectors.
215*e4b0a90eSBrooks DavisA
216*e4b0a90eSBrooks Davis.Xr ccdconfig 8
217*e4b0a90eSBrooks Davis.Ar ileave
218*e4b0a90eSBrooks Davisof
219*e4b0a90eSBrooks Davis.Ql 128
220*e4b0a90eSBrooks Davisis 64 KB (128 512B sectors).
221*e4b0a90eSBrooks DavisThe same stripe interleave would be specified as
222*e4b0a90eSBrooks Davis.Ql 65536
223*e4b0a90eSBrooks Davisfor
224*e4b0a90eSBrooks Davis.Nm .
225*e4b0a90eSBrooks Davis.Sh SEE ALSO
226*e4b0a90eSBrooks Davis.Xr geom 4 ,
227*e4b0a90eSBrooks Davis.Xr loader.conf 5 ,
228*e4b0a90eSBrooks Davis.Xr ccdconfig 8 ,
229*e4b0a90eSBrooks Davis.Xr geom 8 ,
230*e4b0a90eSBrooks Davis.Xr gvinum 8 ,
231*e4b0a90eSBrooks Davis.Xr mount 8 ,
232*e4b0a90eSBrooks Davis.Xr newfs 8 ,
233*e4b0a90eSBrooks Davis.Xr sysctl 8 ,
234*e4b0a90eSBrooks Davis.Xr umount 8
235*e4b0a90eSBrooks Davis.Sh HISTORY
236*e4b0a90eSBrooks DavisThe
237*e4b0a90eSBrooks Davis.Nm
238*e4b0a90eSBrooks Davisutility appeared in
239*e4b0a90eSBrooks Davis.Fx 5.3 .
240*e4b0a90eSBrooks Davis.Sh AUTHORS
241*e4b0a90eSBrooks Davis.An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org
242