]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sbin/atacontrol/atacontrol.8
This commit was generated by cvs2svn to compensate for changes in r169185,
[FreeBSD/FreeBSD.git] / sbin / atacontrol / atacontrol.8
1 .\"
2 .\" Copyright (c) 2000,2001,2002 Søren Schmidt <sos@FreeBSD.org>
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd August 16, 2005
29 .Dt ATACONTROL 8
30 .Os
31 .Sh NAME
32 .Nm atacontrol
33 .Nd ATA device driver control program
34 .Sh SYNOPSIS
35 .Nm
36 .Aq Ar command
37 .Ar args
38 .Pp
39 .Nm
40 .Ic attach
41 .Ar channel
42 .Nm
43 .Ic detach
44 .Ar channel
45 .Nm
46 .Ic reinit
47 .Ar channel
48 .Nm
49 .Ic create
50 .Ar type Oo Ar interleave Oc Ar disk0 ... diskN
51 .Nm
52 .Ic delete
53 .Ar raid
54 .Nm
55 .Ic addspare
56 .Ar raid disk
57 .Nm
58 .Ic rebuild
59 .Ar raid
60 .Nm
61 .Ic status
62 .Ar raid
63 .Nm
64 .Ic mode
65 .Ar device
66 .Nm
67 .Ic info
68 .Ar channel
69 .Nm
70 .Ic cap
71 .Ar device
72 .Nm
73 .Ic list
74 .Sh DESCRIPTION
75 The
76 .Nm
77 utility is a control program that provides the user access and control to the
78 .Fx
79 .Xr ata 4
80 subsystem.
81 .Pp
82 The
83 .Nm
84 utility
85 can cause severe system crashes and loss of data if used improperly.
86 Please
87 exercise caution when using this command!
88 .Pp
89 The
90 .Ar channel
91 argument is the ATA channel device (e.g., ata0) on which to operate.
92 The following commands are supported:
93 .Bl -tag -width "rebuild"
94 .It Ic attach
95 Attach an ATA
96 .Ar channel .
97 Devices on the channel are probed and attached as
98 is done on boot.
99 .It Ic detach
100 Detach an ATA
101 .Ar channel .
102 Devices on the channel are removed from the kernel,
103 and all outstanding transfers etc.\& are returned back to the system marked
104 as failed.
105 .It Ic reinit
106 Reinitialize an ATA
107 .Ar channel .
108 Both devices on the channel are reset and
109 initialized to the parameters the ATA driver has stored internally.
110 Devices that have gone bad and no longer respond to the probe, or devices
111 that have physically been removed, are removed from the kernel.
112 Likewise are devices that show up during a reset, probed and attached.
113 .It Ic create
114 Create a
115 .Ar type
116 ATA RAID.
117 The type can be
118 .Cm RAID0
119 (stripe),
120 .Cm RAID1
121 (mirror),
122 .Cm RAID0+1 ,
123 .Cm SPAN
124 or
125 .Cm JBOD .
126 In case the RAID has a
127 .Cm RAID0
128 component,
129 the
130 .Ar interleave
131 must be specified in number of sectors.
132 The RAID will be created
133 of the individual disks named
134 .Bk -words
135 .Ar disk0 ... diskN .
136 .Ek
137 .Pp
138 Although the ATA driver allows for creating an ATA RAID on disks with any
139 controller, there are restrictions.
140 It is only possible to boot on
141 an array if it is either located on a
142 .Dq real
143 ATA RAID controller like
144 the Promise or Highpoint controllers, or if the RAID declared is of
145 .Cm RAID1
146 or
147 .Cm SPAN
148 type; in case of a
149 .Cm SPAN ,
150 the partition to boot must
151 reside on the first disk in the SPAN.
152 .It Ic delete
153 Delete a RAID array on a RAID capable ATA controller.
154 .It Ic addspare
155 Add a spare disk to an existing RAID.
156 .It Ic rebuild
157 Rebuild a RAID1 array on a RAID capable ATA controller.
158 .It Ic status
159 Get the status of an ATA RAID.
160 .It Ic mode
161 Without the mode argument, the current transfer modes of the
162 device are printed.
163 If the mode argument is given, the ATA driver
164 is asked to change the transfer mode to the one given.
165 The ATA driver
166 will reject modes that are not supported by the hardware.
167 Modes are given like
168 .Dq Li PIO3 ,
169 .Dq Li udma2 ,
170 .Dq Li udma100 ,
171 case does not matter.
172 .Pp
173 Currently supported modes are:
174 .Cm PIO0 , PIO1 , PIO2 , PIO3 , PIO4 ,
175 .Cm WDMA2 ,
176 .Cm UDMA2
177 (alias
178 .Cm UDMA33 ) ,
179 .Cm UDMA4
180 (alias
181 .Cm UDMA66 ) ,
182 .Cm UDMA5
183 (alias
184 .Cm UDMA100 )
185 and
186 .Cm UDMA6
187 (alias
188 .Cm UDMA133 ) .
189 The device name and manufacture/version strings are shown.
190 .It Ic cap
191 Show detailed info about the device on
192 .Ar device .
193 .It Ic info
194 Show info about the attached devices on the
195 .Ar channel .
196 .It Ic list
197 Show info about all attached devices on all active controllers.
198 .El
199 .Sh EXAMPLES
200 To get information on devices attached to a channel,
201 use the command line:
202 .Pp
203 .Dl "atacontrol info ata0"
204 .Pp
205 To see the devices' current access modes, use the command line:
206 .Pp
207 .Dl "atacontrol mode ad0"
208 .Pp
209 which results in the modes of the devices being displayed as a string
210 like this:
211 .Pp
212 .Dl "current mode = UDMA100"
213 .Pp
214 You can set the mode with
215 .Nm
216 and a string like the above,
217 for example:
218 .Pp
219 .Dl "atacontrol mode ad0 PIO4"
220 .Pp
221 The new modes are set as soon as the
222 .Nm
223 command returns.
224 .Sh SEE ALSO
225 .Xr ata 4
226 .Sh HISTORY
227 The
228 .Nm
229 utility first appeared in
230 .Fx 4.6 .
231 .Sh AUTHORS
232 .An -nosplit
233 The
234 .Nm
235 utility was written by
236 .An S\(/oren Schmidt
237 .Aq sos@FreeBSD.org .
238 .Pp
239 This manual page was written by
240 .An S\(/oren Schmidt
241 .Aq sos@FreeBSD.org .