xref: /dragonfly/sbin/natacontrol/natacontrol.8 (revision f746689a)
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: src/sbin/atacontrol/atacontrol.8,v 1.28 2005/11/18 10:32:09 ru Exp $
27.\" $DragonFly: src/sbin/natacontrol/natacontrol.8,v 1.3 2007/08/20 01:35:56 swildner Exp $
28.\"
29.Dd December 5, 2006
30.Dt NATACONTROL 8
31.Os
32.Sh NAME
33.Nm natacontrol
34.Nd NATA device driver control program
35.Sh SYNOPSIS
36.Nm
37.Aq Ar command
38.Ar args
39.Pp
40.Nm
41.Ic attach
42.Ar channel
43.Nm
44.Ic detach
45.Ar channel
46.Nm
47.Ic reinit
48.Ar channel
49.Nm
50.Ic create
51.Ar type Oo Ar interleave Oc Ar disk0 ... diskN
52.Nm
53.Ic delete
54.Ar raid
55.Nm
56.Ic addspare
57.Ar raid disk
58.Nm
59.Ic rebuild
60.Ar raid
61.Nm
62.Ic status
63.Ar raid
64.Nm
65.Ic mode
66.Ar device
67.Nm
68.Ic info
69.Ar channel
70.Nm
71.Ic cap
72.Ar device
73.Nm
74.Ic list
75.Sh DESCRIPTION
76The
77.Nm
78utility is a control program that provides the user access and control to the
79.Dx
80.Xr nata 4
81subsystem.
82.Pp
83The
84.Nm
85utility
86can cause severe system crashes and loss of data if used improperly.
87Please
88exercise caution when using this command!
89.Pp
90The
91.Ar channel
92argument is the ATA channel device (e.g., ata0) on which to operate.
93The following commands are supported:
94.Bl -tag -width "rebuild"
95.It Ic attach
96Attach an ATA
97.Ar channel .
98Devices on the channel are probed and attached as
99is done on boot.
100.It Ic detach
101Detach an ATA
102.Ar channel .
103Devices on the channel are removed from the kernel,
104and all outstanding transfers etc.\& are returned back to the system marked
105as failed.
106.It Ic reinit
107Reinitialize an ATA
108.Ar channel .
109Both devices on the channel are reset and
110initialized to the parameters the ATA driver has stored internally.
111Devices that have gone bad and no longer respond to the probe, or devices
112that have physically been removed, are removed from the kernel.
113Likewise are devices that show up during a reset, probed and attached.
114.It Ic create
115Create a
116.Ar type
117ATA RAID.
118The type can be
119.Cm RAID0
120(stripe),
121.Cm RAID1
122(mirror),
123.Cm RAID0+1 ,
124.Cm SPAN
125or
126.Cm JBOD .
127In case the RAID has a
128.Cm RAID0
129component,
130the
131.Ar interleave
132must be specified in number of sectors.
133The RAID will be created
134of the individual disks named
135.Bk -words
136.Ar disk0 ... diskN .
137.Ek
138.Pp
139Although the
140.Xr nata 4
141driver allows for creating an ATA RAID on disks with any controller,
142there are restrictions.
143It is only possible to boot on an array if it is either located on a
144.Dq real
145ATA RAID controller like
146the Promise or Highpoint controllers, or if the RAID declared is of
147.Cm RAID1
148or
149.Cm SPAN
150type; in case of a
151.Cm SPAN ,
152the partition to boot must
153reside on the first disk in the SPAN.
154.It Ic delete
155Delete a RAID array on a RAID capable ATA controller.
156.It Ic addspare
157Add a spare disk to an existing RAID.
158.It Ic rebuild
159Rebuild a RAID1 array on a RAID capable ATA controller.
160.It Ic status
161Get the status of an ATA RAID.
162.It Ic mode
163Without the mode argument, the current transfer modes of the
164device are printed.
165If the mode argument is given, the
166.Xr nata 4
167driver is asked to change the transfer mode to the one given.
168The
169.Xr nata 4
170driver will reject modes that are not supported by the hardware.
171Modes are given like
172.Dq Li PIO3 ,
173.Dq Li udma2 ,
174.Dq Li udma100 ,
175case does not matter.
176.Pp
177Currently supported modes are:
178.Cm PIO0 , PIO1 , PIO2 , PIO3 , PIO4 ,
179.Cm WDMA2 ,
180.Cm UDMA2
181(alias
182.Cm UDMA33 ) ,
183.Cm UDMA4
184(alias
185.Cm UDMA66 ) ,
186.Cm UDMA5
187(alias
188.Cm UDMA100 )
189and
190.Cm UDMA6
191(alias
192.Cm UDMA133 ) .
193The device name and manufacture/version strings are shown.
194.It Ic cap
195Show detailed info about the device on
196.Ar device .
197.It Ic info
198Show info about the attached devices on the
199.Ar channel .
200.It Ic list
201Show info about all attached devices on all active controllers.
202.El
203.Sh EXAMPLES
204To get information on devices attached to a channel,
205use the command line:
206.Pp
207.Dl "natacontrol info ata0"
208.Pp
209To see the devices' current access modes, use the command line:
210.Pp
211.Dl "natacontrol mode ad0"
212.Pp
213which results in the modes of the devices being displayed as a string
214like this:
215.Pp
216.Dl "current mode = UDMA100"
217.Pp
218You can set the mode with
219.Nm
220and a string like the above,
221for example:
222.Pp
223.Dl "natacontrol mode ad0 PIO4"
224.Pp
225The new modes are set as soon as the
226.Nm
227command returns.
228.Sh SEE ALSO
229.Xr nata 4
230.Sh HISTORY
231The
232.Nm
233utility first appeared in
234.Fx 4.6
235and was imported into
236.Dx 1.7 .
237.Sh AUTHORS
238.An -nosplit
239The
240.Nm
241utility was written by
242.An S\(/oren Schmidt
243.Aq sos@FreeBSD.org .
244.Pp
245This manual page was written by
246.An S\(/oren Schmidt
247.Aq sos@FreeBSD.org .
248