1.\" $NetBSD: ccdconfig.8,v 1.27 2014/08/13 13:14:35 apb Exp $ 2.\" 3.\" Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Jason R. Thorpe. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd August 13, 2014 31.Dt CCDCONFIG 8 32.Os 33.Sh NAME 34.Nm ccdconfig 35.Nd configuration utility for the concatenated disk driver 36.Sh SYNOPSIS 37.Nm 38.Op Fl cv 39.Ar ccd 40.Ar ileave 41.Op Ar flags 42.Ar dev 43.Op Ar ... 44.Nm 45.Fl C 46.Op Fl v 47.Op Fl f Ar config_file 48.Nm 49.Fl u 50.Op Fl v 51.Ar ccd 52.Op Ar ... 53.Nm 54.Fl U 55.Op Fl v 56.Op Fl f Ar config_file 57.Nm 58.Fl g 59.Oo 60.Ar ccd Oo ... 61.Oc 62.Oc 63.Sh DESCRIPTION 64.Nm 65is used to dynamically configure and unconfigure concatenated disk 66devices, or ccds. 67For more information about the ccd, see 68.Xr ccd 4 . 69.Pp 70The options are as follows: 71.Bl -tag -width indent 72.It Fl c 73Configure a ccd. 74This is the default behavior of 75.Nm . 76.It Fl C 77Configure all ccd devices listed in the ccd configuration file. 78.It Fl f Ar config_file 79When configuring or unconfiguring all devices, read the file 80.Pa config_file 81instead of the default 82.Pa /etc/ccd.conf . 83.It Fl g 84Dump the current ccd configuration in a format suitable 85for use as the ccd configuration file. 86If no arguments are specified, every configured ccd is dumped. 87Otherwise, the configuration of each listed ccd is dumped. 88.It Fl u 89Unconfigure a ccd. 90.It Fl U 91Unconfigure all ccd devices listed the ccd configuration file. 92.It Fl v 93Causes 94.Nm 95to be verbose. 96.El 97.Pp 98A ccd is described on the command line and in the ccd configuration 99file by the name of the ccd, the interleave factor, 100the ccd configuration flags, and a list of one or more devices. 101An interleave factor of 0 means that the devices are 102concatenated serially, not interleaved. 103The flags may be represented as a decimal number, a hexadecimal number, 104a comma-separated list of strings, or the word 105.Dq none . 106The flags are as follows: 107.Bl -column -offset indent "CCDF_UNIFORM " "0x02 " 108.It Em "Symbolic Numeric Comment" 109.It CCDF_UNIFORM 0x02 Use uniform interleave. 110The size of all components is clamped to that of the smallest component. 111.It CCDF_NOLABEL 0x04 Ignore raw disklabel. 112Useful when creating a new ccd. 113.El 114.Ss /etc/ccd.conf 115The file 116.Pa /etc/ccd.conf 117is used to configure 118.Nm 119if 120.Fl C 121or 122.Fl U 123is used. 124Each line of the configuration file contains arguments as per the 125.Fl c 126argument: 127.Ar ccd 128.Ar ileave 129.Op Ar flags 130.Ar dev 131.Op Ar ... 132.Pp 133A 134.Sq # 135is a comment, and everything to end of line is ignored. 136A 137.Sq \e 138at the end of a line indicates that the next line should be concatenated 139with the current. 140A 141.Sq \e 142preceding any character (other than the end of line) prevents that 143character's special meaning from taking effect. 144.Pp 145See 146.Sx EXAMPLES 147for an example of 148.Pa /etc/ccd.conf . 149.Sh FILES 150/etc/ccd.conf - default ccd configuration file. 151.Sh EXAMPLES 152The following command, executed from the command line, would configure ccd0 153with 4 components (/dev/sd2e, /dev/sd3e, /dev/sd4e, /dev/sd5e), and an 154interleave factor of 32 blocks. 155.Bd -unfilled -offset indent 156# ccdconfig ccd0 32 0 /dev/sd2e /dev/sd3e /dev/sd4e /dev/sd5e 157.Ed 158.Pp 159An example 160.Pa /etc/ccd.conf : 161.Bd -unfilled -offset indent 162# 163# /etc/ccd.conf 164# Configuration file for concatenated disk devices 165# 166.Pp 167# ccd ileave flags component devices 168ccd0 16 none /dev/sd2e /dev/sd3e 169.Ed 170.Sh SEE ALSO 171.Xr ccd 4 , 172.Xr ccd.conf 5 , 173.Xr rc 8 174.Sh HISTORY 175The 176.Nm 177command first appeared in 178.Nx 1.1 . 179