xref: /freebsd/lib/geom/concat/gconcat.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 GCONCAT 8
29*e4b0a90eSBrooks Davis.Os
30*e4b0a90eSBrooks Davis.Sh NAME
31*e4b0a90eSBrooks Davis.Nm gconcat
32*e4b0a90eSBrooks Davis.Nd "disk concatenation control utility"
33*e4b0a90eSBrooks Davis.Sh SYNOPSIS
34*e4b0a90eSBrooks Davis.Nm
35*e4b0a90eSBrooks Davis.Cm create
36*e4b0a90eSBrooks Davis.Op Fl v
37*e4b0a90eSBrooks Davis.Ar name
38*e4b0a90eSBrooks Davis.Ar prov ...
39*e4b0a90eSBrooks Davis.Nm
40*e4b0a90eSBrooks Davis.Cm destroy
41*e4b0a90eSBrooks Davis.Op Fl fv
42*e4b0a90eSBrooks Davis.Ar name ...
43*e4b0a90eSBrooks Davis.Nm
44*e4b0a90eSBrooks Davis.Cm label
45*e4b0a90eSBrooks Davis.Op Fl hv
46*e4b0a90eSBrooks Davis.Ar name
47*e4b0a90eSBrooks Davis.Ar 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 device concatenation configuration.
71*e4b0a90eSBrooks DavisThe concatenation 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 concatenated
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 DavisConcatenate the given devices with specified
91*e4b0a90eSBrooks Davis.Ar name .
92*e4b0a90eSBrooks DavisThis is the
93*e4b0a90eSBrooks Davis.Dq manual
94*e4b0a90eSBrooks Davismethod.
95*e4b0a90eSBrooks DavisThe kernel module
96*e4b0a90eSBrooks Davis.Pa geom_concat.ko
97*e4b0a90eSBrooks Daviswill be loaded if it is not loaded already.
98*e4b0a90eSBrooks Davis.It Cm label
99*e4b0a90eSBrooks DavisConcatenate the given devices with the specified
100*e4b0a90eSBrooks Davis.Ar name .
101*e4b0a90eSBrooks DavisThis is the
102*e4b0a90eSBrooks Davis.Dq automatic
103*e4b0a90eSBrooks Davismethod, where metadata are stored in every device's last sector.
104*e4b0a90eSBrooks DavisThe kernel module
105*e4b0a90eSBrooks Davis.Pa geom_concat.ko
106*e4b0a90eSBrooks Daviswill be loaded if it is not loaded already.
107*e4b0a90eSBrooks Davis.It Cm stop
108*e4b0a90eSBrooks DavisTurn off existing concatenate device by its
109*e4b0a90eSBrooks Davis.Ar name .
110*e4b0a90eSBrooks DavisThis command does not touch on-disk metadata!
111*e4b0a90eSBrooks Davis.It Cm destroy
112*e4b0a90eSBrooks DavisSame as
113*e4b0a90eSBrooks Davis.Cm stop .
114*e4b0a90eSBrooks Davis.It Cm clear
115*e4b0a90eSBrooks DavisClear metadata on the given devices.
116*e4b0a90eSBrooks Davis.It Cm dump
117*e4b0a90eSBrooks DavisDump metadata stored on the given devices.
118*e4b0a90eSBrooks Davis.It Cm list
119*e4b0a90eSBrooks DavisSee
120*e4b0a90eSBrooks Davis.Xr geom 8 .
121*e4b0a90eSBrooks Davis.It Cm status
122*e4b0a90eSBrooks DavisSee
123*e4b0a90eSBrooks Davis.Xr geom 8 .
124*e4b0a90eSBrooks Davis.It Cm load
125*e4b0a90eSBrooks DavisSee
126*e4b0a90eSBrooks Davis.Xr geom 8 .
127*e4b0a90eSBrooks Davis.It Cm unload
128*e4b0a90eSBrooks DavisSee
129*e4b0a90eSBrooks Davis.Xr geom 8 .
130*e4b0a90eSBrooks Davis.El
131*e4b0a90eSBrooks Davis.Pp
132*e4b0a90eSBrooks DavisAdditional options:
133*e4b0a90eSBrooks Davis.Bl -tag -width indent
134*e4b0a90eSBrooks Davis.It Fl f
135*e4b0a90eSBrooks DavisForce the removal of the specified concatenated device.
136*e4b0a90eSBrooks Davis.It Fl h
137*e4b0a90eSBrooks DavisHardcode providers' names in metadata.
138*e4b0a90eSBrooks Davis.It Fl v
139*e4b0a90eSBrooks DavisBe more verbose.
140*e4b0a90eSBrooks Davis.El
141*e4b0a90eSBrooks Davis.Sh SYSCTL VARIABLES
142*e4b0a90eSBrooks DavisThe following
143*e4b0a90eSBrooks Davis.Xr sysctl 8
144*e4b0a90eSBrooks Davisvariables can be used to control the behavior of the
145*e4b0a90eSBrooks Davis.Nm CONCAT
146*e4b0a90eSBrooks DavisGEOM class.
147*e4b0a90eSBrooks DavisThe default value is shown next to each variable.
148*e4b0a90eSBrooks Davis.Bl -tag -width indent
149*e4b0a90eSBrooks Davis.It Va kern.geom.concat.debug : No 0
150*e4b0a90eSBrooks DavisDebug level of the
151*e4b0a90eSBrooks Davis.Nm CONCAT
152*e4b0a90eSBrooks DavisGEOM class.
153*e4b0a90eSBrooks DavisThis can be set to a number between 0 and 3 inclusive.
154*e4b0a90eSBrooks DavisIf set to 0 minimal debug information is printed, and if set to 3 the
155*e4b0a90eSBrooks Davismaximum amount of debug information is printed.
156*e4b0a90eSBrooks Davis.El
157*e4b0a90eSBrooks Davis.Sh EXIT STATUS
158*e4b0a90eSBrooks DavisExit status is 0 on success, and 1 if the command fails.
159*e4b0a90eSBrooks Davis.Sh EXAMPLES
160*e4b0a90eSBrooks DavisThe following example shows how to configure four disks for automatic
161*e4b0a90eSBrooks Davisconcatenation, create a file system on it, and mount it:
162*e4b0a90eSBrooks Davis.Bd -literal -offset indent
163*e4b0a90eSBrooks Davisgconcat label -v data /dev/da0 /dev/da1 /dev/da2 /dev/da3
164*e4b0a90eSBrooks Davisnewfs /dev/concat/data
165*e4b0a90eSBrooks Davismount /dev/concat/data /mnt
166*e4b0a90eSBrooks Davis[...]
167*e4b0a90eSBrooks Davisumount /mnt
168*e4b0a90eSBrooks Davisgconcat stop data
169*e4b0a90eSBrooks Davisgconcat unload
170*e4b0a90eSBrooks Davis.Ed
171*e4b0a90eSBrooks Davis.Pp
172*e4b0a90eSBrooks DavisConfigure concatenated provider on one disk only.
173*e4b0a90eSBrooks DavisCreate file system.
174*e4b0a90eSBrooks DavisAdd two more disks and extend existing file system.
175*e4b0a90eSBrooks Davis.Bd -literal -offset indent
176*e4b0a90eSBrooks Davisgconcat label data /dev/da0
177*e4b0a90eSBrooks Davisnewfs /dev/concat/data
178*e4b0a90eSBrooks Davisgconcat label data /dev/da0 /dev/da1 /dev/da2
179*e4b0a90eSBrooks Davisgrowfs /dev/concat/data
180*e4b0a90eSBrooks Davis.Ed
181*e4b0a90eSBrooks Davis.Sh SEE ALSO
182*e4b0a90eSBrooks Davis.Xr geom 4 ,
183*e4b0a90eSBrooks Davis.Xr loader.conf 5 ,
184*e4b0a90eSBrooks Davis.Xr geom 8 ,
185*e4b0a90eSBrooks Davis.Xr growfs 8 ,
186*e4b0a90eSBrooks Davis.Xr gvinum 8 ,
187*e4b0a90eSBrooks Davis.Xr mount 8 ,
188*e4b0a90eSBrooks Davis.Xr newfs 8 ,
189*e4b0a90eSBrooks Davis.Xr sysctl 8 ,
190*e4b0a90eSBrooks Davis.Xr umount 8
191*e4b0a90eSBrooks Davis.Sh HISTORY
192*e4b0a90eSBrooks DavisThe
193*e4b0a90eSBrooks Davis.Nm
194*e4b0a90eSBrooks Davisutility appeared in
195*e4b0a90eSBrooks Davis.Fx 5.3 .
196*e4b0a90eSBrooks Davis.Sh AUTHORS
197*e4b0a90eSBrooks Davis.An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org
198