Bug 789441 - net-snmp reports incorrect used disk space for large filesystems
net-snmp reports incorrect used disk space for large filesystems
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: net-snmp (Show other bugs)
17
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Jan Safranek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-10 13:55 EST by Larkin Lowrey
Modified: 2012-12-20 10:50 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-20 10:49:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Larkin Lowrey 2012-02-10 13:55:50 EST
Description of problem:
Filesystem has 9.7T used, net-snmp reports 6.5T. This bug has been fixed by the net-snmp team. I've included links to the bug report and the patch below.

Version-Release number of selected component (if applicable):
net-snmp-5.7.1-2.fc16.x86_64

How reproducible:
Every time.

Steps to Reproduce:
1. Create large filesystem and fill with 10TB of data.
2. Query for used space via snmp.
3.
  
Actual results:
Reports 6.5T used.

Expected results:
Should report 9.7T used.

Additional info:

net-snmp bug: http://sourceforge.net/tracker/index.php?func=detail&aid=3419825&group_id=12694&atid=112694

net-snmp patch: https://github.com/bvanassche/net-snmp/commit/76ff25d9bf97579e7213102065fd5096f049a4c5
Comment 1 Larkin Lowrey 2012-10-20 14:33:32 EDT
Confirmed still occurring in F17.

The bug fix should be included in the 5.7.2 release of net-snmp. This version is in the F18 testing repo. I would greatly appreciate this version being added to the F17 repo.
Comment 2 Fedora Update System 2012-10-22 06:05:38 EDT
net-snmp-5.7.1-3.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/net-snmp-5.7.1-3.fc16
Comment 3 Fedora Update System 2012-10-22 06:05:55 EDT
net-snmp-5.7.1-5.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/net-snmp-5.7.1-5.fc17
Comment 4 Fedora Update System 2012-10-22 21:50:52 EDT
Package net-snmp-5.7.1-3.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing net-snmp-5.7.1-3.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16659/net-snmp-5.7.1-3.fc16
then log in and leave karma (feedback).
Comment 5 Larkin Lowrey 2012-10-23 12:53:52 EDT
This does not appear to have worked.

I'm getting the following in /var/log/messages:

snmpd[1855]: truncating integer value > 32 bits

Here're the results from snmpget:

HOST-RESOURCES-MIB::hrStorageSize.31 = INTEGER: 2043037374
HOST-RESOURCES-MIB::hrStorageUsed.31 = INTEGER: 2796038858

The Used value should not be larger than the Size value. The correct Used is 1772751538.

I'm running:

Installed Packages
Name        : net-snmp
Arch        : x86_64
Epoch       : 1
Version     : 5.7.1
Release     : 5.fc17
Size        : 870 k
Repo        : installed
From repo   : updates-testing
Comment 6 Jan Safranek 2012-10-24 04:48:20 EDT
(In reply to comment #5)

> Here're the results from snmpget:
> 
> HOST-RESOURCES-MIB::hrStorageSize.31 = INTEGER: 2043037374
> HOST-RESOURCES-MIB::hrStorageUsed.31 = INTEGER: 2796038858
> 

Interesting...

Just to be sure, please provide output of rpm -qa | grep net-snmp

And please start snmpd like this:
  # snmpd -f -Lo -Dfsys -Lf snmpd.log

Stimulate it using:
  # snmpwalk localhost hrStorageTable

and send me snmpd.log file and output of the snmpwalk.

With my dummy 18TB filesystem, it shows following line in the log:
fsys: Results of 32-bit conversion: size 4812611303 -> 1203152825; units 4096 -> 16384; avail 4570986620 -> 1142746655; used 32773 -> 8193

And my hrStorageTable looks ok:
HOST-RESOURCES-MIB::hrStorageAllocationUnits.65 = INTEGER: 16384 Bytes
HOST-RESOURCES-MIB::hrStorageSize.65 = INTEGER: 1203152825
HOST-RESOURCES-MIB::hrStorageUsed.65 = INTEGER: 8193
Comment 7 Larkin Lowrey 2012-10-24 12:06:13 EDT
I have it working now.

When I updated net-snmp yum updated everything except net-snmp-agent-libs. Once I updated that to 5.7.1-5.fc17 I got the correct values.

Thank you! This has been bugging me for months.
Comment 8 Fedora Update System 2012-12-20 10:50:01 EST
net-snmp-5.7.1-3.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.