CCDCONFIG(8)

NAME
ccdconfig - configuration utility for the concatenated disk driver

SYNOPSIS
ccdconfig [-cv] ccd ileave [flags] dev ...
ccdconfig -C [-v] [-f config_file]
ccdconfig -u [-v] ccd ...
ccdconfig -U [-v] [-f config_file]
ccdconfig -g [-vWw] [ccd ...]
ccdconfig -p [-hsVvWw] [ccd ...]

DESCRIPTION
ccdconfig is used to dynamically configure and unconfigure concatenated disk devices, or ccds. For more information see ccd(4).

The options are as follows:

-c  Configure a ccd. The ccd to configure is given as ccd, it is usually the name of a ccd(4) device relative to /dev. This is the default behavior of ccdconfig.

-C  Configure all ccd devices listed in the ccd configuration file.

-f config_file
    When configuring or unconfiguring all devices, read the file config_file instead of the default /etc/ccd.conf.

-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.

-h  With -p show the size as a number of bytes, rather than sectors, and interpreted by humanize_number(3).

-s  With -p show the flags in string form, rather than as a number.

-u  Unconfigure one, or more, ccds.

-U  Unconfigure all ccd devices listed in the ccd configuration file.

-V  Identical to -v, except when used with -p a more ornate layout is used.

-v  Causes ccdconfig to be verbose. When used with -c or -C information about the ccd being configured is printed. When used with -u or -U a message indicating that the ccd has been unconfigured is printed. When used with -g or -p a header line is printed before the output. In the case of -g the header is in a format that will be treated as a comment if included in a ccd configuration file.

-W  With -g or -p when a component device of a ccd is a wedge with a label, print the label in NAME=label format instead of the wedge device name. Wedge names in this format are always accepted as a dev (component device) argument.

-w  The same as -W except wedge labels which contain any of ‘ ’ (space), ‘\t’ (tab), or ‘\n’ (newline) are treated as if no label exists; the wedge device name is used.

See the ENVIRONMENT section below for some extra options.

A ccd is described on the command line and in the ccd configuration file by the name of the ccd ( the string “ccd” with a decimal unit number appended), 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 ‘none’. The flags are as follows:
Symbolic | Numeric | Comment.
CCDF_UNIFORM | 0x02 | Use uniform interleave.
The size of all components is clamped to that of the smallest component.
CCDF_NOLABEL | 0x04 | Ignore raw disklabel.
Useful when creating a new ccd.

The aliases ‘uniform’ and ‘nolabel’ may be used instead of the formal names, and are printed when ccdconfig -ps is requested. In all cases when considering input names of flags, character case is ignored.

  /etc/ccd.conf
The file /etc/ccd.conf is used to configure ccdconfig if -C or -U is used without -f. Each line of the configuration file contains arguments as per the -c argument: ccd ileave [flags] dev ...

A ‘#’ is a comment, and everything to end of line is ignored. A ‘\’ at the end of a line indicates that the next line should be concatenated with the current. A ‘\’ preceding any character (other than the end of line) prevents that character's special meaning from taking effect.

See EXAMPLES for an example of /etc/ccd.conf.

ENVIRONMENT
The name CCDCONFIG in the environment passed to ccdconfig, can be set to a string containing of one or more of the characters: ‘h’ ‘s’ ‘V’ ‘v’ ‘W’ and ‘w’, to cause the appropriate option to default to on. Any other characters in the value of CCDCONFIG are ignored. To allow these defaults to be overridden for a particular instance of ccdconfig, additional options, not shown in the SYNOPSIS, listed above, or output in a usage message, can be used on the command line to override settings from CCDCONFIG. -D will disable ‘w’ and ‘W’, -n will disable ‘h’, -q will disable ‘v’ and ‘V’, and -S will disable ‘s’. In addition the options in each of the option pairs -W and -w, and -V and -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 CCDCONFIG.

FILES
/etc/ccd.conf
    default ccd configuration file.

EXAMPLES
The following command, executed from the command line, would configure ccd0 with 4 components ( /dev/sd2e, /dev/sd3e, /dev/sd4e, /dev/sd5e), and an interleave factor of 32 blocks.

    ccdconfig ccd0 32 0 /dev/sd2e /dev/sd3e /dev/sd4e /dev/sd5e

An example /etc/ccd.conf:

    #
    # /etc/ccd.conf
    # Configuration file for concatenated disk devices
    #

    # ccd           ileave  flags   component devices
    ccd0            16      none    /dev/sd2e /dev/sd3e

SEE ALSO
humanize_number(3), ccd(4), ccd.conf(5), rc(8)

HISTORY
The ccdconfig command first appeared in NetBSD 1.1. The -W (and -w) option, and the -p option, and its related options, first appeared in NetBSD 12.0.