xref: /netbsd-src/share/man/man4/ccd.4 (revision b1c86f5f087524e68db12794ee9c3e3da1ab17a0)
1.\"	$NetBSD: ccd.4,v 1.29 2008/05/02 18:11:05 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.\" Copyright (c) 1994 Jason Downs.
31.\" All rights reserved.
32.\"
33.\" Redistribution and use in source and binary forms, with or without
34.\" modification, are permitted provided that the following conditions
35.\" are met:
36.\" 1. Redistributions of source code must retain the above copyright
37.\"    notice, this list of conditions and the following disclaimer.
38.\" 2. Redistributions in binary form must reproduce the above copyright
39.\"    notice, this list of conditions and the following disclaimer in the
40.\"    documentation and/or other materials provided with the distribution.
41.\"
42.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
43.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
44.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
45.\" DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
46.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
47.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
48.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
49.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
50.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
51.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
52.\" SUCH DAMAGE.
53.\"
54.Dd March 5, 2004
55.Dt CCD 4
56.Os
57.Sh NAME
58.Nm ccd
59.Nd Concatenated disk driver
60.Sh SYNOPSIS
61.Cd "pseudo-device ccd" Op Ar count
62.Sh DESCRIPTION
63The
64.Nm
65driver provides the capability of combining one or more disks/partitions
66into one virtual disk.
67.Pp
68This document assumes that you're familiar with how to generate kernels,
69how to properly configure disks and pseudo-devices in a kernel
70configuration file, and how to partition disks.
71.Pp
72Note that the
73.Sq raw
74partitions of the disks
75.Pa must not
76be combined.
77Each component partition should be offset at least one cylinder
78from the beginning of the component disk.
79This avoids potential conflicts between the component disk's
80disklabel and the
81.Nm Ns 's
82disklabel.
83The kernel will only allow component partitions of type
84.Dv FS_CCD .
85But for now, it allows partition of all types since some port
86lacks support of an on-disk BSD disklabel.
87The partition of
88.Dv FS_UNUSED
89may be rejected because device driver of component disk will refuse it.
90.Pp
91In order to compile in support for the
92.Nm ,
93you must add a line similar
94to the following to your kernel configuration file:
95.Bd -unfilled -offset indent
96pseudo-device	ccd	4	# concatenated disk devices
97.Ed
98.Pp
99The count argument is how many
100.Nm Ns s
101memory is allocated for at boot time.
102In this example, no more than 4
103.Nm Ns s
104may be configured.
105.Pp
106A
107.Nm
108may be either serially concatenated or interleaved.
109To serially concatenate the partitions, specify the interleave factor of 0.
110.Pp
111If a
112.Nm
113is interleaved correctly, a
114.Dq striping
115effect is achieved, which can increase performance.
116.\" The optimum interleave factor is typically the size of a track,
117.\" see
118.\" .Dq sectors/track
119.\" value in
120.\" .Xr disklabel 8
121.\" output.
122Since the interleave factor is expressed in units of
123.Dv DEV_BSIZE ,
124one must account for sector sizes other than
125.Dv DEV_BSIZE
126in order to calculate the correct interleave.
127The kernel will not allow an interleave factor less than the size
128of the largest component sector divided by
129.Dv DEV_BSIZE .
130.Pp
131Note that best performance is achieved if all component disks have the same
132geometry and size.
133Optimum striping cannot occur with different disk types.
134.Pp
135Also note that the total size of concatenated disk may vary depending on
136the interleave factor even if the exact same components are concatenated.
137And an old on-disk disklabel may be read after interleave factor change.
138As a result, the disklabel may contain wrong partition geometry and
139will cause an error when doing I/O near the end of concatenated disk.
140.Pp
141There is a run-time utility that is used for configuring
142.Nm Ns s .
143See
144.Xr ccdconfig 8
145for more information.
146.Sh WARNINGS
147If just one (or more) of the disks in a non-mirrored
148.Nm
149fails, the entire file system will be lost.
150.Sh FILES
151.Bl -tag -width /dev/XXrXccdX -compact
152.It Pa /dev/{,r}ccd*
153.Nm
154device special files.
155.El
156.Sh SEE ALSO
157.Xr config 1 ,
158.Xr MAKEDEV 8 ,
159.Xr ccdconfig 8 ,
160.Xr fsck 8 ,
161.Xr mount 8 ,
162.Xr newfs 8
163.Sh HISTORY
164The concatenated disk driver was originally written at the University of Utah.
165