1.\" $NetBSD: ccdconfig.8,v 1.26 2013/04/27 17:12:36 christos 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 October 17, 2003 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. 101The flags may be represented as a decimal number, a hexadecimal number, 102a comma-separated list of strings, or the word 103.Dq none . 104The flags are as follows: 105.Bl -column -offset indent "CCDF_UNIFORM " "0x02 " 106.It Em "Symbolic Numeric Comment" 107.It CCDF_UNIFORM 0x02 Use uniform interleave. 108The size of all components is clamped to that of the smallest component. 109.It CCDF_NOLABEL 0x04 Ignore raw disklabel. 110Useful when creating a new ccd. 111.El 112.Ss /etc/ccd.conf 113The file 114.Pa /etc/ccd.conf 115is used to configure 116.Nm 117if 118.Fl C 119or 120.Fl U 121is used. 122Each line of the configuration file contains arguments as per the 123.Fl c 124argument: 125.Ar ccd 126.Ar ileave 127.Op Ar flags 128.Ar dev 129.Op Ar ... 130.Pp 131A 132.Sq # 133is a comment, and everything to end of line is ignored. 134A 135.Sq \e 136at the end of a line indicates that the next line should be concatenated 137with the current. 138A 139.Sq \e 140preceding any character (other than the end of line) prevents that 141character's special meaning from taking effect. 142.Pp 143See 144.Sx EXAMPLES 145for an example of 146.Pa /etc/ccd.conf . 147.Sh FILES 148/etc/ccd.conf - default ccd configuration file. 149.Sh EXAMPLES 150The following command, executed from the command line, would configure ccd0 151with 4 components (/dev/sd2e, /dev/sd3e, /dev/sd4e, /dev/sd5e), and an 152interleave factor of 32 blocks. 153.Bd -unfilled -offset indent 154# ccdconfig ccd0 32 0 /dev/sd2e /dev/sd3e /dev/sd4e /dev/sd5e 155.Ed 156.Pp 157An example 158.Pa /etc/ccd.conf : 159.Bd -unfilled -offset indent 160# 161# /etc/ccd.conf 162# Configuration file for concatenated disk devices 163# 164.Pp 165# ccd ileave flags component devices 166ccd0 16 none /dev/sd2e /dev/sd3e 167.Ed 168.Sh SEE ALSO 169.Xr ccd 4 , 170.Xr ccd.conf 5 , 171.Xr rc 8 172.Sh HISTORY 173The 174.Nm 175command first appeared in 176.Nx 1.1 . 177