xref: /freebsd-src/usr.sbin/mptutil/mptutil.8 (revision b128bedfb95c1fefe10e3375b07e200eff8c3664)
1fc58801cSScott Long.\"
2fc58801cSScott Long.\" Copyright (c) 2008 Yahoo!, Inc.
3fc58801cSScott Long.\" All rights reserved.
4fc58801cSScott Long.\" Written by: John Baldwin <jhb@FreeBSD.org>
5fc58801cSScott Long.\"
6fc58801cSScott Long.\" Redistribution and use in source and binary forms, with or without
7fc58801cSScott Long.\" modification, are permitted provided that the following conditions
8fc58801cSScott Long.\" are met:
9fc58801cSScott Long.\" 1. Redistributions of source code must retain the above copyright
10fc58801cSScott Long.\"    notice, this list of conditions and the following disclaimer.
11fc58801cSScott Long.\" 2. Redistributions in binary form must reproduce the above copyright
12fc58801cSScott Long.\"    notice, this list of conditions and the following disclaimer in the
13fc58801cSScott Long.\"    documentation and/or other materials provided with the distribution.
14fc58801cSScott Long.\" 3. Neither the name of the author nor the names of any co-contributors
15fc58801cSScott Long.\"    may be used to endorse or promote products derived from this software
16fc58801cSScott Long.\"    without specific prior written permission.
17fc58801cSScott Long.\"
18fc58801cSScott Long.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19fc58801cSScott Long.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20fc58801cSScott Long.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21fc58801cSScott Long.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22fc58801cSScott Long.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23fc58801cSScott Long.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24fc58801cSScott Long.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25fc58801cSScott Long.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26fc58801cSScott Long.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27fc58801cSScott Long.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28fc58801cSScott Long.\" SUCH DAMAGE.
29fc58801cSScott Long.\"
30*b128bedfSEd Maste.Dd May 24, 2023
31fc58801cSScott Long.Dt MPTUTIL 8
32fc58801cSScott Long.Os
33fc58801cSScott Long.Sh NAME
34fc58801cSScott Long.Nm mptutil
35fc58801cSScott Long.Nd Utility for managing LSI Fusion-MPT controllers
36fc58801cSScott Long.Sh SYNOPSIS
37fc58801cSScott Long.Nm
38fc58801cSScott Long.Cm version
39fc58801cSScott Long.Nm
40fc58801cSScott Long.Op Fl u Ar unit
41fc58801cSScott Long.Cm show adapter
42fc58801cSScott Long.Nm
43fc58801cSScott Long.Op Fl u Ar unit
44fc58801cSScott Long.Cm show config
45fc58801cSScott Long.Nm
46fc58801cSScott Long.Op Fl u Ar unit
47fc58801cSScott Long.Cm show drives
48fc58801cSScott Long.Nm
49fc58801cSScott Long.Op Fl u Ar unit
50fc58801cSScott Long.Cm show events
51fc58801cSScott Long.Nm
52fc58801cSScott Long.Op Fl u Ar unit
53fc58801cSScott Long.Cm show volumes
54fc58801cSScott Long.Nm
55fc58801cSScott Long.Op Fl u Ar unit
56fc58801cSScott Long.Cm fail Ar drive
57fc58801cSScott Long.Nm
58fc58801cSScott Long.Op Fl u Ar unit
59fc58801cSScott Long.Cm online Ar drive
60fc58801cSScott Long.Nm
61fc58801cSScott Long.Op Fl u Ar unit
62fc58801cSScott Long.Cm offline Ar drive
63fc58801cSScott Long.Nm
64fc58801cSScott Long.Op Fl u Ar unit
65fc58801cSScott Long.Cm name Ar volume Ar name
66fc58801cSScott Long.Nm
67fc58801cSScott Long.Op Fl u Ar unit
68fc58801cSScott Long.Cm volume status Ar volume
69fc58801cSScott Long.Nm
70fc58801cSScott Long.Op Fl u Ar unit
71fc58801cSScott Long.Cm volume cache Ar volume
729a49a379SEnji Cooper.Ar enable|enabled|disable|disabled
73fc58801cSScott Long.Nm
74fc58801cSScott Long.Op Fl u Ar unit
75fc58801cSScott Long.Cm clear
76fc58801cSScott Long.Nm
77fc58801cSScott Long.Op Fl u Ar unit
78fc58801cSScott Long.Cm create Ar type
79fc58801cSScott Long.Op Fl q
80fc58801cSScott Long.Op Fl v
81fc58801cSScott Long.Op Fl s Ar stripe_size
82fc58801cSScott Long.Ar drive Ns Op \&, Ns Ar drive Ns Op ",..."
83fc58801cSScott Long.Nm
84fc58801cSScott Long.Op Fl u Ar unit
85fc58801cSScott Long.Cm delete Ar volume
86fc58801cSScott Long.Nm
87fc58801cSScott Long.Op Fl u Ar unit
88fc58801cSScott Long.Cm add Ar drive Op Ar volume
89fc58801cSScott Long.Nm
90fc58801cSScott Long.Op Fl u Ar unit
91fc58801cSScott Long.Cm remove Ar drive
92fc58801cSScott Long.Sh DESCRIPTION
93fc58801cSScott LongThe
94fc58801cSScott Long.Nm
95fc58801cSScott Longutility can be used to display or modify various parameters on LSI
96fc58801cSScott LongFusion-MPT controllers.
97fc58801cSScott LongEach invocation of
98fc58801cSScott Long.Nm
99fc58801cSScott Longconsists of zero or more global options followed by a command.
100fc58801cSScott LongCommands may support additional optional or required arguments after the
101fc58801cSScott Longcommand.
102fc58801cSScott Long.Pp
103fc58801cSScott LongCurrently one global option is supported:
104fc58801cSScott Long.Bl -tag -width indent
105fc58801cSScott Long.It Fl u Ar unit
106fc58801cSScott Long.Ar unit
107fc58801cSScott Longspecifies the unit of the controller to work with.
108fc58801cSScott LongIf no unit is specified,
109fc58801cSScott Longthen unit 0 is used.
110fc58801cSScott Long.El
111fc58801cSScott Long.Pp
112fc58801cSScott LongVolumes may be specified in two forms.
113fc58801cSScott LongFirst,
114fc58801cSScott Longa volume may be identified by its location as
115fc58801cSScott Long.Sm off
116fc58801cSScott Long.Op Ar xx Ns \&:
117fc58801cSScott Long.Ar yy
118fc58801cSScott Long.Sm on
119fc58801cSScott Longwhere
120fc58801cSScott Long.Ar xx
121fc58801cSScott Longis the bus ID and
122fc58801cSScott Long.Ar yy
123fc58801cSScott Longis the target ID.
124d4352d29SJoel DahlIf the bus ID is omitted,
125fc58801cSScott Longthe volume is assumed to be on bus 0.
126fc58801cSScott LongSecond,
127fc58801cSScott Longon the volume may be specified by the corresponding
128fc58801cSScott Long.Em daX
129fc58801cSScott Longdevice,
130fc58801cSScott Longsuch as
131fc58801cSScott Long.Em da0 .
132fc58801cSScott Long.Pp
133fc58801cSScott LongThe
134fc58801cSScott Long.Xr mpt 4
135fc58801cSScott Longcontroller divides drives up into two categories.
136fc58801cSScott LongConfigured drives belong to a RAID volume either as a member drive or as a hot
137fc58801cSScott Longspare.
138fc58801cSScott LongEach configured drive is assigned a unique device ID such as 0 or 1 that is
139fc58801cSScott Longshow in
140fc58801cSScott Long.Cm show config ,
141fc58801cSScott Longand in the first column of
142fc58801cSScott Long.Cm show drives .
143fc58801cSScott LongAny drive not associated with a RAID volume as either a member or a hot spare
144fc58801cSScott Longis a standalone drive.
145fc58801cSScott LongStandalone drives are visible to the operating system as SCSI disk devices.
146fc58801cSScott LongAs a result, drives may be specified in three forms.
147fc58801cSScott LongFirst,
148fc58801cSScott Longa configured drive may be identified by its device ID.
149fc58801cSScott LongSecond,
150fc58801cSScott Longany drive may be identified by its location as
151fc58801cSScott Long.Sm off
152fc58801cSScott Long.Ar xx Ns \&:
153fc58801cSScott Long.Ar yy
154fc58801cSScott Long.Sm on
155fc58801cSScott Longwhere
156fc58801cSScott Long.Ar xx
157fc58801cSScott Longis the bus ID and
158fc58801cSScott Long.Ar yy
159fc58801cSScott Longis the target ID for each drive as displayed in
160fc58801cSScott Long.Cm show drives .
161fc58801cSScott LongNote that unlike volumes,
162fc58801cSScott Longa drive location always requires the bus ID to avoid confusion with device IDs.
163fc58801cSScott LongThird,
164fc58801cSScott Longa standalone drive that is not part of a volume may be identified by its
165fc58801cSScott Longcorresponding
166fc58801cSScott Long.Em daX
167fc58801cSScott Longdevice as displayed in
168fc58801cSScott Long.Cm show drives .
169fc58801cSScott Long.Pp
170fc58801cSScott LongThe
171fc58801cSScott Long.Nm
172fc58801cSScott Longutility supports several different groups of commands.
173fc58801cSScott LongThe first group of commands provide information about the controller,
174fc58801cSScott Longthe volumes it manages, and the drives it controls.
175fc58801cSScott LongThe second group of commands are used to manage the physical drives
176fc58801cSScott Longattached to the controller.
177fc58801cSScott LongThe third group of commands are used to manage the logical volumes
178fc58801cSScott Longmanaged by the controller.
179fc58801cSScott LongThe fourth group of commands are used to manage the drive configuration for
180fc58801cSScott Longthe controller.
181fc58801cSScott Long.Pp
182fc58801cSScott LongThe informational commands include:
183fc58801cSScott Long.Bl -tag -width indent
184fc58801cSScott Long.It Cm version
185fc58801cSScott LongDisplays the version of
186fc58801cSScott Long.Nm .
187fc58801cSScott Long.It Cm show adapter
188fc58801cSScott LongDisplays information about the RAID controller such as the model number.
189fc58801cSScott Long.It Cm show config
190fc58801cSScott LongDisplays the volume and drive configuration for the controller.
191fc58801cSScott LongEach volume is listed along with the physical drives that the volume spans.
192fc58801cSScott LongIf any hot spare drives are configured, then they are listed as well.
193fc58801cSScott Long.It Cm show drives
194fc58801cSScott LongLists all of the physical drives attached to the controller.
195fc58801cSScott Long.It Cm show events
196fc58801cSScott LongDisplay all the entries from the controller's event log.
197b1edef17SJoel DahlDue to lack of documentation this command is not very useful currently and
198fc58801cSScott Longjust dumps each log entry in hex.
199fc58801cSScott Long.It Cm show volumes
200fc58801cSScott LongLists all of the logical volumes managed by the controller.
201fc58801cSScott Long.El
202fc58801cSScott Long.Pp
203fc58801cSScott LongThe physical drive management commands include:
204fc58801cSScott Long.Bl -tag -width indent
205fc58801cSScott Long.It Cm fail Ar drive
206fc58801cSScott LongMark
207fc58801cSScott Long.Ar drive
208fc58801cSScott Longas
209fc58801cSScott Long.Dq failed requested .
210fc58801cSScott LongNote that this state is different from the
211fc58801cSScott Long.Dq failed
212fc58801cSScott Longstate that is used when the firmware fails a drive.
213fc58801cSScott Long.Ar Drive
214fc58801cSScott Longmust be a configured drive.
215fc58801cSScott Long.It Cm online Ar drive
216fc58801cSScott LongMark
217fc58801cSScott Long.Ar drive
218fc58801cSScott Longas an online drive.
219fc58801cSScott Long.Ar Drive
220fc58801cSScott Longmust be part a configured drive in either the
221fc58801cSScott Long.Dq offline
222fc58801cSScott Longor
223fc58801cSScott Long.Dq failed requested
224fc58801cSScott Longstates.
225fc58801cSScott Long.It Cm offline Ar drive
226fc58801cSScott LongMark
227fc58801cSScott Long.Ar drive
228fc58801cSScott Longas offline.
229fc58801cSScott Long.Ar Drive
230fc58801cSScott Longmust be a configured, online drive.
231fc58801cSScott Long.El
232fc58801cSScott Long.Pp
233fc58801cSScott LongThe logical volume management commands include:
234fc58801cSScott Long.Bl -tag -width indent
235fc58801cSScott Long.It Cm name Ar volume Ar name
236fc58801cSScott LongSets the name of
237fc58801cSScott Long.Ar volume
238fc58801cSScott Longto
239fc58801cSScott Long.Ar name .
2409a49a379SEnji Cooper.It Cm volume cache Ar volume Ar enable|enabled|disable|disabled
241fc58801cSScott LongEnables or disables the drive write cache for the member drives of
242fc58801cSScott Long.Ar volume .
243fc58801cSScott Long.It Cm volume status Ar volume
244fc58801cSScott LongDisplay more detailed status about a single volume including the current
245fc58801cSScott Longprogress of a rebuild operation if one is being performed.
246fc58801cSScott Long.El
247fc58801cSScott Long.Pp
248fc58801cSScott LongThe configuration commands include:
249fc58801cSScott Long.Bl -tag -width indent
250fc58801cSScott Long.It Cm clear
251fc58801cSScott LongDelete the entire configuration including all volumes and spares.
252fc58801cSScott LongAll drives will become standalone drives.
253fc58801cSScott Long.It Xo Cm create Ar type
254fc58801cSScott Long.Op Fl q
255fc58801cSScott Long.Op Fl v
256fc58801cSScott Long.Op Fl s Ar stripe_size
257fc58801cSScott Long.Ar drive Ns Op \&, Ns Ar drive Ns Op ",..."
258fc58801cSScott Long.Xc
259fc58801cSScott LongCreate a new volume.
260fc58801cSScott LongThe
261fc58801cSScott Long.Ar type
262fc58801cSScott Longspecifies the type of volume to create.
263fc58801cSScott LongCurrently supported types include:
264fc58801cSScott Long.Bl -tag -width indent
265fc58801cSScott Long.It Cm raid0
266fc58801cSScott LongCreates one RAID0 volume spanning the drives listed in the single drive list.
267fc58801cSScott Long.It Cm raid1
268fc58801cSScott LongCreates one RAID1 volume spanning the drives listed in the single drive list.
269fc58801cSScott Long.It Cm raid1e
270fc58801cSScott LongCreates one RAID1E volume spanning the drives listed in the single drive list.
271fc58801cSScott Long.El
272fc58801cSScott Long.Pp
273fc58801cSScott Long.Sy Note:
274fc58801cSScott LongNot all volume types are supported by all controllers.
275fc58801cSScott Long.Pp
276fc58801cSScott LongIf the
277fc58801cSScott Long.Fl q
278fc58801cSScott Longflag is specified after
279fc58801cSScott Long.Ar type ,
280fc58801cSScott Longthen a
281fc58801cSScott Long.Dq quick
282fc58801cSScott Longinitialization of the volume will be done.
283fc58801cSScott LongThis is useful when the drives do not contain any existing data that need
284fc58801cSScott Longto be preserved.
285fc58801cSScott Long.Pp
286fc58801cSScott LongIf the
287fc58801cSScott Long.Fl v
288fc58801cSScott Longflag is specified after
289fc58801cSScott Long.Ar type ,
290fc58801cSScott Longthen more verbose output will be enabled.
291fc58801cSScott LongCurrently this just provides notification as drives are added to volumes
292fc58801cSScott Longwhen building the configuration.
293fc58801cSScott Long.Pp
294fc58801cSScott LongThe
295fc58801cSScott Long.Fl s
296fc58801cSScott Long.Ar stripe_size
297fc58801cSScott Longparameter allows the stripe size of the array to be set.
298fc58801cSScott LongBy default a stripe size of 64K is used.
299fc58801cSScott LongThe list of valid values for a given
300fc58801cSScott Long.Ar type
301fc58801cSScott Longare listed in the output of
302fc58801cSScott Long.Cm show adapter .
303fc58801cSScott Long.It Cm delete Ar volume
304fc58801cSScott LongDelete the volume
305fc58801cSScott Long.Ar volume .
306fc58801cSScott LongMember drives will become standalone drives.
307fc58801cSScott Long.It Cm add Ar drive Op Ar volume
308fc58801cSScott LongMark
309fc58801cSScott Long.Ar drive
310fc58801cSScott Longas a hot spare.
311fc58801cSScott Long.Ar Drive
312fc58801cSScott Longmust not be a member of a volume.
313fc58801cSScott LongIf
314fc58801cSScott Long.Ar volume
315fc58801cSScott Longis specified,
316fc58801cSScott Longthen the hot spare will be dedicated to that volume.
317fc58801cSScott LongOtherwise,
318fc58801cSScott Long.Ar drive
319fc58801cSScott Longwill be used as a global hot spare backing all volumes for this controller.
320fc58801cSScott LongNote that
321fc58801cSScott Long.Ar drive
322fc58801cSScott Longmust be as large as the smallest drive in all of the volumes it is going to
323fc58801cSScott Longback.
324fc58801cSScott Long.It Cm remove Ar drive
325fc58801cSScott LongRemove the hot spare
326fc58801cSScott Long.Ar drive
327fc58801cSScott Longfrom service.
328fc58801cSScott LongIt will become a standalone drive.
329fc58801cSScott Long.El
330fc58801cSScott Long.Sh EXAMPLES
331fc58801cSScott LongMark the drive at bus 0 target 4 as offline:
332fc58801cSScott Long.Pp
333fc58801cSScott Long.Dl Nm Cm offline 0:4
334fc58801cSScott Long.Pp
335fc58801cSScott LongCreate a RAID1 array from the two standalone drives
336fc58801cSScott Long.Va da1
337fc58801cSScott Longand
338fc58801cSScott Long.Va da2 :
339fc58801cSScott Long.Pp
340fc58801cSScott Long.Dl Nm Cm create raid1 da1,da2
341fc58801cSScott Long.Pp
342fc58801cSScott LongMark standalone drive
343fc58801cSScott Long.Va da3
344fc58801cSScott Longas a global hot spare:
345fc58801cSScott Long.Pp
346fc58801cSScott Long.Dl Nm Cm add da3
347fc58801cSScott Long.Sh SEE ALSO
348fc58801cSScott Long.Xr mpt 4
3490b31f1f7SUlrich Spörlein.Sh HISTORY
3500b31f1f7SUlrich SpörleinThe
3510b31f1f7SUlrich Spörlein.Nm
3520b31f1f7SUlrich Spörleinutility first appeared in
3530b31f1f7SUlrich Spörlein.Fx 8.0 .
354fc58801cSScott Long.Sh BUGS
355fc58801cSScott LongThe handling of spare drives appears to be unreliable.
356fc58801cSScott LongThe
357fc58801cSScott Long.Xr mpt 4
358fc58801cSScott Longfirmware manages spares via spare drive
359fc58801cSScott Long.Dq pools .
360fc58801cSScott LongThere are eight pools numbered 0 through 7.
361fc58801cSScott LongEach spare drive can only be assigned to a single pool.
362fc58801cSScott LongEach volume can be backed by any combination of zero or more spare pools.
363fc58801cSScott LongThe
364fc58801cSScott Long.Nm
365fc58801cSScott Longutility attempts to use the following algorithm for managing spares.
366fc58801cSScott LongGlobal spares are always assigned to pool 0,
367fc58801cSScott Longand all volumes are always backed by pool 0.
368fc58801cSScott LongFor dedicated spares,
369fc58801cSScott Long.Nm
370fc58801cSScott Longassigns one of the remaining 7 pools to each volume and
371fc58801cSScott Longassigns dedicated drives to that pool.
372fc58801cSScott LongIn practice however, it seems that assigning a drive as a spare does not
373fc58801cSScott Longtake effect until the box has been rebooted.
374fc58801cSScott LongAlso, the firmware renumbers the spare pool assignments after a reboot
375fc58801cSScott Longwhich undoes the effects of the algorithm above.
376fc58801cSScott LongSimple cases such as assigning global spares seem to work ok
377fc58801cSScott Long.Pq albeit requiring a reboot to take effect
378fc58801cSScott Longbut more
379fc58801cSScott Long.Dq exotic
380fc58801cSScott Longconfigurations may not work reliably.
381fc58801cSScott Long.Pp
382fc58801cSScott LongDrive configuration commands result in an excessive flood of messages on the
383fc58801cSScott Longconsole.
384f71d9945SSean Bruno.Pp
385f71d9945SSean BrunoThe mpt version 1 API that is used by
386f71d9945SSean Bruno.Nm
387f71d9945SSean Brunoand
388f71d9945SSean Bruno.Xr mpt 4
389b1edef17SJoel Dahldoes not support volumes above two terabytes.
390f71d9945SSean BrunoThis is a limitation of the API.
391f71d9945SSean BrunoIf you are using this adapter with volumes larger than two terabytes, use the adapter in JBOD mode.
392f71d9945SSean BrunoUtilize
393ed85c523SSean Bruno.Xr geom 8 ,
394ed85c523SSean Bruno.Xr zfs 8 ,
395f71d9945SSean Brunoor another software volume manager to work around this limitation.
396