Bug 789441 - net-snmp reports incorrect used disk space for large filesystems
Summary: net-snmp reports incorrect used disk space for large filesystems
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: net-snmp
Version: 17
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jan Safranek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-10 18:55 UTC by Larkin Lowrey
Modified: 2012-12-20 15:50 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-20 15:49:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Larkin Lowrey 2012-02-10 18:55:50 UTC
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 18:33:32 UTC
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 10:05:38 UTC
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 10:05:55 UTC
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-23 01:50:52 UTC
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 16:53:52 UTC
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 08:48:20 UTC
(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 16:06:13 UTC
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 15:50:01 UTC
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.