History log of /freebsd-10.1-release/usr.sbin/mfiutil/
Revision Date Author Comments
272461 03-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


272041 23-Sep-2014 smh

MFC r271429, r271882:
Add support for controlling mfi(4) controller properties

Approved by: re (glebius)
Sponsored by: Multiplay


266400 18-May-2014 jhb

MFC 264765,264766:
- Don't claim the adapter is idle if it is clearing a drive.
- Fix an off by one error when checking for the stop event. This
resulted in not showing the most recent event by default.
- When the stop even is hit, break out of the outer loop to stop
fetching more events.


260497 09-Jan-2014 dim

MFC r260334:

Split the last gcc-specific flags off into CFLAGS.gcc. This also
removes the need to use -Qunused-arguments for clang throughout the
tree.

MFC r260369:

Apply band-aid for 32-bit compat libs failures after r260334: put back
-Qunused-arguments for clang for now, until I can figure out a way to
make it unneeded in all scenarios. Sorry about the breakage.


260324 05-Jan-2014 sbruno

MFC r258901:

svn r251516 resized the buf argument a bit too much. Pass a hardcoded
size of 6 to humanize_number() to resolve this.

PR: bin/184405
Submitted by: jhb


256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


254906 26-Aug-2013 sbruno

Add support to reconfigure a drive as SYSPD (real JBOD in LSI
terminology).

Adds command "mfiutil syspd <drive#>" to change a drive to SYSPD. Drive
will then be scanned/reported immediately as /dev/mfisyspdX by the host.

"mfiutil good <drive#>" clears SYSPD mode, remove /dev/mfisyspdX and
sets disk into UNCONFIGURED mode.

Tested on Dell H310 SAS/SATA RAID controller.

MFC after: 2 weeks
Sponsored by: Yahoo! Inc.


251516 08-Jun-2013 sbruno

Implement foreign volume handling. Allows admins to view foreign metadata
and clear or import it for use.

PR: kern/172091
Submitted by: smh@freebsd.org
Reviewed by: jhb@freebsd.org
MFC after: 2 weeks


250599 13-May-2013 markj

Add a remark to the effect that a manually started relearn will always
result in the battery being completely drained, even in transparent learning
mode.

MFC in: 3 days
Sponsored by: Sandvine Inc.


249258 08-Apr-2013 markj

Switch to a 2-clause license.

Approved by: emaste (co-mentor)
X-MFC with: r249257


249257 08-Apr-2013 markj

Add support for getting and setting BBU properties related to battery
relearning. Specifically, add subcommands to mfiutil(8) which allow the
user to set the BBU and autolearn modes when the firmware supports it,
and add a subcommand which kicks off a battery relearn.

Reviewed by: sbruno, rstone
Tested by: sbruno
Approved by: rstone (co-mentor)
MFC after: 2 weeks
Sponsored by: Sandvine Incorporated


241776 20-Oct-2012 ed

Remove redundant code.

Both mfi_flash.c and mfi_show.c contain very similar functions to print
a list of firmwares. Move these routines into mfiutil.c.

Reported by: jhb


241737 19-Oct-2012 ed

More -Wmissing-variable-declarations fixes.

In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.


237329 20-Jun-2012 mjacob

Fix ARM compilation issue.

X-MFC: 237260


237260 19-Jun-2012 eadler

Add __unused macros to appropriate places in order to allow building
with WARNS=6 on base gcc, gcc46, and clang

Approved by: cperciva
MFC after: 1 week


237259 19-Jun-2012 eadler

Allow users with RO privilege to the device to read the RO attributes.

PR: bin/167302
Submitted by: markham breitbach <markham@ssimicro.com>
Discussed with: pjd (briefly)
Approved by: cperciva
MFC after: 1 week


235635 18-May-2012 sbruno

Decode new battery status indications.

Requires r235634

Reviewed by: ambrisko@
MFC after: 3 days


233713 30-Mar-2012 ambrisko

MFhead_mfi r233621
Remove the magic mfi_array is 288 bytes and just use the
sizeof the array since it is not 288 bytes.

Change reporting of a "SYSTEM" disk to "JBOD" to match
LSI MegaCli and firmware reporting.

This means that fiutil command to "create jbod" is now a
little confusing since a RAID per drive is not really what
LSI defines JBOD to be. This should be fixed in the future
and support added to really create LSI JBOD and enable that
feature on cards that support it.


233522 26-Mar-2012 joel

mdoc: correct .Bd/.Bl arguments.

Reviewed by: brueffer


233455 25-Mar-2012 joel

Remove superfluous paragraph macro.


228278 05-Dec-2011 jhb

Use the correct volume identifier field when parsing MR_EVT_ARG_LD_STRIP
arguments.

MFC after: 2 weeks


228119 29-Nov-2011 delphij

In build_volume(), check if arrays is allocated before traversing its
items. While parsing the arrays input, it's possible that we reach the
error path before initializing the 'arrays' pointer, which in turn leads
to a NULL deference.

Submitted by: Garrett Cooper
MFC after: 1 week


227893 23-Nov-2011 emaste

Avoid double free creating a new RAID with invalid command line arguments.

Submitted by: Xin Huang <xhuang sandvine com>
Reviewed by: rstone@
MFC after: 1 week


225798 27-Sep-2011 emaste

Improve battery capacity reporting

When a status pointer is passed in mfi_dcmd_command does not return an
errno (if the ioctl is successful), so move the test for NO_HW_PRESENT
outside of the error case. This should fix incorrect reporting for
systems with a dead or no battery.

Additionally, handle error codes other than NO_HW_PRESENT by omitting
the battery capacity display. LSI's supercap-based parts (CV series)
report their data using the same interface as battery-based parts,
except that they do not include the capacity stats (state of charge,
cumulative charge cycles, etc.)

Reviewd by: jhb, bz
Tested by: pluknet@, Garrett Cooper
PR: bin/160581
MFC after: 1 week


225331 02-Sep-2011 jhb

Move the logic to parse volume cache commands out into a separate function
and use a loop so that multiple cache commands can be strung together on
the command line into a single update to the volume's properties.

Reviewed by: bz
Approved by: re (kib)
MFC after: 1 week


225168 25-Aug-2011 bz

If a drive is not part of the array (i.e. missing) we need to print the
new line after the pd state information as well, so move it to the outside
of the block.

Submitted by: Mark Johnston at Sandvine Inc
MFC atfer: 3 days
Approved by: re (kib)


224495 29-Jul-2011 jhb

Properly initialize an error variable to avoid returning uninitialized
data when 'show drives' succeeds, often resulting in a failing exit code
even though the command worked fine.

Reviewed by: bz
Approved by: re (kib)
MFC after: 3 days


223345 20-Jun-2011 bz

Add global -d and -e options to either print device numbers
(usually default) or enclosure:slot information as (Exx:Sxx)
or both.

Discussed with: jhb
Reviewed by: jhb
Sponsored by: Sandvine Incorporated
MFC after: 1 week


223267 18-Jun-2011 bz

Add 'show logstate' to usage().

MFC after: 1 week


222899 09-Jun-2011 bz

Contrary to when returning in all-good cases at the end of functions we
did not free memory (1) or close the file descriptor (2) in error cases.

Reported by: Mark Johnston (1)
Reported by: attilio (2)
Reviewed by: jhb
Sponsored by: Sandvine Incorporated
MFC after: 1 week


222589 02-Jun-2011 emaste

There are a couple of structs in mfireg.h with members named 'class'.
These cause problems when trying to include the header in a C++ project.
Rename them to 'evt_class', and track the change in mfi and mfiutil.

Submitted by: Mark Johnston
Sponsored by: Sandvine Incorporated
Reviewed by: jhb@
MFC after: 1 week


221208 29-Apr-2011 jhb

Add a 'show progress' command that shows a summary of all in-progress
commands for a given adapter. Specifically, it shows the status of any
drive or volume activities currently in progress similar to the
'drive process' and 'volume progress' commands.

Reviewed by: emaste
MFC after: 1 week


221119 27-Apr-2011 pluknet

Fix typo in "continuously" argument used in patrol auto command.

Obtained from: Sascha Wildner <saw att online dott de>
Approved by: jhb
MFC after: 3 days


220363 05-Apr-2011 jhb

Add the ability to manage the state of write caching when the battery
back-up is missing or dead. The current state of this field is reported
in 'mfiutil cache <volume>' and can be adjusted via
'mfiutil cache <volume> bad-bbu-write-cache <enable|disable>'. This
setting should generally be disabled to avoid data loss.

MFC after: 1 week


219722 17-Mar-2011 jhb

Preserve errno in an error case.

Submitted by: gcooper


219717 17-Mar-2011 jhb

Add more details to the 'show battery' command including more raw
capacity values, charge cycle count, temperature, and more detailed
status.

Reviewed by: bz, emaste (older version)
MFC after: 1 week


219031 25-Feb-2011 pluknet

Fix division by zero, causing floating point exception in a drive progress
command.

It was possible to read a value of zero from a busy controller used
as the divisor to calculate the remaining rebuild time.

Reported by: Pavel Udovenko <udovenko att nic.ru>
Discussed with: jhb
Approved by: kib (mentor)
MFC after: 1 week


215526 19-Nov-2010 jhb

Handle malloc() failures more gracefully by error'ing out rather than
segfaulting.

Submitted by: gcooper
MFC after: 1 week


214778 04-Nov-2010 bcr

Fix typo.


214396 26-Oct-2010 jhb

- Save errno values before calling warn(3) so that errors are correctly
reported.
- Use powerof2() from <sys/param.h> rather than a copy and paste version.

Submitted by: gcooper
MFC after: 1 week


214131 21-Oct-2010 pluknet

Enable copyback and system PD states.

Reviewed by: jhb
Approved by: avg (mentor)
MFC after: 1 week
X-MFC-After: r214130


213674 10-Oct-2010 randi

Fix compile with -DDEBUG by using the correct mfi_pd_ref union definition
in mfireg.h.

Submitted by: gcooper
Reviewed by: jhb
Approved by: cperciva (mentor)
MFC after: 1 week


213672 10-Oct-2010 randi

Report subcommand handler errors in mfiutil/mptutil so that tools that
invoke the utilities can robustly report errors.

Submitted by: gcooper
Reviewed by: jhb
Approved by: cperciva (mentor)
MFC after: 1 week


210933 06-Aug-2010 joel

Fix typos and spelling mistakes.


210723 01-Aug-2010 joel

Spelling fixes.


204329 25-Feb-2010 ru

Fixed dependencies (make checkdpadd).


198498 26-Oct-2009 jhb

Trim empty mergeinfo.


196282 17-Aug-2009 scottl

Update the man page for manual section 8

Approved by: re


196281 17-Aug-2009 scottl

Update the man page for FreeBSD 8.0

Approved by: re


196280 17-Aug-2009 scottl

Move mfiutil.1 to mfiutil.8 for consistency. Remove superfulous README.

Approved by: re


196211 14-Aug-2009 scottl

Fix is 32bit bug missed in testing.

Approved by: re


196200 13-Aug-2009 scottl

ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell PERC5/6
controllers. Controller, array, and drive status can be checked, basic
attributes can be changed, and arrays and spares can be created and deleted.
Controller firmware can also be flashed.

This does not replace MegaCLI, found in ports, as that is officially sanctioned
and supported by LSI and includes vastly more functionality. However, mfiutil
is open source and guaranteed to provide basic functionality, which can be
especially useful if you have a problem and can't get MegaCLI to work.

Approved by: re
Obtained from: Yahoo! Inc.