summaryrefslogtreecommitdiff
path: root/sbin/ccdconfig/ccdconfig.8
blob: e74f2a57ac22d066e3442d5c44326f9428dc099f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
.\"	$OpenBSD: ccdconfig.8,v 1.9 1998/09/17 04:14:51 aaron Exp $
.\"	$NetBSD: ccdconfig.8,v 1.4 1996/02/28 01:01:17 thorpej Exp $
.\"
.\" Copyright (c) 1996 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.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"        This product includes software developed by the NetBSD
.\"        Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\"    contributors may be used to endorse or promote products derived
.\"    from this software without specific prior written permission.
.\"
.\" 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 REGENTS 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 July 17, 1995
.Dt CCDCONFIG 8
.Os
.Sh NAME
.Nm ccdconfig
.Nd configuration utility for the concatenated disk driver
.Sh SYNOPSIS
.Nm ccdconfig
.Op Fl cv
.Ar ccd
.Ar ileave
.Ar flags
.Ar dev
.Op Ar ...
.Nm ccdconfig
.Fl C
.Op Fl v
.Op Fl f Ar config_file
.Nm ccdconfig
.Fl u
.Op Fl v
.Ar ccd
.Op Ar ...
.Nm ccdconfig
.Fl U
.Op Fl v
.Op Fl f Ar config_file
.Nm ccdconfig
.Fl g
.Op Fl M Ar core
.Op Fl N Ar system
.Oo
.Ar ccd Oo ...
.Oc
.Oc
.Sh DESCRIPTION
.Nm ccdconfig
is used to dynamically configure and unconfigure concatenated disk
devices, or ccds.  For more information about the ccd, see
.Xr ccd 4 .
.Pp
The options are as follows:
.Bl -tag -width indent
.It Fl c
Configure a ccd.  This is the default behavior of
.Nm ccdconfig .
.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 M Ar core
Extract values associated with the name list from
.Ar core
instead of the default
.Pa /dev/mem .
.It Fl N Ar system
Extract the name list from
.Ar system
instead of the default
.Pa /bsd .
.It Fl u
Unconfigure a ccd.
.It Fl U
Unconfigure all ccd devices listed the ccd configuration file.
.It Fl v
Causes
.Nm ccdconfig
to be verbose.
.El
.Pp
A ccd is described on the command line and in the ccd configuration
file by the name of the ccd, the interleave factor, the ccd configuration
flags, and a list of one or more devices.  The flags may be represented
as a decimal number, a hexadecimal number, a comma-separated list
of strings, or the word
.Dq none .
The flags are as follows:
.Bd -unfilled -offset indent
CCDF_SWAP		0x01		Interleave should be dmmax.
CCDF_UNIFORM	0x02		Use uniform interleave.
CCDF_MIRROR	0x04		Enable data mirroring.
CCDF_OLD		0x08		Use old unoptimized I/O protocol.
.Ed
.Pp
The format in the
configuration file appears exactly as if it were entered on the command line.
Note that on the command line and in the configuration file, the
.Ar flags
argument is optional.
.Bd -unfilled -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
.Pp
.Sh EXAMPLE
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.
.Bd -unfilled -offset indent
# ccdconfig ccd0 32 0 /dev/sd2e /dev/sd3e /dev/sd4e /dev/sd5e
.Ed
.Pp
.Sh FILES
.Bl -tag -width /etc/ccd.conf -compact
.It Pa /etc/ccd.conf
default ccd configuration file
.El
.Sh SEE ALSO
.Xr ccd 4 ,
.Xr rc 8
.Sh HISTORY
The
.Nm ccdconfig
command first appeared in
.Nx 1.0a .