xref: /freebsd/lib/geom/concat/gconcat.8 (revision 734e82fe33aa764367791a7d603b383996c6b40b)
1.\" Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
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.
12.\"
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
23.\" SUCH DAMAGE.
24.\"
25.Dd June 14, 2021
26.Dt GCONCAT 8
27.Os
28.Sh NAME
29.Nm gconcat
30.Nd "disk concatenation control utility"
31.Sh SYNOPSIS
32.Nm
33.Cm create
34.Op Fl v
35.Ar name
36.Ar prov ...
37.Nm
38.Cm destroy
39.Op Fl fv
40.Ar name ...
41.Nm
42.Cm label
43.Op Fl hv
44.Ar name
45.Ar prov ...
46.Nm
47.Cm append
48.Op Fl hv
49.Ar name
50.Ar prov
51.Nm
52.Cm stop
53.Op Fl fv
54.Ar name ...
55.Nm
56.Cm clear
57.Op Fl v
58.Ar prov ...
59.Nm
60.Cm dump
61.Ar prov ...
62.Nm
63.Cm list
64.Nm
65.Cm status
66.Nm
67.Cm load
68.Nm
69.Cm unload
70.Sh DESCRIPTION
71The
72.Nm
73utility is used for device concatenation configuration.
74The concatenation can be configured using two different methods:
75.Dq manual
76or
77.Dq automatic .
78When using the
79.Dq manual
80method, no metadata are stored on the devices, so the concatenated
81device has to be configured by hand every time it is needed.
82The
83.Dq automatic
84method uses on-disk metadata to detect devices.
85Once devices are labeled, they will be automatically detected and
86configured.
87.Pp
88The first argument to
89.Nm
90indicates an action to be performed:
91.Bl -tag -width ".Cm destroy"
92.It Cm create
93Concatenate the given devices with specified
94.Ar name .
95This is the
96.Dq manual
97method.
98The kernel module
99.Pa geom_concat.ko
100will be loaded if it is not loaded already.
101.It Cm label
102Concatenate the given devices with the specified
103.Ar name .
104This is the
105.Dq automatic
106method, where metadata are stored in every device's last sector.
107The kernel module
108.Pa geom_concat.ko
109will be loaded if it is not loaded already.
110.Pp
111Additional options include:
112.Bl -tag -width ".Fl h"
113.It Fl h
114Hardcode providers' names in metadata.
115.El
116.It Cm append
117Append a new device to the end of an existing concatenate device
118with the specified
119.Ar name .
120.Pp
121If the existing device is using the
122.Dq manual
123method, the new device is simply appended as-is.
124.Pp
125If the existing device is using the
126.Dq automatic
127method, the device is appended persistently.
128New
129.Cm gconcat
130metadata is written to all existing components, as well as to the
131newly added one.
132.Pp
133Additional options include:
134.Bl -tag -width ".Fl h"
135.It Fl h
136Hardcode providers' names in metadata.
137.El
138.It Cm stop
139Turn off existing concatenate device by its
140.Ar name .
141This command does not touch on-disk metadata!
142.Pp
143Additional options include:
144.Bl -tag -width ".Fl f"
145.It Fl f
146Stop the given device even if it is opened.
147.El
148.It Cm destroy
149Same as
150.Cm stop .
151.It Cm clear
152Clear metadata on the given devices.
153.It Cm dump
154Dump metadata stored on the given devices.
155.It Cm list
156See
157.Xr geom 8 .
158.It Cm status
159See
160.Xr geom 8 .
161.It Cm load
162See
163.Xr geom 8 .
164.It Cm unload
165See
166.Xr geom 8 .
167.El
168.Pp
169Additional options:
170.Bl -tag -width indent
171.It Fl v
172Be more verbose.
173.El
174.Sh SYSCTL VARIABLES
175The following
176.Xr sysctl 8
177variables can be used to control the behavior of the
178.Nm CONCAT
179GEOM class.
180The default value is shown next to each variable.
181.Bl -tag -width indent
182.It Va kern.geom.concat.debug : No 0
183Debug level of the
184.Nm CONCAT
185GEOM class.
186This can be set to a number between 0 and 3 inclusive.
187If set to 0 minimal debug information is printed, and if set to 3 the
188maximum amount of debug information is printed.
189.El
190.Sh EXIT STATUS
191Exit status is 0 on success, and 1 if the command fails.
192.Sh EXAMPLES
193The following example shows how to configure four disks for automatic
194concatenation, create a file system on it, and mount it:
195.Bd -literal -offset indent
196gconcat label -v data /dev/da0 /dev/da1 /dev/da2 /dev/da3
197newfs /dev/concat/data
198mount /dev/concat/data /mnt
199[...]
200umount /mnt
201gconcat stop data
202gconcat unload
203.Ed
204.Pp
205Configure concatenated provider on one disk only.
206Create file system.
207Add two more disks and extend existing file system.
208.Bd -literal -offset indent
209gconcat label data /dev/da0
210newfs /dev/concat/data
211gconcat label data /dev/da0 /dev/da1 /dev/da2
212growfs /dev/concat/data
213.Ed
214.Sh SEE ALSO
215.Xr geom 4 ,
216.Xr loader.conf 5 ,
217.Xr geom 8 ,
218.Xr growfs 8 ,
219.Xr gvinum 8 ,
220.Xr mount 8 ,
221.Xr newfs 8 ,
222.Xr sysctl 8 ,
223.Xr umount 8
224.Sh HISTORY
225The
226.Nm
227utility appeared in
228.Fx 5.3 .
229.Sh AUTHORS
230.An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org
231