ccdconfig.8 (522ccf3f353a439b7938a4f10adfab7d912210a2) | ccdconfig.8 (6d5957433e62402fbe179ac40d6748c8cb009283) |
---|---|
1.\" $NetBSD: ccdconfig.8,v 1.1.2.1 1995/11/11 02:43:33 thorpej Exp $ 2.\" 3.\" Copyright (c) 1995 Jason R. Thorpe. 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: --- 105 unchanged lines hidden (view full) --- 114argument is optional. 115.Bd -unfilled -offset indent 116# 117# /etc/ccd.conf 118# Configuration file for concatenated disk devices 119# 120.Pp 121# ccd ileave flags component devices | 1.\" $NetBSD: ccdconfig.8,v 1.1.2.1 1995/11/11 02:43:33 thorpej Exp $ 2.\" 3.\" Copyright (c) 1995 Jason R. Thorpe. 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: --- 105 unchanged lines hidden (view full) --- 114argument is optional. 115.Bd -unfilled -offset indent 116# 117# /etc/ccd.conf 118# Configuration file for concatenated disk devices 119# 120.Pp 121# ccd ileave flags component devices |
122ccd0 16 none /dev/da2e /dev/da3e | 122ccd0 16 none /dev/da2s1 /dev/da3s1 |
123.Ed 124.Pp 125The component devices need to name partitions of type 126.Li FS_BSDFFS 127(or 128.Dq 4.2BSD 129as shown by 130.Xr disklabel 8 ) . 131.Sh EXAMPLES 132A number of 133.Nm 134examples are shown below. The arguments passed 135to 136.Nm 137are exactly the same as you might place in the 138.Pa /etc/ccd.conf 139configuration file. The first example creates a 4-disk stripe out of 140four scsi disk partitions. The stripe uses a 64 sector interleave. 141The second example is an example of a complex stripe/mirror combination. | 123.Ed 124.Pp 125The component devices need to name partitions of type 126.Li FS_BSDFFS 127(or 128.Dq 4.2BSD 129as shown by 130.Xr disklabel 8 ) . 131.Sh EXAMPLES 132A number of 133.Nm 134examples are shown below. The arguments passed 135to 136.Nm 137are exactly the same as you might place in the 138.Pa /etc/ccd.conf 139configuration file. The first example creates a 4-disk stripe out of 140four scsi disk partitions. The stripe uses a 64 sector interleave. 141The second example is an example of a complex stripe/mirror combination. |
142It reads as a two disk stripe of da2e and da3e which is mirrored 143to a two disk stripe of da4e and da5e. The last example is a simple 144mirror. /dev/da2e is mirrored with /dev/da4e and assigned to ccd0. | 142It reads as a two disk stripe of da4 and da5 which is mirrored 143to a two disk stripe of da6 and da7. The last example is a simple 144mirror. The 2nd slice of /dev/da8 is mirrored with the 3rd slice of /dev/da9 145and assigned to ccd0. |
145.Pp 146.Bd -unfilled -offset | 146.Pp 147.Bd -unfilled -offset |
147# ccdconfig ccd0 64 none /dev/da2e /dev/da3e /dev/da4e /dev/da5e 148# ccdconfig ccd0 128 CCDF_MIRROR /dev/da2e /dev/da3e /dev/da4e /dev/da5e 149# ccdconfig ccd0 128 CCDF_MIRROR /dev/da2e /dev/da4e | 148# ccdconfig ccd0 64 none /dev/da0s1 /dev/da1s1 /dev/da2s1 /dev/da3s1 149# ccdconfig ccd0 128 CCDF_MIRROR /dev/da4 /dev/da5 /dev/da6 /dev/da7 150# ccdconfig ccd0 128 CCDF_MIRROR /dev/da8s2 /dev/da9s3 |
150.Ed 151.Pp 152When you create a new ccd disk you generally want to | 151.Ed 152.Pp 153When you create a new ccd disk you generally want to |
154.Xr fdisk 8 155and |
|
153.Xr disklabel 8 154it before doing anything else. Once you create the initial label you can 155edit it, adding additional partitions. The label itself takes up the first 15616 sectors of the ccd disk. If all you are doing is creating file systems 157with newfs, you do not have to worry about this as newfs will skip the 158label area. However, if you intend to 159.Xr dd 1 160to or from a ccd partition it is usually a good idea to construct the 161partition such that it does not overlap the label area. For example, if 162you have A ccd disk with 10000 sectors you might create a 'd' partition 163with offset 16 and size 9984. 164.Pp 165.Bd -unfilled -offset 166# disklabel ccd0 > /tmp/disklabel.ccd0 167# disklabel -Rr ccd0 /tmp/disklabel.ccd0 168# disklabel -e ccd0 169.Ed 170.Pp | 156.Xr disklabel 8 157it before doing anything else. Once you create the initial label you can 158edit it, adding additional partitions. The label itself takes up the first 15916 sectors of the ccd disk. If all you are doing is creating file systems 160with newfs, you do not have to worry about this as newfs will skip the 161label area. However, if you intend to 162.Xr dd 1 163to or from a ccd partition it is usually a good idea to construct the 164partition such that it does not overlap the label area. For example, if 165you have A ccd disk with 10000 sectors you might create a 'd' partition 166with offset 16 and size 9984. 167.Pp 168.Bd -unfilled -offset 169# disklabel ccd0 > /tmp/disklabel.ccd0 170# disklabel -Rr ccd0 /tmp/disklabel.ccd0 171# disklabel -e ccd0 172.Ed 173.Pp |
171The disklabeling of a ccd disk is usually a one-time affair. Unlike other 172devices, ccd currently requires that you specify partition 'c' when 173running disklabel. If you reboot the machine and reconfigure the ccd disk, | 174The disklabeling of a ccd disk is usually a one-time affair. 175If you reboot the machine and reconfigure the ccd disk, |
174the disklabel you 175had created before will still be there and not require reinitialization. 176Beware that changing any ccd parameters: interleave, flags, or the 177device list making up the ccd disk, will usually destroy any prior 178data on that ccd disk. If this occurs it is usually a good idea to 179reinitialize the label before [re]constructing your ccd disk. 180.Sh RECOVERY 181An error on a ccd disk is usually unrecoverable unless you are using the 182mirroring option. But mirroring has its own perils: It assumes that 183both copies of the data at any given sector are the same. This holds true 184until a write error occurs or until you replace either side of the mirror. 185This is a poor-man's mirroring implementation. It works well enough that if 186you begin to get disk errors you should be able to backup the ccd disk, 187replace the broken hardware, and then regenerate the ccd disk. If you need 188more than this you should look into external hardware RAID SCSI boxes, | 176the disklabel you 177had created before will still be there and not require reinitialization. 178Beware that changing any ccd parameters: interleave, flags, or the 179device list making up the ccd disk, will usually destroy any prior 180data on that ccd disk. If this occurs it is usually a good idea to 181reinitialize the label before [re]constructing your ccd disk. 182.Sh RECOVERY 183An error on a ccd disk is usually unrecoverable unless you are using the 184mirroring option. But mirroring has its own perils: It assumes that 185both copies of the data at any given sector are the same. This holds true 186until a write error occurs or until you replace either side of the mirror. 187This is a poor-man's mirroring implementation. It works well enough that if 188you begin to get disk errors you should be able to backup the ccd disk, 189replace the broken hardware, and then regenerate the ccd disk. If you need 190more than this you should look into external hardware RAID SCSI boxes, |
189RAID controllers such as the 190.Xr dpt 4 191controller, or software RAID systems such as | 191RAID controllers (see GENERIC), 192or software RAID systems such as 193RAIDframe 194.Xr raid 4 195and |
192.Xr vinum 8 . 193.Sh FILES 194.Bl -tag -width /etc/ccd.conf -compact 195.It Pa /etc/ccd.conf 196default ccd configuration file 197.El 198.Sh SEE ALSO 199.Xr dd 1 , 200.Xr ccd 4 , | 196.Xr vinum 8 . 197.Sh FILES 198.Bl -tag -width /etc/ccd.conf -compact 199.It Pa /etc/ccd.conf 200default ccd configuration file 201.El 202.Sh SEE ALSO 203.Xr dd 1 , 204.Xr ccd 4 , |
201.Xr dpt 4 , | 205.Xr raid 4 , |
202.Xr disklabel 8 , | 206.Xr disklabel 8 , |
207.Xr fdisk 8 , |
|
203.Xr rc 8 , 204.Xr vinum 8 205.Sh BUGS 206The initial disklabel returned by 207.Xr ccd 4 208specifies only 3 partitions. 209One needs to change the number of paritions to 8 using 210.Dq Nm disklabel Fl e 211to get the usual 212.Bx 213expectations. 214.Sh HISTORY 215The 216.Nm 217utility first appeared in 218.Nx 1.0a . | 208.Xr rc 8 , 209.Xr vinum 8 210.Sh BUGS 211The initial disklabel returned by 212.Xr ccd 4 213specifies only 3 partitions. 214One needs to change the number of paritions to 8 using 215.Dq Nm disklabel Fl e 216to get the usual 217.Bx 218expectations. 219.Sh HISTORY 220The 221.Nm 222utility first appeared in 223.Nx 1.0a . |