MFIUTIL(8)
π NAME π
mfiutil, mrsasutil β Utility for managing LSI MegaRAID SAS controllers. Yep bestie, this is the MFIUTIL(8) manual page, and it's giving βlet's keep your RAID controller cute and functionalβ energy. π
β¨
π SYNOPSIS π
mfiutil version
mfiutil [-D device] [-t type] [-u unit] show adapter
mfiutil [-D device] [-t type] [-u unit] show battery
mfiutil [-d] [-e] [-D device] [-t type] [-u unit] show config
mfiutil [-D device] [-t type] [-u unit] show drives
mfiutil [-D device] [-t type] [-u unit] show events [-c class]
[-l locale] [-n count] [-v] [start [stop]]
mfiutil [-D device] [-t type] [-u unit] show firmware
mfiutil [-D device] [-t type] [-u unit] show foreign [volume]
mfiutil [-D device] [-t type] [-u unit] show logstate
mfiutil [-d] [-e] [-D device] [-t type] [-u unit] show patrol
mfiutil [-d] [-e] [-D device] [-t type] [-u unit] show progress
mfiutil [-D device] [-t type] [-u unit] show volumes
mfiutil [-D device] [-t type] [-u unit] fail drive
mfiutil [-D device] [-t type] [-u unit] good drive
mfiutil [-D device] [-t type] [-u unit] rebuild drive
mfiutil [-D device] [-t type] [-u unit] syspd drive
mfiutil [-D device] [-t type] [-u unit] drive progress drive
mfiutil [-D device] [-t type] [-u unit] drive clear drive {start | stop}
mfiutil [-D device] [-t type] [-u unit] start rebuild drive
mfiutil [-D device] [-t type] [-u unit] abort rebuild drive
mfiutil [-D device] [-t type] [-u unit] locate drive {on | off}
mfiutil [-D device] [-t type] [-u unit] cache volume [setting [value]
[...]]
mfiutil [-D device] [-t type] [-u unit] name volume name
mfiutil [-D device] [-t type] [-u unit] volume progress volume
mfiutil [-D device] [-t type] [-u unit] clear
mfiutil [-D device] [-t type] [-u unit] create type [-v]
[-s stripe_size] drive[,drive[,...]] [drive[,drive[,...]]]
mfiutil [-D device] [-t type] [-u unit] delete volume
mfiutil [-D device] [-t type] [-u unit] add drive [volume]
mfiutil [-D device] [-t type] [-u unit] remove drive
mfiutil [-D device] [-t type] [-u unit] start patrol
mfiutil [-D device] [-t type] [-u unit] stop patrol
mfiutil [-D device] [-t type] [-u unit] patrol command [interval
[start]]
mfiutil [-D device] [-t type] [-u unit] foreign scan
mfiutil [-D device] [-t type] [-u unit] foreign clear [config]
mfiutil [-D device] [-t type] [-u unit] foreign diag [config]
mfiutil [-D device] [-t type] [-u unit] foreign preview [config]
mfiutil [-D device] [-t type] [-u unit] foreign import [config]
mfiutil [-D device] [-t type] [-u unit] flash file
mfiutil [-D device] [-t type] [-u unit] start learn
mfiutil [-D device] [-t type] [-u unit] bbu setting value
mfiutil [-D device] [-t type] [-u unit] ctrlprop rebuild [rate]
mfiutil [-D device] [-t type] [-u unit] ctrlprop alarm [0/1]
π DESCRIPTION π
Okay so the mfiutil utility is your little tool for displaying or modifying various parameters on LSI MegaRAID SAS RAID controllers. Each invocation of mfiutil is literally zero or more global options followed by a command. And commands may support additional optional or required arguments after the command. Slay. π
Right now, three global options are supported:
-D deviceβdevicespecifies the device node of the controller to use./dev/will be added to the device node if needed. If no device node is specified, thendevicewill be made of thetypeanddevice. π«Ά-t typeβtypespecifies the type of the controller to work with, eithermfi(4)ormrsas(4). If notypeis specified, then the name of the invoked tool is used to derive the type.-u unitβunitspecifies the unit of the controller to work with. If nounitis specified, then unit0is used. β¨
Various commands accept either or both of the two options:
-dβ Print numeric device IDs as drive identifier. This is the default. Useful in combination with-eto print both, numeric device IDs andenclosure:slotinformation. π-eβ Print drive identifiers inenclosure:slotform. See the next paragraph on format details in context of input rather than output.
Drives may be specified in two forms. First, a drive may be identified by its device ID. The device ID for configured drives can be found in show config. Second, a drive may be identified by its location as [Exx:]Syy where xx is the enclosure and yy is the slot for each drive as displayed in show drives. πΈ
Volumes may be specified in two forms. First, a volume may be identified by its target ID. Second, the volume may be specified by the corresponding mfidX device, such as mfid0. π¦
The mfiutil utility supports several different groups of commands. The first group of commands provide information about the controller, the volumes it manages, and the drives it controls. The second group of commands are used to manage the physical drives attached to the controller. The third group of commands are used to manage the logical volumes managed by the controller. The fourth group of commands are used to manage the drive configuration for the controller. The fifth group of commands are used to manage controller-wide operations. πβ¨
π Informational commands π
The informational commands include:
versionβ Displays the version ofmfiutil.show adapterβ Displays information about the RAID controller such as the model number.show batteryβ Displays information about the battery from the battery backup unit.show configβ Displays the volume and drive configuration for the controller. Each array is listed along with the physical drives the array is built from. Each volume is listed along with the arrays that the volume spans. If any hot spare drives are configured, then they are listed as well.show drivesβ Lists all of the physical drives attached to the controller.show events [-c class] [-l locale] [-n count] [-v] [start [stop]]β Display entries from the controller's event log. The controller maintains a circular buffer of events. Each event is tagged with a class and locale.
The class parameter limits the output to entries at the specified class or higher. The default class is warn. The available classes from lowest priority to highest are:
debugβ Debug messages.progressβ Periodic progress updates for long-running operations such as background initializations, array rebuilds, or patrol reads.infoβ Informational messages such as drive insertions and volume creations.warnβ Indicates that some component may be close to failing.critβ A component has failed, but no data is lost. For example, a volume becoming degraded due to a drive failure.fatalβ A component has failed resulting in data loss.deadβ The controller itself has died. π
The locale parameter limits the output to entries for the specified part of the controller. The default locale is all. The available locales are volume, drive, enclosure, battery, sas, controller, config, cluster, and all.
The count parameter is a debugging aid that specifies the number of events to fetch from the controller for each low-level request. The default is 15 events.
By default, matching event log entries from the previous shutdown up to the present are displayed. This range can be adjusted via the start and stop parameters. Each of these parameters can either be specified as a log entry number or as one of the following aliases:
newestβ The newest entry in the event log.oldestβ The oldest entry in the event log.clearβ The first entry since the event log was cleared.shutdownβ The entry in the event log corresponding to the last time the controller was cleanly shut down.bootβ The entry in the event log corresponding to the most recent boot.
show firmwareβ Lists all of the firmware images present on the controller.show foreignβ Displays detected foreign configurations on disks for importation or removal.show logstateβ Display the various sequence numbers associated with the event log.show patrolβ Display the status of the controller's patrol read operation.show progressβ Report the current progress and estimated completion time for active operations on all volumes and drives.show volumesβ Lists all of the logical volumes managed by the controller. π
π οΈ Physical drive management commands π οΈ
The physical drive management commands include:
fail driveβ Markdriveas failed.drivemust be an online drive that is part of an array.good driveβ Markdriveas an unconfigured good drive.drivemust not be part of an existing array.rebuild driveβ Mark a faileddrivethat is still part of an array as a good drive suitable for a rebuild. The firmware should kick off an array rebuild on its own if a failed drive is marked as a rebuild drive.syspd driveβ Present thedriveto the host operating system as a disk SYSPD block device in the format/dev/mfisyspdX. Clear this flag withgood drive.drive progress driveβ Report the current progress and estimated completion time of drive operations such as rebuilds or patrol reads.drive clear drive {start | stop}β Start or stop the writing of all0x00characters to adrive.start rebuild driveβ Manually start a rebuild ondrive.abort rebuild driveβ Abort an in-progress rebuild operation ondrive. It can be resumed with thestart rebuildcommand.locate drive {on | off}β Change the state of the external LED associated withdrive. π₯
π Logical volume management commands π
The logical volume management commands include:
cache volume [setting [value] [...]]β If nosettingarguments are supplied, then the current cache policy forvolumeis displayed; otherwise, the cache policy forvolumeis modified. One or moresettingarguments may be given. Some settings take an additionalvalueargument as noted below. The valid settings are:enableβ Enable caching for both read and write I/O operations.disableβ Disable caching for both read and write I/O operations.readsβ Enable caching only for read I/O operations.
writesβ enables caching for write I/O operations only. write girl summer πwrite-backβ use thewrite-backpolicy for cached writes.write-throughβ use thewrite-throughpolicy for cached writes.read-ahead valueβ sets the read ahead policy for cached reads. The value can benone,adaptive, oralways. pick your fighter β¨bad-bbu-write-cache valueβ controls what happens to I/O write caching when the battery is dead or missing π. The value can bedisableorenable. fr fr leave this disabled unless you have a reason, because otherwise you can lose data when the system loses power.write-cache valueβ controls the write caches on the physical drives backing the volume. The value can bedisable,enable, ordefault.
In general this should stay disabled to avoid data loss when the physical drives lose power. The battery backup of the RAID controller does not save data sitting in the write caches of the physical drives β it's giving false security, bestie, don't fall for it π
π name β the glow-up
namevolume name β sets the name of volume to name. iconic, she has a name now.volume progressvolume β reports the current progress and the estimated completion time of volume operations, like consistency checks and initializations. it's giving "are we there yet" π
πΈ CONFIGURATION COMMANDS πΈ
the ones that actually change stuff. main character energy only π
the whole wipe
clearβ deletes the entire configuration: all volumes, all arrays, and all spares. everything. gone. no cap ππ«Ά
create β build a baddie
create type [-v] [-s stripe_size] drive[,drive[,...]] [drive[,drive[,...]]]
creates a new volume. The type says what kind of volume to build. Currently supported types include:
jbodβ creates a RAID0 volume for each drive specified. Every drive has to be its own separate argument.raid0β creates one RAID0 volume spanning the drives listed in the single drive list.raid1β creates one RAID1 volume spanning the drives listed in the single drive list.raid5β creates one RAID5 volume spanning the drives listed in the single drive list.raid6β creates one RAID6 volume spanning the drives listed in the single drive list.raid10β creates one RAID10 volume spanning multiple RAID1 arrays. The drives for each RAID1 array are given as a single drive list.raid50β creates one RAID50 volume spanning multiple RAID5 arrays. The drives for each RAID5 array are given as a single drive list.raid60β creates one RAID60 volume spanning multiple RAID6 arrays. The drives for each RAID6 array are given as a single drive list.concatβ creates a single volume by concatenating all of the drives in the single drive list. lowkey the chill option.
Note: not all volume types are supported by all controllers. check before you commit, bestie π§
If the -v flag is given after type, more verbose output gets enabled. Currently this just gives you notifications as drives are added to arrays and arrays are added to volumes while the configuration is being built. she's chatty and we love her π
The -s stripe_size parameter lets you set the stripe size of the array. By default a stripe size of 64K is used. Valid values are 512 through 1M, though the MFI firmware may reject some values β so don't come for me if it says no π
delete / add / remove
deletevolume β deletes the volume volume. bye bestie πadddrive [volume] β marks drive as a hot spare. Drive must be in the unconfigured good state. If volume is given, the hot spare gets dedicated to the arrays backing that volume. Otherwise, drive becomes a global hot spare backing all arrays for this controller. Heads up: drive must be at least as large as the smallest drive in all the arrays it's going to back. no short kings allowed πremovedrive β takes the hot spare drive out of service. It goes back to the unconfigured good state.
π CONTROLLER MANAGEMENT COMMANDS π
patrol reads
patrol command [interval [start]]
sets the patrol read operation mode. The command argument can be one of:
disableβ disables patrol reads.autoβ enables periodic patrol reads initiated by the firmware. The optional interval argument specifies the interval in seconds between patrol reads. If patrol reads should run continuously, interval is the wordcontinuously. The optional start argument gives a non-negative, relative start time for the next patrol read. If interval or start isn't given, the existing setting gets used.manualβ enables manual patrol reads that only the user initiates. you're the captain now βstart patrolβ starts a patrol read operation. go go go π₯stop patrolβ stops a patrol read that's currently running. sit down πͺ
foreign configs πΈ
foreign scanβ scans for foreign configurations and displays the number found.
The config argument for the commands below takes the form of a number from 0 to the total configurations found.
foreign clear [config]β clears the specified foreign config, or all of them if no config argument is given.foreign diag [config]β displays a diagnostic display of the specified foreign config, or all of them if no config argument is given.foreign preview [config]β previews the specified foreign config after import, or all of them if no config argument is given.foreign import [config]β imports the specified foreign config, or all of them if no config argument is given.
firmware + battery stuff
flashfile β updates the flash on the controller with the firmware stored in file. A reboot is required for the new firmware to take effect. don't skip the reboot, I'm begging π«Άstart learnβ starts a battery relearn.
Note that this seems to always result in the battery being completely drained, regardless of the BBU mode π. In particular, the controller write cache will be disabled during the relearn even if transparent learning mode is enabled. so likeβ¦ plan around it.
bbu setting valueβ updates battery backup unit (BBU) properties related to battery relearning. These are the configurable settings:learn-delayβ adds a delay to the next scheduled battery relearn event. Given in hours, and must lie in the range of 0 to 255.autolearn-modeβ enables or disables automatic periodic battery relearning. Can be set toenableordisableto respectively enable or disable the relearn cycle. Alternatively you can give a mode of 0, 1, or 2. Mode 0 enables periodic relearning, mode 1 disables it, and mode 2 disables it and logs a warning to the event log when it detects that a battery relearn should be performed. mode 2 is giving "I'm not doing it but I'm telling on myself" πbbu-modeβ sets the BBU's mode of operation. Not supported by all BBUs, so vibe check first. Where it is supported, the possible values are the integers between 1 and 5 inclusive. Modes 1, 2, and 3 enable a transparent learn cycle, whereas modes 4 and 5 do not. The BBU's data retention time is greater when transparent learning isn't used.
ctrlprop
ctrlprop rebuild [rate]β with no arguments, displays the rate of rebuild (percentage) for volumes. With an integer argument (0-100), sets that value as the new rebuild rate for volumes.ctrlprop alarm [0/1]β with no arguments, displays the current alarm enable/disable status. With a 0, disables alarms. With a 1, enables alarms. screaming optional β¨
π EXAMPLES π
configure the cache for volume mfid0 to cache only writes:
mfiutil cache mfid0 writes
mfiutil cache mfid0 write-back
create a RAID5 array spanning the first four disks in the second enclosure:
mfiutil create raid5 e1:s0,e1:s1,e1:s2,e1:s4
configure the first three disks on a controller as JBOD:
mfiutil create jbod 0 1 2
create a RAID10 volume that spans two arrays, each of which contains two disks from two different enclosures:
mfiutil create raid10 e1:s0,e1:s1 e2:s0,e2:s1
add the drive with the device ID of 4 as a global hot spare:
mfiutil add 4
add the drive in slot 2 in the main chassis as a hot spare for volume mfid0:
mfiutil add s2 mfid0
reconfigure a disk as a SYSPD block device with no RAID:
mfiutil syspd 0
configure the adapter to run periodic patrol reads once a week with the first patrol read starting in 5 minutes:
mfiutil patrol auto 604800 300
display the second detected foreign configuration:
mfiutil show foreign 1
set the current rebuild rate for volumes to 40%:
mfiutil ctrlprop rebuild 40
π¦ SEE ALSO π¦
mfi(4), mrsas(4) β go read those too, iykyk π«Ά
π HISTORY π
The mfiutil utility first appeared in FreeBSD 8.0. a legend from day one, periodt π
and that's the whole page bestie πΈ this Debian build of the page is dated September 2, 2011 β vintage era, still serving looks π go configure something iconic β¨π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 2008, 2009 Yahoo!, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms