Bug 183900

Summary: wrong values in disk statistics for disks larger then 2Tb
Product: [Fedora] Fedora Reporter: max vakulenko <mv>
Component: net-snmpAssignee: Radek Vokál <rvokal>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: andy, orion, rs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-10 13:39:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description max vakulenko 2006-03-03 15:35:03 UTC
Description of problem:

snmpget return negative value of -2^31 (-2147483648) for partition larger than
2^31 Kbytes (>2Tb)

Version-Release number of selected component (if applicable):

Up to 5.2.1.2-fc4.1

How reproducible:



Steps to Reproduce:
1. Create mountpoint with size >2Tb
2. Setup snmp
3. Run snmpwalk/snmpget for given partition (doesn't matter local or remote)
  
Actual results:
-2147483648

You will see wrong values like this:

$ snmpget [params...] .1.3.6.1.4.1.2021.9.1.6.6
UCD-SNMP-MIB::dskTotal.6 = INTEGER: -2147483648

Expected results:

3Tb free actually:
$ df
...
/dev/mapper/raid1/vol1   4285534816 760017152 3525517664  18% /raid
So result should be like this:
UCD-SNMP-MIB::dskTotal.6 = INTEGER(maybe UNSIGNED or INTEGER32): 3525517664

Additional info:

dskTotal described in /usr/share/snmp/mibs/UCD-SNMP-MIB.txt as Integer32, so
wrong results are expected for >2Tb partition.

No luck for replacing type by Unsigned32 (possible workaround for <4Tb
partitions which never be negative size):

$ grep -A1 dskTotal /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
    dskTotal            Unsigned32,
    dskAvail            Integer32,
--
dskTotal OBJECT-TYPE
    SYNTAX      Unsigned32

$ UCD-SNMP-MIB::dskTotal.6 = Wrong Type (should be Gauge32 or Unsigned32):
INTEGER: -2147483648

Comment 2 Robert Story 2006-06-07 21:23:21 UTC
Use the (standard) HOST-RESOURCES-MIB::hrStorageTable instead of the
(proprietary ) UCD-SNMP-MIB::dskTable.