1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
|
.\" $NetBSD: ccdconfig.8,v 1.30 2026/02/21 02:38:38 uwe Exp $
.\"
.\" Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Jason R. Thorpe.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd February 20, 2026
.Dt CCDCONFIG 8
.Os
.Sh NAME
.Nm ccdconfig
.Nd configuration utility for the concatenated disk driver
.Sh SYNOPSIS
.
.Nm
.Op Fl cv
.Ar ccd
.Ar ileave
.Op Ar flags
.Ar dev \&...
.
.Nm
.Fl C
.Op Fl v
.Op Fl f Ar config_file
.
.Nm
.Fl u
.Op Fl v
.Ar ccd \&...
.
.Nm
.Fl U
.Op Fl v
.Op Fl f Ar config_file
.
.Nm
.Fl g
.Op Fl vWw
.Op Ar ccd \&...
.
.Nm
.Fl p
.Op Fl hsVvWw
.Op Ar ccd \&...
.
.Sh DESCRIPTION
.Nm
is used to dynamically configure and unconfigure concatenated disk
devices, or ccds.
For more information see
.Xr ccd 4 .
.Pp
The options are as follows:
.Bl -tag -width Fl
.It Fl c
Configure a ccd.
The ccd to configure is given as
.Ar ccd ,
it is usually the name of a
.Xr ccd 4
device relative to
.Pa /dev .
This is the default behavior of
.Nm .
.It Fl C
Configure all ccd devices listed in the ccd configuration file.
.It Fl f Ar config_file
When configuring or unconfiguring all devices, read the file
.Pa config_file
instead of the default
.Pa /etc/ccd.conf .
.It Fl g
Dump the current ccd configuration in a format suitable
for use as the ccd configuration file.
If no arguments are specified, every configured ccd is dumped.
Otherwise, the configuration of each listed ccd is dumped.
.It Fl h
With
.Fl p
show the size as a number of bytes, rather than sectors,
and interpreted by
.Xr humanize_number 3 .
.It Fl s
With
.Fl p
show the flags in string form, rather than as a number.
.It Fl u
Unconfigure one, or more, ccds.
.It Fl U
Unconfigure all ccd devices listed in the ccd configuration file.
.It Fl V
Identical to
.Fl v ,
except when used with
.Fl p
a more ornate layout is used.
.It Fl v
Causes
.Nm
to be verbose.
When used with
.Fl c
or
.Fl C
information about the ccd being configured is printed.
When used with
.Fl u
or
.Fl U
a message indicating that the ccd has been unconfigured is printed.
When used with
.Fl g
or
.Fl p
a header line is printed before the output.
In the case of
.Fl g
the header is in a format that will be treated as a comment
if included in a ccd configuration file.
.It Fl W
With
.Fl g
or
.Fl p
when a component device of a ccd is a wedge with a label,
print the label in
.Li NAME=label
format instead of the wedge device name.
Wedge names in this format are always accepted as a
.Ar dev
.Pq component device
argument.
.It Fl w
The same as
.Fl W
except wedge labels which contain any of
.Ql \~
.Pq space ,
.Ql \et
.Pq tab ,
or
.Ql \en
.Pq newline
are treated as if no label exists; the wedge device name is used.
.El
.Pp
See the
.Sx ENVIRONMENT
section below for some extra options.
.Pp
A ccd is described on the command line and in the ccd configuration
file by the name of the ccd
.Po
the string
.Dq Cm ccd
with a decimal unit number appended
.Pc ,
the interleave factor,
the ccd configuration flags, and a list of one or more devices.
An interleave factor of 0 means that the devices are
concatenated serially, not interleaved.
The flags may be represented as a decimal number, a hexadecimal number,
a comma-separated list of strings, or the word
.Sq Li none .
The flags are as follows:
.Bl -column -offset indent ".Dv CCDF_UNIFORM" ".Sy Numeric"
.It Sy Symbolic Ta Sy Numeric Ta Sy Comment.
.It Dv CCDF_UNIFORM Ta Li 0x02 Ta Use uniform interleave.
The size of all components is clamped to that of the smallest component.
.It Dv CCDF_NOLABEL Ta Li 0x04 Ta Ignore raw disklabel.
Useful when creating a new ccd.
.El
.Pp
The aliases
.Sq Li uniform
and
.Sq Li nolabel
may be used instead of the formal names, and are printed when
.Nm
.Fl ps
is requested.
In all cases when considering input names of flags, character case is ignored.
.Ss /etc/ccd.conf
The file
.Pa /etc/ccd.conf
is used to configure
.Nm
if
.Fl C
or
.Fl U
is used without
.Fl f .
Each line of the configuration file contains arguments as per the
.Fl c
argument:
.Ar ccd Ar ileave Oo Ar flags Oc Ar dev \&...
.Pp
A
.Ql #
is a comment, and everything to end of line is ignored.
A
.Ql \e
at the end of a line indicates that the next line should be concatenated
with the current.
A
.Ql \e
preceding any character
.Pq other than the end of line
prevents that character's special meaning from taking effect.
.Pp
See
.Sx EXAMPLES
for an example of
.Pa /etc/ccd.conf .
.Sh ENVIRONMENT
The name
.Ev CCDCONFIG
in the environment passed to
.Nm ,
can be set to a string containing of one or more of the
characters:
.Ql h
.Ql s
.Ql V
.Ql v
.Ql W
and
.Ql w ,
to cause the appropriate option to default to on.
Any other characters in the value of
.Ev CCDCONFIG
are ignored.
To allow these defaults to be overridden for a particular instance of
.Nm ,
additional options,
not shown in the
.Sx SYNOPSIS ,
listed above, or output in a usage message,
can be used on the command line to override settings from
.Ev CCDCONFIG .
.Fl D
will disable
.Ql w
and
.Ql W ,
.Fl n
will disable
.Ql h ,
.Fl q
will disable
.Ql v
and
.Ql V ,
and
.Fl S
will disable
.Ql s .
In addition the options in each of the option pairs
.Fl W
and
.Fl w ,
and
.Fl V
and
.Fl v ,
are mutually exclusive, using one on the command line will
override an earlier use of the other, or use of the other
character in
.Ev CCDCONFIG .
.Sh FILES
.Bl -tag -width Pa -compact
.It Pa /etc/ccd.conf
default ccd configuration file.
.El
.Sh EXAMPLES
The following command, executed from the command line, would configure
.Pa ccd0
with 4 components
.Po
.Pa /dev/sd2e ,
.Pa /dev/sd3e ,
.Pa /dev/sd4e ,
.Pa /dev/sd5e
.Pc ,
and an interleave factor of 32 blocks.
.Pp
.Dl ccdconfig ccd0 32 0 /dev/sd2e /dev/sd3e /dev/sd4e /dev/sd5e
.Pp
.Pp
An example
.Pa /etc/ccd.conf :
.Bd -literal -offset indent
#
# /etc/ccd.conf
# Configuration file for concatenated disk devices
#
.Pp
# ccd ileave flags component devices
ccd0 16 none /dev/sd2e /dev/sd3e
.Ed
.Sh SEE ALSO
.Xr humanize_number 3 ,
.Xr ccd 4 ,
.Xr ccd.conf 5 ,
.Xr rc 8
.Sh HISTORY
The
.Nm
command first appeared in
.Nx 1.1 .
The
.Fl W
.Pq and Fl w
option,
and the
.Fl p
option, and its related options,
first appeared in
.Nx 12.0 .
|