1 .\" Copyright (c) 2008, 2009 Yahoo!, Inc.
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.
12 .\" 3. The names of the authors may not be used to endorse or promote
13 .\" products derived from this software without specific prior written
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 .Nd Utility for managing LSI MegaRAID SAS controllers
60 .Op Ar start Op Ar stop
66 .Cm show foreign Op Ar volume
94 .Cm drive progress Ar drive
97 .Cm drive clear Ar drive Brq "start | stop"
100 .Cm start rebuild Ar drive
103 .Cm abort rebuild Ar drive
106 .Cm locate Ar drive Brq "on | off"
109 .Cm cache Ar volume Op Ar setting Oo Ar value Oc Op ...
112 .Cm name Ar volume Ar name
115 .Cm volume progress Ar volume
123 .Op Fl s Ar stripe_size
124 .Ar drive Ns Op \&, Ns Ar drive Ns Op ",..."
125 .Op Ar drive Ns Op \&, Ns Ar drive Ns Op ",..."
131 .Cm add Ar drive Op Ar volume
143 .Cm patrol Ar command Op Ar interval Op Ar start
149 .Cm foreign clear Op Ar config
152 .Cm foreign diag Op Ar config
155 .Cm foreign preview Op Ar config
158 .Cm foreign import Op Ar config
167 .Cm bbu Ar setting Ar value
171 utility can be used to display or modify various parameters on LSI
172 MegaRAID SAS RAID controllers.
175 consists of zero or more global options followed by a command.
176 Commands may support additional optional or required arguments after the
179 Currently one global option is supported:
180 .Bl -tag -width indent
183 specifies the unit of the controller to work with.
184 If no unit is specified,
188 Various commands accept either or both of the two options:
189 .Bl -tag -width indent
191 Print numeric device IDs as drive identifier.
193 Useful in combination with
195 to print both, numeric device IDs and enclosure:slot information.
197 Print drive identifiers in enclosure:slot form.
198 See next paragraph on format details in context of input rather than
202 Drives may be specified in two forms.
204 a drive may be identified by its device ID.
205 The device ID for configured drives can be found in
208 a drive may be identified by its location as
218 is the slot for each drive as displayed in
221 Volumes may be specified in two forms.
223 a volume may be identified by its target ID.
225 on the volume may be specified by the corresponding
233 utility supports several different groups of commands.
234 The first group of commands provide information about the controller,
235 the volumes it manages, and the drives it controls.
236 The second group of commands are used to manage the physical drives
237 attached to the controller.
238 The third group of commands are used to manage the logical volumes
239 managed by the controller.
240 The fourth group of commands are used to manage the drive configuration for
242 The fifth group of commands are used to manage controller-wide operations.
244 The informational commands include:
245 .Bl -tag -width indent
247 Displays the version of
250 Displays information about the RAID controller such as the model number.
252 Displays information about the battery from the battery backup unit.
254 Displays the volume and drive configuration for the controller.
255 Each array is listed along with the physical drives the array is built from.
256 Each volume is listed along with the arrays that the volume spans.
257 If any hot spare drives are configured, then they are listed as well.
259 Lists all of the physical drives attached to the controller.
260 .It Xo Cm show events
265 .Op Ar start Op Ar stop
267 Display entries from the controller's event log.
268 The controller maintains a circular buffer of events.
269 Each event is tagged with a class and locale.
273 parameter limits the output to entries at the specified class or higher.
276 The available classes from lowest priority to highest are:
277 .Bl -tag -width -indent
281 Periodic progress updates for long-running operations such as background
282 initializations, array rebuilds, or patrol reads.
284 Informational messages such as drive insertions and volume creations.
286 Indicates that some component may be close to failing.
288 A component has failed, but no data is lost.
289 For example, a volume becoming degraded due to a drive failure.
291 A component has failed resulting in data loss.
293 The controller itself has died.
298 parameter limits the output to entries for the specified part of the controller.
299 The default locale is
301 The available locales are
315 parameter is a debugging aid that specifies the number of events to fetch from
316 the controller for each low-level request.
317 The default is 15 events.
319 By default, matching event log entries from the previous shutdown up to the
320 present are displayed. This range can be adjusted via the
325 Each of these parameters can either be specified as a log entry number or as
326 one of the following aliases:
327 .Bl -tag -width -indent
329 The newest entry in the event log.
331 The oldest entry in the event log.
333 The first entry since the event log was cleared.
335 The entry in the event log corresponding to the last time the controller was
338 The entry in the event log corresponding to the most recent boot.
341 Lists all of the firmware images present on the controller.
343 Displays detected foreign configurations on disks for importation or removal.
345 Display the various sequence numbers associated with the event log.
347 Display the status of the controller's patrol read operation.
349 Report the current progress and estimated completion time for active
350 operations on all volumes and drives.
352 Lists all of the logical volumes managed by the controller.
355 The physical drive management commands include:
356 .Bl -tag -width indent
362 must be an online drive that is part of an array.
366 as an unconfigured good drive.
368 must not be part of an existing array.
369 .It Cm rebuild Ar drive
372 that is still part of an array as a good drive suitable for a rebuild.
373 The firmware should kick off an array rebuild on its own if a failed drive
374 is marked as a rebuild drive.
375 .It Cm drive progress Ar drive
376 Report the current progress and estimated completion time of drive operations
377 such as rebuilds or patrol reads.
378 .It Cm drive clear Ar drive Brq "start | stop"
379 Start or stop the writing of all 0x00 characters to a drive.
380 .It Cm start rebuild Ar drive
381 Manually start a rebuild on
383 .It Cm abort rebuild Ar drive
384 Abort an in-progress rebuild operation on
386 It can be resumed with the
389 .It Cm locate Ar drive Brq "on | off"
390 Change the state of the external LED associated with
394 The logical volume management commands include:
395 .Bl -tag -width indent
396 .It Cm cache Ar volume Op Ar setting Oo Ar value Oc Op ...
399 arguments are supplied, then the current cache policy for
408 arguments may be given.
409 Some settings take an additional
411 argument as noted below.
412 The valid settings are:
413 .Bl -tag -width indent
415 Enable caching for both read and write I/O operations.
417 Disable caching for both read and write I/O operations.
419 Enable caching only for read I/O operations.
421 Enable caching only for write I/O operations.
423 Use write-back policy for cached writes.
425 Use write-through policy for cached writes.
426 .It Cm read-ahead Ar value
427 Set the read ahead policy for cached reads.
430 argument can be set to either
435 .It Cm bad-bbu-write-cache Ar value
436 Control the behavior of I/O write caching if the battery is dead or
440 argument can be set to either
444 In general this setting should be left disabled to avoid data loss when
445 the system loses power.
446 .It Cm write-cache Ar value
447 Control the write caches on the physical drives backing
451 argument can be set to either
457 In general this setting should be left disabled to avoid data loss when the
458 physical drives lose power.
459 The battery backup of the RAID controller does not save data in the write
460 caches of the physical drives.
462 .It Cm name Ar volume Ar name
467 .It Cm volume progress Ar volume
468 Report the current progress and estimated completion time of volume operations
469 such as consistency checks and initializations.
472 The configuration commands include:
473 .Bl -tag -width indent
475 Delete the entire configuration including all volumes, arrays, and spares.
476 .It Xo Cm create Ar type
478 .Op Fl s Ar stripe_size
479 .Ar drive Ns Op \&, Ns Ar drive Ns Op ",..."
480 .Op Ar drive Ns Op \&, Ns Ar drive Ns Op ",..."
485 specifies the type of volume to create.
486 Currently supported types include:
487 .Bl -tag -width indent
489 Creates a RAID0 volume for each drive specified.
490 Each drive must be specified as a separate argument.
492 Creates one RAID0 volume spanning the drives listed in the single drive list.
494 Creates one RAID1 volume spanning the drives listed in the single drive list.
496 Creates one RAID5 volume spanning the drives listed in the single drive list.
498 Creates one RAID6 volume spanning the drives listed in the single drive list.
500 Creates one RAID10 volume spanning multiple RAID1 arrays.
501 The drives for each RAID1 array are specified as a single drive list.
503 Creates one RAID50 volume spanning multiple RAID5 arrays.
504 The drives for each RAID5 array are specified as a single drive list.
506 Creates one RAID60 volume spanning multiple RAID6 arrays.
507 The drives for each RAID6 array are specified as a single drive list.
509 Creates a single volume by concatenating all of the drives in the single drive
514 Not all volume types are supported by all controllers.
518 flag is specified after
520 then more verbose output will be enabled.
521 Currently this just provides notification as drives are added to arrays and
522 arrays to volumes when building the configuration.
527 parameter allows the stripe size of the array to be set.
528 By default a stripe size of 64K is used.
529 Valid values are 512 through 1M, though the MFI firmware may reject some
531 .It Cm delete Ar volume
534 .It Cm add Ar drive Op Ar volume
539 must be in the unconfigured good state.
543 then the hot spare will be dedicated to arrays backing that volume.
546 will be used as a global hot spare backing all arrays for this controller.
549 must be as large as the smallest drive in all of the arrays it is going to
551 .It Cm remove Ar drive
555 It will be placed in the unconfigured good state.
558 The controller management commands include:
559 .Bl -tag -width indent
560 .It Cm patrol Ar command Op Ar interval Op Ar start
561 Set the patrol read operation mode.
564 argument can be one of the following values:
565 .Bl -tag -width indent
567 Disable patrol reads.
569 Enable periodic patrol reads initiated by the firmware.
572 argument specifies the interval in seconds between patrol reads.
573 If patrol reads should be run continuously,
576 should consist of the word
580 argument specifies a non-negative, relative start time for the next patrol read.
581 If an interval or start time is not specified,
582 then the existing setting will be used.
584 Enable manual patrol reads that are only initiated by the user.
587 Start a patrol read operation.
589 Stop a currently running patrol read operation.
591 Scan for foreign configurations and display the number found. The
593 argument for the commands below takes the form of a number from 0 to the total
594 configurations found.
595 .It Cm foreign clear Op config
596 Clear the specifed foreign
600 argument is provided.
601 .It Cm foreign diag Op config
602 Display a diagnostic display of the specifed foreign
606 argument is provided.
607 .It Cm foreign preview Op config
608 Preview the specifed foreign
610 after import or all if no
612 argument is provided.
613 .It Cm foreign import Op config
614 Import the specifed foreign
618 argument is provided.
620 Updates the flash on the controller with the firmware stored in
622 A reboot is required for the new firmware to take effect.
624 Start a battery relearn.
625 Note that this seems to always result in the battery being completely drained,
626 regardless of the BBU mode.
627 In particular, the controller write cache will be disabled during the relearn
628 even if transparent learning mode is enabled.
629 .It Cm bbu Ar setting Ar value
630 Update battery backup unit (BBU) properties related to battery relearning.
631 The following settings are configurable:
632 .Bl -tag -width indent
634 Add a delay to the next scheduled battery relearn event. This setting is
635 given in hours and must lie in the range of 0 to 255.
636 .It Cm autolearn-mode
637 Enable or disable automatic periodic battery relearning.
638 The setting may be set to
642 to respectively enable or disable the relearn cycle.
643 Alternatively, a mode of 0, 1 or 2 may be given.
644 Mode 0 enables periodic relearning, mode 1 disables it, and mode 2 disables
645 it and logs a warning to the event log when it detects that a battery relearn
648 Set the BBU's mode of operation. This setting is not supported by all BBUs.
649 Where it is supported, the possible values are the integers between 1 and 5
651 Modes 1, 2 and 3 enable a transparent learn cycle, whereas modes 4 and 5 do not.
652 The BBU's data retention time is greater when transparent learning is not used.
656 Configure the cache for volume mfid0 to cache only writes:
658 .Dl Nm Cm cache mfid0 writes
659 .Dl Nm Cm cache mfid0 write-back
661 Create a RAID5 array spanning the first four disks in the second enclosure:
663 .Dl Nm Cm create raid5 e1:s0,e1:s1,e1:s2,e1:s4
665 Configure the first three disks on a controller as JBOD:
667 .Dl Nm Cm create jbod 0 1 2
669 Create a RAID10 volume that spans two arrays each of which contains two disks
670 from two different enclosures:
672 .Dl Nm Cm create raid10 e1:s0,e1:s1 e2:s0,e2:s1
674 Add drive with the device ID of 4 as a global hot spare:
678 Add the drive in slot 2 in the main chassis as a hot spare for volume mfid0:
680 .Dl Nm Cm add s2 mfid0
682 Configure the adapter to run periodic patrol reads once a week with the first
683 patrol read starting in 5 minutes:
685 .Dl Nm Cm patrol auto 604800 300
687 Display the second detected foreign configuration:
689 .Dl Nm Cm show foreign 1
695 utility first appeared in