Bug 167575 - mfiutil(8) claims battery is OK even though it is worn out and wb cache is disabled
Summary: mfiutil(8) claims battery is OK even though it is worn out and wb cache is di...
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-04 14:40 UTC by Ed Maste
Modified: 2017-11-21 01:40 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2012-05-04 14:40:10 UTC
mfiutil reports that the cache is disabled:

$ sudo mfiutil cache 0
mfi0 volume mfid0 cache settings:
             I/O caching: writes
           write caching: write-back
write cache with bad BBU: disabled
              read ahead: none
       drive write cache: disabled
Cache Disabled Due to Dead Battery

But the battery reports "Status: normal"

$ sudo mfiutil show battery
mfi0: Battery State:
     Manufacture Date: 12/4/2010
        Serial Number: 1499
         Manufacturer: LS1191002A
                Model: 3150302
            Chemistry: LION
      Design Capacity: 1215 mAh
 Full Charge Capacity: 504 mAh
     Current Capacity: 479 mAh
        Charge Cycles: 35
       Current Charge: 95%
       Design Voltage: 3700 mV
      Current Voltage: 4050 mV
          Temperature: 28 C
               Status: normal

$ mfiutil version
mfiutil version 1.0.13

Using LSI's megacli reports additional information, including a "battery replacement required" indication

$ sudo ~emaste/lsi/megacli/8.00.46/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL
                                     
BBU status for Adapter: 0

BatteryType: iBBU
Voltage: 4050 mV
Current: 0 mA
Temperature: 28 C

BBU Firmware Status:

  Charging Status              : None
  Voltage                                 : OK
  Temperature                             : OK
  Learn Cycle Requested                   : No
  Learn Cycle Active                      : No
  Learn Cycle Status                      : OK
  Learn Cycle Timeout                     : No
  I2c Errors Detected                     : No
  Battery Pack Missing                    : No
  Battery Replacement required            : Yes
  Remaining Capacity Low                  : Yes
  Periodic Learn Required                 : No
  Transparent Learn                       : No
  No space to cache offload               : No
  Pack is about to fail & should be replaced : No
  Cache Offload premium feature required  : No
  Module microcode update required        : No

Battery state: 

GasGuageStatus:
  Fully Discharged        : No
  Fully Charged           : Yes
  Discharging             : Yes
  Initialized             : Yes
  Remaining Time Alarm    : No
  Remaining Capacity Alarm: No
  Discharge Terminated    : No
  Over Temperature        : No
  Charging Terminated     : No
  Over Charged            : No

Relative State of Charge: 95 %
Charger System State: 49168
Charger System Ctrl: 0
Charging current: 0 mA
Absolute state of charge: 39 %
Max Error: 2 %

Exit Code: 0x00

How-To-Repeat: Per description
Comment 1 seanbru 2012-05-11 14:26:25 UTC
I would be more suspcious of the hardware you're using.

My Dell boxes with mfi(4) seem to do just fine with failed batteries:

bash-4.2$ sudo mfiutil show battery
mfi0: Battery State:
     Manufacture Date: 9/22/2007
        Serial Number: 2015
         Manufacturer: SANYO
                Model: DLU8735
            Chemistry: LION
      Design Capacity: 1900 mAh
 Full Charge Capacity: 369 mAh
     Current Capacity: 349 mAh
        Charge Cycles: 42
       Current Charge: 95%
       Design Voltage: 3700 mV
      Current Voltage: 4014 mV
          Temperature: 22 C
               Status: normal
      State of Health: bad
Comment 2 Vincent Hoffman-Kazlauskas 2013-12-12 10:02:41 UTC
Issue still exists with 8.4
FreeBSD banshee.namesco.net 8.4-RELEASE-p6 FreeBSD 8.4-RELEASE-p6 #0
r259163: Tue Dec 10 10:40:01 GMT 2013    
toor@banshee.namesco.net:/usr/src/sys/amd64/compile/BANSHEE  amd64

The server still works but write cache being disabled makes a huge
difference to IO

root@banshee # mfiutil cache 0
mfi0 volume mfid0 cache settings:
             I/O caching: writes and reads
           write caching: write-back
write cache with bad BBU: disabled
              read ahead: always
       drive write cache: enabled
Cache Disabled Due to Dead Battery
($09:52:35 <~>$) 0
root@banshee # mfiutil show battery
mfi0: Battery State:
     Manufacture Date: 6/3/2011
        Serial Number: 637
         Manufacturer: LS1191002A
                Model: 3150302
            Chemistry: LION
      Design Capacity: 1215 mAh
 Full Charge Capacity: 549 mAh
     Current Capacity: 534 mAh
        Charge Cycles: 66
       Current Charge: 97%
       Design Voltage: 3700 mV
      Current Voltage: 4048 mV
          Temperature: 39 C
               Status: normal
Comment 3 Ed Maste freebsd_committer freebsd_triage 2014-06-05 15:00:45 UTC
In both cases the battery had < 50% capacity -- 504 and 549 mAh, vs 1215 mAh design capacity.  The write cache is disabled as expected, the issue is just the battery status reporting.

BBU State of Health output as added in r219717

        switch (stat.battery_type) {
        case MFI_BBU_TYPE_BBU:
                printf("      State of Health: %s\n",
                    stat.detail.bbu.is_SOH_good ? "good" : "bad");
                break;
        }

and I suspect this would report "bad" for those batteries.
Comment 4 Harrison Grundy 2014-12-16 15:27:02 UTC
Does this still occur after r219717?
Comment 5 Ed Maste freebsd_committer freebsd_triage 2015-07-07 19:07:27 UTC
I no longer have access to this hardware (or a bad battery) to test. Hopefully someone else can.
Comment 6 Ed Maste freebsd_committer freebsd_triage 2015-12-08 14:11:16 UTC
I've asked a former colleague (who still has access to this hw) to test.
Comment 7 Ed Maste freebsd_committer freebsd_triage 2017-11-21 01:40:47 UTC
I no longer have access to any of this hardware, but I believe this has been fixed.