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