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
97 .Cm drive progress Ar drive
100 .Cm drive clear Ar drive Brq "start | stop"
103 .Cm start rebuild Ar drive
106 .Cm abort rebuild Ar drive
109 .Cm locate Ar drive Brq "on | off"
112 .Cm cache Ar volume Op Ar setting Oo Ar value Oc Op ...
115 .Cm name Ar volume Ar name
118 .Cm volume progress Ar volume
126 .Op Fl s Ar stripe_size
127 .Ar drive Ns Op \&, Ns Ar drive Ns Op ",..."
128 .Op Ar drive Ns Op \&, Ns Ar drive Ns Op ",..."
134 .Cm add Ar drive Op Ar volume
146 .Cm patrol Ar command Op Ar interval Op Ar start
152 .Cm foreign clear Op Ar config
155 .Cm foreign diag Op Ar config
158 .Cm foreign preview Op Ar config
161 .Cm foreign import Op Ar config
170 .Cm bbu Ar setting Ar value
173 .Cm ctrlprop Ar rebuild Op Ar rate
176 .Cm ctrlprop Ar alarm Op Ar 0/1
180 utility can be used to display or modify various parameters on LSI
181 MegaRAID SAS RAID controllers.
184 consists of zero or more global options followed by a command.
185 Commands may support additional optional or required arguments after the
188 Currently one global option is supported:
189 .Bl -tag -width indent
192 specifies the unit of the controller to work with.
193 If no unit is specified,
197 Various commands accept either or both of the two options:
198 .Bl -tag -width indent
200 Print numeric device IDs as drive identifier.
202 Useful in combination with
204 to print both, numeric device IDs and enclosure:slot information.
206 Print drive identifiers in enclosure:slot form.
207 See next paragraph on format details in context of input rather than
211 Drives may be specified in two forms.
213 a drive may be identified by its device ID.
214 The device ID for configured drives can be found in
217 a drive may be identified by its location as
227 is the slot for each drive as displayed in
230 Volumes may be specified in two forms.
232 a volume may be identified by its target ID.
234 on the volume may be specified by the corresponding
242 utility supports several different groups of commands.
243 The first group of commands provide information about the controller,
244 the volumes it manages, and the drives it controls.
245 The second group of commands are used to manage the physical drives
246 attached to the controller.
247 The third group of commands are used to manage the logical volumes
248 managed by the controller.
249 The fourth group of commands are used to manage the drive configuration for
251 The fifth group of commands are used to manage controller-wide operations.
253 The informational commands include:
254 .Bl -tag -width indent
256 Displays the version of
259 Displays information about the RAID controller such as the model number.
261 Displays information about the battery from the battery backup unit.
263 Displays the volume and drive configuration for the controller.
264 Each array is listed along with the physical drives the array is built from.
265 Each volume is listed along with the arrays that the volume spans.
266 If any hot spare drives are configured, then they are listed as well.
268 Lists all of the physical drives attached to the controller.
269 .It Xo Cm show events
274 .Op Ar start Op Ar stop
276 Display entries from the controller's event log.
277 The controller maintains a circular buffer of events.
278 Each event is tagged with a class and locale.
282 parameter limits the output to entries at the specified class or higher.
285 The available classes from lowest priority to highest are:
286 .Bl -tag -width indent
290 Periodic progress updates for long-running operations such as background
291 initializations, array rebuilds, or patrol reads.
293 Informational messages such as drive insertions and volume creations.
295 Indicates that some component may be close to failing.
297 A component has failed, but no data is lost.
298 For example, a volume becoming degraded due to a drive failure.
300 A component has failed resulting in data loss.
302 The controller itself has died.
307 parameter limits the output to entries for the specified part of the controller.
308 The default locale is
310 The available locales are
324 parameter is a debugging aid that specifies the number of events to fetch from
325 the controller for each low-level request.
326 The default is 15 events.
328 By default, matching event log entries from the previous shutdown up to the
329 present are displayed.
330 This range can be adjusted via the
335 Each of these parameters can either be specified as a log entry number or as
336 one of the following aliases:
337 .Bl -tag -width indent
339 The newest entry in the event log.
341 The oldest entry in the event log.
343 The first entry since the event log was cleared.
345 The entry in the event log corresponding to the last time the controller was
348 The entry in the event log corresponding to the most recent boot.
351 Lists all of the firmware images present on the controller.
353 Displays detected foreign configurations on disks for importation or removal.
355 Display the various sequence numbers associated with the event log.
357 Display the status of the controller's patrol read operation.
359 Report the current progress and estimated completion time for active
360 operations on all volumes and drives.
362 Lists all of the logical volumes managed by the controller.
365 The physical drive management commands include:
366 .Bl -tag -width indent
372 must be an online drive that is part of an array.
376 as an unconfigured good drive.
378 must not be part of an existing array.
379 .It Cm rebuild Ar drive
382 that is still part of an array as a good drive suitable for a rebuild.
383 The firmware should kick off an array rebuild on its own if a failed drive
384 is marked as a rebuild drive.
385 .It Cm syspd Ar drive
386 Present the drive to the host operating system as a disk SYSPD block device in
387 the format /dev/mfisyspdX.
391 .It Cm drive progress Ar drive
392 Report the current progress and estimated completion time of drive operations
393 such as rebuilds or patrol reads.
394 .It Cm drive clear Ar drive Brq "start | stop"
395 Start or stop the writing of all 0x00 characters to a drive.
396 .It Cm start rebuild Ar drive
397 Manually start a rebuild on
399 .It Cm abort rebuild Ar drive
400 Abort an in-progress rebuild operation on
402 It can be resumed with the
405 .It Cm locate Ar drive Brq "on | off"
406 Change the state of the external LED associated with
410 The logical volume management commands include:
411 .Bl -tag -width indent
412 .It Cm cache Ar volume Op Ar setting Oo Ar value Oc Op ...
415 arguments are supplied, then the current cache policy for
424 arguments may be given.
425 Some settings take an additional
427 argument as noted below.
428 The valid settings are:
429 .Bl -tag -width indent
431 Enable caching for both read and write I/O operations.
433 Disable caching for both read and write I/O operations.
435 Enable caching only for read I/O operations.
437 Enable caching only for write I/O operations.
439 Use write-back policy for cached writes.
441 Use write-through policy for cached writes.
442 .It Cm read-ahead Ar value
443 Set the read ahead policy for cached reads.
446 argument can be set to either
451 .It Cm bad-bbu-write-cache Ar value
452 Control the behavior of I/O write caching if the battery is dead or
456 argument can be set to either
460 In general this setting should be left disabled to avoid data loss when
461 the system loses power.
462 .It Cm write-cache Ar value
463 Control the write caches on the physical drives backing
467 argument can be set to either
473 In general this setting should be left disabled to avoid data loss when the
474 physical drives lose power.
475 The battery backup of the RAID controller does not save data in the write
476 caches of the physical drives.
478 .It Cm name Ar volume Ar name
483 .It Cm volume progress Ar volume
484 Report the current progress and estimated completion time of volume operations
485 such as consistency checks and initializations.
488 The configuration commands include:
489 .Bl -tag -width indent
491 Delete the entire configuration including all volumes, arrays, and spares.
492 .It Xo Cm create Ar type
494 .Op Fl s Ar stripe_size
495 .Ar drive Ns Op \&, Ns Ar drive Ns Op ",..."
496 .Op Ar drive Ns Op \&, Ns Ar drive Ns Op ",..."
501 specifies the type of volume to create.
502 Currently supported types include:
503 .Bl -tag -width indent
505 Creates a RAID0 volume for each drive specified.
506 Each drive must be specified as a separate argument.
508 Creates one RAID0 volume spanning the drives listed in the single drive list.
510 Creates one RAID1 volume spanning the drives listed in the single drive list.
512 Creates one RAID5 volume spanning the drives listed in the single drive list.
514 Creates one RAID6 volume spanning the drives listed in the single drive list.
516 Creates one RAID10 volume spanning multiple RAID1 arrays.
517 The drives for each RAID1 array are specified as a single drive list.
519 Creates one RAID50 volume spanning multiple RAID5 arrays.
520 The drives for each RAID5 array are specified as a single drive list.
522 Creates one RAID60 volume spanning multiple RAID6 arrays.
523 The drives for each RAID6 array are specified as a single drive list.
525 Creates a single volume by concatenating all of the drives in the single drive
530 Not all volume types are supported by all controllers.
534 flag is specified after
536 then more verbose output will be enabled.
537 Currently this just provides notification as drives are added to arrays and
538 arrays to volumes when building the configuration.
543 parameter allows the stripe size of the array to be set.
544 By default a stripe size of 64K is used.
545 Valid values are 512 through 1M, though the MFI firmware may reject some
547 .It Cm delete Ar volume
550 .It Cm add Ar drive Op Ar volume
555 must be in the unconfigured good state.
559 then the hot spare will be dedicated to arrays backing that volume.
562 will be used as a global hot spare backing all arrays for this controller.
565 must be as large as the smallest drive in all of the arrays it is going to
567 .It Cm remove Ar drive
571 It will be placed in the unconfigured good state.
574 The controller management commands include:
575 .Bl -tag -width indent
576 .It Cm patrol Ar command Op Ar interval Op Ar start
577 Set the patrol read operation mode.
580 argument can be one of the following values:
581 .Bl -tag -width indent
583 Disable patrol reads.
585 Enable periodic patrol reads initiated by the firmware.
588 argument specifies the interval in seconds between patrol reads.
589 If patrol reads should be run continuously,
592 should consist of the word
596 argument specifies a non-negative, relative start time for the next patrol read.
597 If an interval or start time is not specified,
598 then the existing setting will be used.
600 Enable manual patrol reads that are only initiated by the user.
603 Start a patrol read operation.
605 Stop a currently running patrol read operation.
607 Scan for foreign configurations and display the number found.
610 argument for the commands below takes the form of a number from 0 to the total
611 configurations found.
612 .It Cm foreign clear Op config
613 Clear the specified foreign
617 argument is provided.
618 .It Cm foreign diag Op config
619 Display a diagnostic display of the specified foreign
623 argument is provided.
624 .It Cm foreign preview Op config
625 Preview the specified foreign
627 after import or all if no
629 argument is provided.
630 .It Cm foreign import Op config
631 Import the specified foreign
635 argument is provided.
637 Updates the flash on the controller with the firmware stored in
639 A reboot is required for the new firmware to take effect.
641 Start a battery relearn.
642 Note that this seems to always result in the battery being completely drained,
643 regardless of the BBU mode.
644 In particular, the controller write cache will be disabled during the relearn
645 even if transparent learning mode is enabled.
646 .It Cm bbu Ar setting Ar value
647 Update battery backup unit (BBU) properties related to battery relearning.
648 The following settings are configurable:
649 .Bl -tag -width indent
651 Add a delay to the next scheduled battery relearn event.
652 This setting is given in hours and must lie in the range of 0 to 255.
653 .It Cm autolearn-mode
654 Enable or disable automatic periodic battery relearning.
655 The setting may be set to
659 to respectively enable or disable the relearn cycle.
660 Alternatively, a mode of 0, 1 or 2 may be given.
661 Mode 0 enables periodic relearning, mode 1 disables it, and mode 2 disables
662 it and logs a warning to the event log when it detects that a battery relearn
665 Set the BBU's mode of operation.
666 This setting is not supported by all BBUs.
667 Where it is supported, the possible values are the integers between 1 and 5
669 Modes 1, 2 and 3 enable a transparent learn cycle, whereas modes 4 and 5 do not.
670 The BBU's data retention time is greater when transparent learning is not used.
672 .It Cm ctrlprop Ar rebuild Op Ar rate
673 With no arguments display the rate of rebuild (percentage)a for volumes.
674 With an integer argument (0-100), set that value as the new rebuild rate for volumes.
675 .It Cm ctrlprop Ar alarm Op Ar 0/1
676 With no arguments display the current alarm enable/disable status.
677 With a 0, disable alarms.
678 With a 1, enable alarms.
681 Configure the cache for volume mfid0 to cache only writes:
683 .Dl Nm Cm cache mfid0 writes
684 .Dl Nm Cm cache mfid0 write-back
686 Create a RAID5 array spanning the first four disks in the second enclosure:
688 .Dl Nm Cm create raid5 e1:s0,e1:s1,e1:s2,e1:s4
690 Configure the first three disks on a controller as JBOD:
692 .Dl Nm Cm create jbod 0 1 2
694 Create a RAID10 volume that spans two arrays each of which contains two disks
695 from two different enclosures:
697 .Dl Nm Cm create raid10 e1:s0,e1:s1 e2:s0,e2:s1
699 Add drive with the device ID of 4 as a global hot spare:
703 Add the drive in slot 2 in the main chassis as a hot spare for volume mfid0:
705 .Dl Nm Cm add s2 mfid0
707 Reconfigure a disk as a SYSPD block device with no RAID
711 Configure the adapter to run periodic patrol reads once a week with the first
712 patrol read starting in 5 minutes:
714 .Dl Nm Cm patrol auto 604800 300
716 Display the second detected foreign configuration:
718 .Dl Nm Cm show foreign 1
720 Set the current rebuild rate for volumes to 40%:
721 .Dl Nm Cm ctrlprop rebuild 40
727 utility first appeared in