.\" $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 . .