1.\" $NetBSD: ccdconfig.8,v 1.24 2008/04/30 13:10:52 martin 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.Op Fl M Ar core 60.Op Fl N Ar system 61.Oo 62.Ar ccd Oo ... 63.Oc 64.Oc 65.Sh DESCRIPTION 66.Nm 67is used to dynamically configure and unconfigure concatenated disk 68devices, or ccds. 69For more information about the ccd, see 70.Xr ccd 4 . 71.Pp 72The options are as follows: 73.Bl -tag -width indent 74.It Fl c 75Configure a ccd. 76This is the default behavior of 77.Nm . 78.It Fl C 79Configure all ccd devices listed in the ccd configuration file. 80.It Fl f Ar config_file 81When configuring or unconfiguring all devices, read the file 82.Pa config_file 83instead of the default 84.Pa /etc/ccd.conf . 85.It Fl g 86Dump the current ccd configuration in a format suitable 87for use as the ccd configuration file. 88If no arguments are specified, every configured ccd is dumped. 89Otherwise, the configuration of each listed ccd is dumped. 90.It Fl M Ar core 91Extract values associated with the name list from 92.Pa core 93instead of the default 94.Pa /dev/mem . 95.It Fl N Ar system 96Extract the name list from 97.Pa system 98instead of the default 99.Pa /netbsd . 100.It Fl u 101Unconfigure a ccd. 102.It Fl U 103Unconfigure all ccd devices listed the ccd configuration file. 104.It Fl v 105Causes 106.Nm 107to be verbose. 108.El 109.Pp 110A ccd is described on the command line and in the ccd configuration 111file by the name of the ccd, the interleave factor, 112the ccd configuration flags, and a list of one or more devices. 113The flags may be represented as a decimal number, a hexadecimal number, 114a comma-separated list of strings, or the word 115.Dq none . 116The flags are as follows: 117.Bl -column -offset indent "CCDF_UNIFORM " "0x02 " 118.Em "Symbolic Numeric Comment" 119.It CCDF_UNIFORM 0x02 Use uniform interleave. 120The size of all components is clamped to that of the smallest component. 121.It CCDF_NOLABEL 0x04 Ignore raw disklabel. 122Useful when creating a new ccd. 123.El 124.Ss /etc/ccd.conf 125The file 126.Pa /etc/ccd.conf 127is used to configure 128.Nm 129if 130.Fl C 131or 132.Fl U 133is used. 134Each line of the configuration file contains arguments as per the 135.Fl c 136argument: 137.Ar ccd 138.Ar ileave 139.Op Ar flags 140.Ar dev 141.Op Ar ... 142.Pp 143A 144.Sq # 145is a comment, and everything to end of line is ignored. 146A 147.Sq \e 148at the end of a line indicates that the next line should be concatenated 149with the current. 150A 151.Sq \e 152preceding any character (other than the end of line) prevents that 153character's special meaning from taking effect. 154.Pp 155See 156.Sx EXAMPLES 157for an example of 158.Pa /etc/ccd.conf . 159.Sh FILES 160/etc/ccd.conf - default ccd configuration file. 161.Sh EXAMPLES 162The following command, executed from the command line, would configure ccd0 163with 4 components (/dev/sd2e, /dev/sd3e, /dev/sd4e, /dev/sd5e), and an 164interleave factor of 32 blocks. 165.Bd -unfilled -offset indent 166# ccdconfig ccd0 32 0 /dev/sd2e /dev/sd3e /dev/sd4e /dev/sd5e 167.Ed 168.Pp 169An example 170.Pa /etc/ccd.conf : 171.Bd -unfilled -offset indent 172# 173# /etc/ccd.conf 174# Configuration file for concatenated disk devices 175# 176.Pp 177# ccd ileave flags component devices 178ccd0 16 none /dev/sd2e /dev/sd3e 179.Ed 180.Sh SEE ALSO 181.Xr ccd 4 , 182.Xr ccd.conf 5 , 183.Xr rc 8 184.Sh HISTORY 185The 186.Nm 187command first appeared in 188.Nx 1.1 . 189