this is obsolete doc -- see http://doc.nethence.com/ instead
CCD (Concatenated disk driver) configuration
http://pbraun.nethence.com/doc/sysutils_bsd/ccd.html
http://pbraun.nethence.com/doc/sysutils_bsd/freebsd_gbde.html
http://pbraun.nethence.com/doc/sysutils_bsd/freebsd_gmirror.html
http://pbraun.nethence.com/doc/sysutils_bsd/netbsd.html
http://pbraun.nethence.com/doc/sysutils_bsd/freebsd.html
On NetBSD
The driver is activated by default. It has,
pseudo-device ccd 4 # concatenated disk devices
into kernel's configuration.
Some hints to configure the disks' labels,
disklabel -l | grep ccd
disklabel -e wd0 ==> ccd
disklabel -Ie wd1 ==> a: ccd
disklabel -Ie wd2 ==> a: ccd
Note. manual says offset has to be at least 1 cylinder but it works great without this constrain.
Automate the whole thing,
vi /etc/ccd.conf
like,
ccd0 0 none /dev/wd0e /dev/wd1a /dev/wd2a
apply,
ccdconfig -C
Note. check /etc/defaults/rc.conf for a ccd setting example.
The official CCD documentation, http://www.netbsd.org/docs/guide/en/chap-ccd.html
On FreeBSD
Configuration
Load the CCD module,
kldload geom_ccd.ko
Write a standard label (initialize) the disk,
bsdlabel -w ad8 auto
bsdlabel -w ad9 auto
remove "a" and an "e" partition for ccd,
bsdlabel -e ad8
bsdlabel -e ad9
e.g.,
8 partitions:
c: 2930277168 0 unused 0 0 # "raw" part, don't edit
e: 2930277168 0 4.2BSD 0 0
Create the CCD device,
ccdconfig ccd0 128 0 /dev/ad8e /dev/ad9e
Format it,
newfs /dev/ccd0c
Print the config,
ccdconfig -g > /etc/ccd.conf
Note. "ccdconfig -C" is called at boot time (/etc/rc)
Add the mount point,
vi /etc/fstab
add,
/dev/ccd0c /path ufs rw 2 2
Usage
Configure all ccd devices listed in ccd.conf,
ccdconfig -C
Note. "ccdconfig -C" is called at boot time (/etc/rc)
Unconfigure a ccd device,
ccdconfig -u ccd0
Unconfigure all ccd devices listed in ccd.conf,
ccdconfig -U
References
http://www.freebsd.org/doc/en/books/handbook/raid.html