NetBSD/share/man/man4/ccd.4

155 lines
5.3 KiB
Groff
Raw Normal View History

.\" $NetBSD: ccd.4,v 1.7 1997/01/05 22:53:08 cjs Exp $
.\"
1995-08-17 20:49:20 +04:00
.\" Copyright (c) 1994 Jason Downs.
.\" Copyright (c) 1994, 1995, 1996 Jason R. Thorpe.
.\" All rights reserved.
.\"
.\" 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:
1995-08-17 20:49:20 +04:00
.\" This product includes software developed for the NetBSD Project
.\" by Jason Downs and Jason R. Thorpe.
.\" 4. Neither the name of the author nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
1995-08-17 20:49:20 +04:00
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
.\"
1995-08-17 20:49:20 +04:00
.Dd August 9, 1995
.Dt CCD 4
1995-08-17 20:49:20 +04:00
.Os NetBSD
.Sh NAME
.Nm ccd
1995-08-17 20:49:20 +04:00
.Nd Concatenated Disk Driver
.Sh SYNOPSIS
.Cd "pseudo-device ccd 4"
.Sh DESCRIPTION
The
.Nm
1995-08-17 20:49:20 +04:00
driver provides the capability of combining one or more disks/partitions
into one virtual disk.
.Pp
This document assumes that you're familiar with how to generate kernels,
1995-08-17 20:49:20 +04:00
how to properly configure disks and pseudo-devices in a kernel
configuration file, and how to partition disks.
.Pp
1995-08-17 20:49:20 +04:00
Note that the
.Sq raw
partitions of the disks
.Pa should not
1995-08-17 20:49:20 +04:00
be combined. Each component partition should be offset at least one
cylinder from the beginning of the component disk. This avoids potential
conflicts between the component disk's disklabel and the
1995-08-17 20:49:20 +04:00
.Nm ccd's
disklabel. The kernel will only allow component partitions of type FS_BSDFFS.
1995-08-17 20:49:20 +04:00
.Pp
In order to compile in support for the ccd, you must add a line similar
to the following to your kernel configuration file:
.Bd -unfilled -offset indent
1995-08-17 20:49:20 +04:00
pseudo-device ccd 4 # concatenated disk devices
.Ed
.Pp
1995-08-17 20:49:20 +04:00
The count argument is how many
.Nm ccds
memory is allocated for a boot time. In this example, no more than 4
.Nm ccds
may be configured.
.Pp
1995-08-17 20:49:20 +04:00
A
.Nm ccd
may be either serially concatenated or interleaved. If a
.Nm ccd
is interleaved correctly, a
.Dq striping
effect is achieved, which can increase performance. The optimum interleave
factor is typically the size of a track. Since the interleave factor
is expressed in units of DEV_BSIZE, one must account for sector sizes
other than DEV_BSIZE in order to calculate the correct interleave.
The kernel will not allow an interleave factor less than the size
of the largest component sector divided by DEV_BSIZE.
.Pp
Note that best performance is achieved if all compent disks have the same
geometery and size. Optimum striping cannot occur with different
disk types.
.Pp
The
.Nm ccd
also supports primitive data mirroring. To enable this mirroring support,
the
.Nm ccd
must be configured with the
.Nm CCDF_MIRROR
flag set. Note that the
.Nm CCDF_MIRROR
flag implies the
.Nm CCDF_UNIFORM
flag and requires an interleaved even number of components.
.Pp
Mirroring functions by making the second n/2 components exact duplicates
of the first n/2. For example, in a mirrored
.Nm ccd
with components sd0g, sd1g, sd2g, and sd3g, sd2g would mirror sd0g and
sd3g would mirror sd1g. Reads will come from the first n/2 components
(in this example: sd0g and sd1g) while writes will go to all components.
.Pp
If a component of a mirrored
.Nm ccd
should fail, the
.Nm ccd
can be reconfigured as a non-mirrored
.Nm ccd
until the failed component can be replaced. For example, using the
hypothetical
.Nm ccd
above, the recovery process might look like this:
.Bd -literal -offset indent
* Component sd1g fails. Reconfigure ccd without mirroring
using the same interleave factor with components sd0g and sd3g.
ccd can still be used until replacement drive arrives.
* Replace failed component. Using dd(1), copy the contents of
sd3g to the new sd1g.
* Restore ccd configuration to that of before the component failure.
.Ed
.Pp
1995-08-17 20:49:20 +04:00
There is a run-time utility that is used for configuring
.Nm ccds .
See
.Xr ccdconfig 8
for more information.
.Sh WARNINGS
If just one (or more) of the disks in a non-mirrored
1995-08-17 20:49:20 +04:00
.Nm ccd
fails, the entire
file system will be lost.
.Sh FILES
1995-08-17 20:49:20 +04:00
/dev/{,r}ccd* - ccd device special files.
.Pp
1995-08-17 20:49:20 +04:00
.Sh HISTORY
The concatenated disk driver was originally written at the University of
Utah.
.Sh SEE ALSO
.Xr MAKEDEV 8 ,
1995-08-17 20:49:20 +04:00
.Xr ccdconfig 8 ,
.Xr config 8 ,
.Xr config.old 8 ,
.Xr fsck 8 ,
.Xr mount 8 ,
1995-08-17 20:49:20 +04:00
.Xr newfs 8 .