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