1.\" $NetBSD: ccd.4,v 1.23 2001/09/12 18:19:16 wiz 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_CCD . 99But for now, it allows partition of all types since some port 100lacks support of an on-disk BSD disklabel. 101The partition of 102.Dv FS_UNUSED 103may be rejected because device driver of component disk will refuse it. 104.Pp 105In order to compile in support for the 106.Nm "" , 107you must add a line similar 108to the following to your kernel configuration file: 109.Bd -unfilled -offset indent 110pseudo-device ccd 4 # concatenated disk devices 111.Ed 112.Pp 113The count argument is how many 114.Nm Ns s 115memory is allocated for at boot time. 116In this example, no more than 4 117.Nm Ns s 118may be configured. 119.Pp 120A 121.Nm 122may be either serially concatenated or interleaved. 123To serially concatenate the partitions, specify the interleave factor of 0. 124.Pp 125If a 126.Nm 127is interleaved correctly, a 128.Dq striping 129effect is achieved, which can increase performance. 130The optimum interleave factor is typically the size of a track, 131see 132.Dq sectors/track 133value in 134.Xr disklabel 8 135output. 136Since the interleave factor is expressed in units of 137.Dv DEV_BSIZE , 138one must account for sector sizes other than 139.Dv DEV_BSIZE 140in order to calculate the correct interleave. 141The kernel will not allow an interleave factor less than the size 142of the largest component sector divided by 143.Dv DEV_BSIZE . 144.Pp 145Note that best performance is achieved if all component disks have the same 146geometry and size. 147Optimum striping cannot occur with different disk types. 148.Pp 149There is a run-time utility that is used for configuring 150.Nm Ns s . 151See 152.Xr ccdconfig 8 153for more information. 154.Sh WARNINGS 155If just one (or more) of the disks in a non-mirrored 156.Nm 157fails, the entire file system will be lost. 158.Sh FILES 159.Bl -tag -width /dev/XXrXccdX -compact 160.It Pa /dev/{,r}ccd* 161.Nm 162device special files. 163.El 164.Sh SEE ALSO 165.Xr MAKEDEV 8 , 166.Xr ccdconfig 8 , 167.Xr config 8 , 168.Xr fsck 8 , 169.Xr mount 8 , 170.Xr newfs 8 171.Sh HISTORY 172The concatenated disk driver was originally written at the University of Utah. 173