xref: /freebsd/lib/geom/concat/gconcat.8 (revision 27bd6c32bbb49a592a0dfbec5f211a7c2fed31d6)
1e4b0a90eSBrooks Davis.\" Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
2e4b0a90eSBrooks Davis.\" All rights reserved.
3e4b0a90eSBrooks Davis.\"
4e4b0a90eSBrooks Davis.\" Redistribution and use in source and binary forms, with or without
5e4b0a90eSBrooks Davis.\" modification, are permitted provided that the following conditions
6e4b0a90eSBrooks Davis.\" are met:
7e4b0a90eSBrooks Davis.\" 1. Redistributions of source code must retain the above copyright
8e4b0a90eSBrooks Davis.\"    notice, this list of conditions and the following disclaimer.
9e4b0a90eSBrooks Davis.\" 2. Redistributions in binary form must reproduce the above copyright
10e4b0a90eSBrooks Davis.\"    notice, this list of conditions and the following disclaimer in the
11e4b0a90eSBrooks Davis.\"    documentation and/or other materials provided with the distribution.
12e4b0a90eSBrooks Davis.\"
13e4b0a90eSBrooks Davis.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14e4b0a90eSBrooks Davis.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15e4b0a90eSBrooks Davis.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16e4b0a90eSBrooks Davis.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17e4b0a90eSBrooks Davis.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18e4b0a90eSBrooks Davis.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19e4b0a90eSBrooks Davis.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20e4b0a90eSBrooks Davis.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21e4b0a90eSBrooks Davis.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22e4b0a90eSBrooks Davis.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23e4b0a90eSBrooks Davis.\" SUCH DAMAGE.
24e4b0a90eSBrooks Davis.\"
25*27bd6c32SJohn Baldwin.Dd January 23, 2025
26e4b0a90eSBrooks Davis.Dt GCONCAT 8
27e4b0a90eSBrooks Davis.Os
28e4b0a90eSBrooks Davis.Sh NAME
29e4b0a90eSBrooks Davis.Nm gconcat
30e4b0a90eSBrooks Davis.Nd "disk concatenation control utility"
31e4b0a90eSBrooks Davis.Sh SYNOPSIS
32e4b0a90eSBrooks Davis.Nm
33e4b0a90eSBrooks Davis.Cm create
34e4b0a90eSBrooks Davis.Op Fl v
35e4b0a90eSBrooks Davis.Ar name
36e4b0a90eSBrooks Davis.Ar prov ...
37e4b0a90eSBrooks Davis.Nm
38e4b0a90eSBrooks Davis.Cm destroy
39e4b0a90eSBrooks Davis.Op Fl fv
40e4b0a90eSBrooks Davis.Ar name ...
41e4b0a90eSBrooks Davis.Nm
42e4b0a90eSBrooks Davis.Cm label
43e4b0a90eSBrooks Davis.Op Fl hv
44e4b0a90eSBrooks Davis.Ar name
45e4b0a90eSBrooks Davis.Ar prov ...
46e4b0a90eSBrooks Davis.Nm
47d575e81fSNoah Bergbauer.Cm append
48d575e81fSNoah Bergbauer.Op Fl hv
49d575e81fSNoah Bergbauer.Ar name
50d575e81fSNoah Bergbauer.Ar prov
51d575e81fSNoah Bergbauer.Nm
52e4b0a90eSBrooks Davis.Cm stop
53e4b0a90eSBrooks Davis.Op Fl fv
54e4b0a90eSBrooks Davis.Ar name ...
55e4b0a90eSBrooks Davis.Nm
56e4b0a90eSBrooks Davis.Cm clear
57e4b0a90eSBrooks Davis.Op Fl v
58e4b0a90eSBrooks Davis.Ar prov ...
59e4b0a90eSBrooks Davis.Nm
60e4b0a90eSBrooks Davis.Cm dump
61e4b0a90eSBrooks Davis.Ar prov ...
62e4b0a90eSBrooks Davis.Nm
63e4b0a90eSBrooks Davis.Cm list
64e4b0a90eSBrooks Davis.Nm
65e4b0a90eSBrooks Davis.Cm status
66e4b0a90eSBrooks Davis.Nm
67e4b0a90eSBrooks Davis.Cm load
68e4b0a90eSBrooks Davis.Nm
69e4b0a90eSBrooks Davis.Cm unload
70e4b0a90eSBrooks Davis.Sh DESCRIPTION
71e4b0a90eSBrooks DavisThe
72e4b0a90eSBrooks Davis.Nm
73e4b0a90eSBrooks Davisutility is used for device concatenation configuration.
74e4b0a90eSBrooks DavisThe concatenation can be configured using two different methods:
75e4b0a90eSBrooks Davis.Dq manual
76e4b0a90eSBrooks Davisor
77e4b0a90eSBrooks Davis.Dq automatic .
78e4b0a90eSBrooks DavisWhen using the
79e4b0a90eSBrooks Davis.Dq manual
80e4b0a90eSBrooks Davismethod, no metadata are stored on the devices, so the concatenated
81e4b0a90eSBrooks Davisdevice has to be configured by hand every time it is needed.
82e4b0a90eSBrooks DavisThe
83e4b0a90eSBrooks Davis.Dq automatic
84e4b0a90eSBrooks Davismethod uses on-disk metadata to detect devices.
85e4b0a90eSBrooks DavisOnce devices are labeled, they will be automatically detected and
86e4b0a90eSBrooks Davisconfigured.
87e4b0a90eSBrooks Davis.Pp
88e4b0a90eSBrooks DavisThe first argument to
89e4b0a90eSBrooks Davis.Nm
90e4b0a90eSBrooks Davisindicates an action to be performed:
91e4b0a90eSBrooks Davis.Bl -tag -width ".Cm destroy"
92e4b0a90eSBrooks Davis.It Cm create
93e4b0a90eSBrooks DavisConcatenate the given devices with specified
94e4b0a90eSBrooks Davis.Ar name .
95e4b0a90eSBrooks DavisThis is the
96e4b0a90eSBrooks Davis.Dq manual
97e4b0a90eSBrooks Davismethod.
98e4b0a90eSBrooks DavisThe kernel module
99e4b0a90eSBrooks Davis.Pa geom_concat.ko
100e4b0a90eSBrooks Daviswill be loaded if it is not loaded already.
101e4b0a90eSBrooks Davis.It Cm label
102e4b0a90eSBrooks DavisConcatenate the given devices with the specified
103e4b0a90eSBrooks Davis.Ar name .
104e4b0a90eSBrooks DavisThis is the
105e4b0a90eSBrooks Davis.Dq automatic
106e4b0a90eSBrooks Davismethod, where metadata are stored in every device's last sector.
107e4b0a90eSBrooks DavisThe kernel module
108e4b0a90eSBrooks Davis.Pa geom_concat.ko
109e4b0a90eSBrooks Daviswill be loaded if it is not loaded already.
110d575e81fSNoah Bergbauer.Pp
111d575e81fSNoah BergbauerAdditional options include:
112d575e81fSNoah Bergbauer.Bl -tag -width ".Fl h"
113d575e81fSNoah Bergbauer.It Fl h
114d575e81fSNoah BergbauerHardcode providers' names in metadata.
115d575e81fSNoah Bergbauer.El
116d575e81fSNoah Bergbauer.It Cm append
117d575e81fSNoah BergbauerAppend a new device to the end of an existing concatenate device
118d575e81fSNoah Bergbauerwith the specified
119d575e81fSNoah Bergbauer.Ar name .
120d575e81fSNoah Bergbauer.Pp
121d575e81fSNoah BergbauerIf the existing device is using the
122d575e81fSNoah Bergbauer.Dq manual
123d575e81fSNoah Bergbauermethod, the new device is simply appended as-is.
124d575e81fSNoah Bergbauer.Pp
125d575e81fSNoah BergbauerIf the existing device is using the
126d575e81fSNoah Bergbauer.Dq automatic
127d575e81fSNoah Bergbauermethod, the device is appended persistently.
128d575e81fSNoah BergbauerNew
129d575e81fSNoah Bergbauer.Cm gconcat
130d575e81fSNoah Bergbauermetadata is written to all existing components, as well as to the
131d575e81fSNoah Bergbauernewly added one.
132d575e81fSNoah Bergbauer.Pp
133d575e81fSNoah BergbauerAdditional options include:
134d575e81fSNoah Bergbauer.Bl -tag -width ".Fl h"
135d575e81fSNoah Bergbauer.It Fl h
136d575e81fSNoah BergbauerHardcode providers' names in metadata.
137d575e81fSNoah Bergbauer.El
138e4b0a90eSBrooks Davis.It Cm stop
139e4b0a90eSBrooks DavisTurn off existing concatenate device by its
140e4b0a90eSBrooks Davis.Ar name .
141e4b0a90eSBrooks DavisThis command does not touch on-disk metadata!
142d575e81fSNoah Bergbauer.Pp
143d575e81fSNoah BergbauerAdditional options include:
144d575e81fSNoah Bergbauer.Bl -tag -width ".Fl f"
145d575e81fSNoah Bergbauer.It Fl f
146d575e81fSNoah BergbauerStop the given device even if it is opened.
147d575e81fSNoah Bergbauer.El
148e4b0a90eSBrooks Davis.It Cm destroy
149e4b0a90eSBrooks DavisSame as
150e4b0a90eSBrooks Davis.Cm stop .
151e4b0a90eSBrooks Davis.It Cm clear
152e4b0a90eSBrooks DavisClear metadata on the given devices.
153e4b0a90eSBrooks Davis.It Cm dump
154e4b0a90eSBrooks DavisDump metadata stored on the given devices.
155e4b0a90eSBrooks Davis.It Cm list
156e4b0a90eSBrooks DavisSee
157e4b0a90eSBrooks Davis.Xr geom 8 .
158e4b0a90eSBrooks Davis.It Cm status
159e4b0a90eSBrooks DavisSee
160e4b0a90eSBrooks Davis.Xr geom 8 .
161e4b0a90eSBrooks Davis.It Cm load
162e4b0a90eSBrooks DavisSee
163e4b0a90eSBrooks Davis.Xr geom 8 .
164e4b0a90eSBrooks Davis.It Cm unload
165e4b0a90eSBrooks DavisSee
166e4b0a90eSBrooks Davis.Xr geom 8 .
167e4b0a90eSBrooks Davis.El
168e4b0a90eSBrooks Davis.Pp
169e4b0a90eSBrooks DavisAdditional options:
170e4b0a90eSBrooks Davis.Bl -tag -width indent
171e4b0a90eSBrooks Davis.It Fl v
172e4b0a90eSBrooks DavisBe more verbose.
173e4b0a90eSBrooks Davis.El
174e4b0a90eSBrooks Davis.Sh SYSCTL VARIABLES
175e4b0a90eSBrooks DavisThe following
176e4b0a90eSBrooks Davis.Xr sysctl 8
177e4b0a90eSBrooks Davisvariables can be used to control the behavior of the
178e4b0a90eSBrooks Davis.Nm CONCAT
179e4b0a90eSBrooks DavisGEOM class.
180e4b0a90eSBrooks DavisThe default value is shown next to each variable.
181e4b0a90eSBrooks Davis.Bl -tag -width indent
182e4b0a90eSBrooks Davis.It Va kern.geom.concat.debug : No 0
183e4b0a90eSBrooks DavisDebug level of the
184e4b0a90eSBrooks Davis.Nm CONCAT
185e4b0a90eSBrooks DavisGEOM class.
186e4b0a90eSBrooks DavisThis can be set to a number between 0 and 3 inclusive.
187e4b0a90eSBrooks DavisIf set to 0 minimal debug information is printed, and if set to 3 the
188e4b0a90eSBrooks Davismaximum amount of debug information is printed.
189e4b0a90eSBrooks Davis.El
190e4b0a90eSBrooks Davis.Sh EXIT STATUS
191e4b0a90eSBrooks DavisExit status is 0 on success, and 1 if the command fails.
192e4b0a90eSBrooks Davis.Sh EXAMPLES
193e4b0a90eSBrooks DavisThe following example shows how to configure four disks for automatic
194e4b0a90eSBrooks Davisconcatenation, create a file system on it, and mount it:
195e4b0a90eSBrooks Davis.Bd -literal -offset indent
196e4b0a90eSBrooks Davisgconcat label -v data /dev/da0 /dev/da1 /dev/da2 /dev/da3
197e4b0a90eSBrooks Davisnewfs /dev/concat/data
198e4b0a90eSBrooks Davismount /dev/concat/data /mnt
199e4b0a90eSBrooks Davis[...]
200e4b0a90eSBrooks Davisumount /mnt
201e4b0a90eSBrooks Davisgconcat stop data
202e4b0a90eSBrooks Davisgconcat unload
203e4b0a90eSBrooks Davis.Ed
204e4b0a90eSBrooks Davis.Pp
205e4b0a90eSBrooks DavisConfigure concatenated provider on one disk only.
206e4b0a90eSBrooks DavisCreate file system.
207e4b0a90eSBrooks DavisAdd two more disks and extend existing file system.
208e4b0a90eSBrooks Davis.Bd -literal -offset indent
209e4b0a90eSBrooks Davisgconcat label data /dev/da0
210e4b0a90eSBrooks Davisnewfs /dev/concat/data
211e4b0a90eSBrooks Davisgconcat label data /dev/da0 /dev/da1 /dev/da2
212e4b0a90eSBrooks Davisgrowfs /dev/concat/data
213e4b0a90eSBrooks Davis.Ed
214e4b0a90eSBrooks Davis.Sh SEE ALSO
215e4b0a90eSBrooks Davis.Xr geom 4 ,
216e4b0a90eSBrooks Davis.Xr loader.conf 5 ,
217e4b0a90eSBrooks Davis.Xr geom 8 ,
218e4b0a90eSBrooks Davis.Xr growfs 8 ,
219e4b0a90eSBrooks Davis.Xr mount 8 ,
220e4b0a90eSBrooks Davis.Xr newfs 8 ,
221e4b0a90eSBrooks Davis.Xr sysctl 8 ,
222e4b0a90eSBrooks Davis.Xr umount 8
223e4b0a90eSBrooks Davis.Sh HISTORY
224e4b0a90eSBrooks DavisThe
225e4b0a90eSBrooks Davis.Nm
226e4b0a90eSBrooks Davisutility appeared in
227e4b0a90eSBrooks Davis.Fx 5.3 .
228e4b0a90eSBrooks Davis.Sh AUTHORS
229e4b0a90eSBrooks Davis.An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org
230