1 .\" Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd "control utility for RAID3 devices"
39 .Ar prov prov prov ...
79 utility is used for RAID3 array configuration.
80 After a device is created, all components are detected and configured
82 All operations such as failure detection, stale component detection, rebuild
83 of stale components, etc.\& are also done automatically.
86 utility uses on-disk metadata (the provider's last sector) to store all needed
91 indicates an action to be performed:
92 .Bl -tag -width ".Cm configure"
94 Create a RAID3 device.
95 The last given component will contain parity data, whilst the others
96 will all contain regular data.
97 The number of components must be equal to 3, 5, 9, 17, etc.\& (2^n + 1).
99 Additional options include:
100 .Bl -tag -width ".Fl h"
102 Do not synchronize after a power failure or system crash.
103 Assumes device is in consistent state.
105 Hardcode providers' names in metadata.
107 Turn off autosynchronization of stale components.
109 Use parity component for reading in round-robin fashion.
110 Without this option the parity component is not used at all for reading operations
111 when the device is in a complete state.
112 With this option specified random I/O read operations are even 40% faster,
113 but sequential reads are slower.
114 One cannot use this option if the
116 option is also specified.
118 Manually specify array block size. Block size will be set equal to least
119 common multiple of all component's sector sizes and specified value.
120 Note that array sector size calculated as multiple of block size and number
121 of regular data components. Big values may decrease performance and compatibility,
122 as all I/O requests have to be multiple of sector size.
124 Use verify reading feature.
125 When reading from a device in a complete state, also read data from the parity component
126 and verify the data by comparing XORed regular data with parity data.
127 If verification fails, an
129 error is returned and the value of the
130 .Va kern.geom.raid3.stat.parity_mismatch
132 One cannot use this option if the
134 option is also specified.
137 Clear metadata on the given providers.
139 Configure the given device.
141 Additional options include:
142 .Bl -tag -width ".Fl a"
144 Turn on autosynchronization of stale components.
146 Do not hardcode providers' names in metadata.
148 Synchronize device after a power failure or system crash.
150 Do not synchronize after a power failure or system crash.
151 Assumes device is in consistent state.
153 Hardcode providers' names in metadata.
155 Turn off autosynchronization of stale components.
157 Turn on round-robin reading.
159 Turn off round-robin reading.
161 Turn on verify reading.
163 Turn off verify reading.
166 Rebuild the given component forcibly.
167 If autosynchronization was not turned off for the given device, this command
168 should be unnecessary.
170 Add the given component to the existing array, if one of the components was
171 removed previously with the
173 command or if one component is missing and will not be connected again.
174 If no number is given, new component will be added instead of first missed
177 Additional options include:
178 .Bl -tag -width ".Fl h"
180 Hardcode providers' names in metadata.
183 Remove the given component from the given array and clear metadata on it.
185 Stop the given arrays.
187 Additional options include:
188 .Bl -tag -width ".Fl f"
190 Stop the given array even if it is opened.
206 Additional options include:
207 .Bl -tag -width ".Fl v"
212 Exit status is 0 on success, and 1 if the command fails.
214 Use 3 disks to setup a RAID3 array (with the round-robin reading feature).
215 Create a file system, mount it, then unmount it and stop device:
216 .Bd -literal -offset indent
217 graid3 label -v -r data da0 da1 da2
218 newfs /dev/raid3/data
219 mount /dev/raid3/data /mnt
226 Create a RAID3 array, but do not use the automatic synchronization feature.
227 Rebuild parity component:
228 .Bd -literal -offset indent
229 graid3 label -n data da0 da1 da2
230 graid3 rebuild data da2
233 Replace one data disk with a brand new one:
234 .Bd -literal -offset indent
235 graid3 remove -n 0 data
236 graid3 insert -n 0 data da5
251 .An Pawel Jakub Dawidek Aq pjd@FreeBSD.org
253 There should be a section with an implementation description.
255 Documentation for sysctls
256 .Va kern.geom.raid3.*