RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1257161 - net-snmp reports wrong filesystem size
Summary: net-snmp reports wrong filesystem size
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: net-snmp
Version: 6.7
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jan Safranek
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
: 1262944 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-26 11:50 UTC by Rikard
Modified: 2023-09-07 18:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-03 08:32:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
df output (501 bytes, text/plain)
2015-08-31 09:07 UTC, Rikard
no flags Details
snmpwalk from new net-snmp (4.08 KB, text/plain)
2015-08-31 09:08 UTC, Rikard
no flags Details
snmpwalk from old net-snmp (4.08 KB, text/plain)
2015-08-31 09:08 UTC, Rikard
no flags Details

Description Rikard 2015-08-26 11:50:02 UTC
Description of problem:
After installing net-snmp-5.5-54.el6.x86_64 and net-snmp-libs-5.5-54.el6.x86_64 net-snmp reports 10TB ext4 filesystem as 2TB. downgrading to net-snmp-5.5-50.el6_6.1.x86_64 and net-snmp-libs-5.5-50.el6_6.1.x86_64 makes it report correct again. 

For some reason it did not work with net-snmp-5.5-54.el6.x86_64 and net-snmp-libs-5.5-54.el6.x86_64 either so the bug probably was introduced here. I cannot se the fault on filesystems   

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

How reproducible:
upgrade to net-snmp-5.5-54.el6.x86_64 and net-snmp-libs-5.5-54.el6.x86_64



Actual results:
10TB filesystem shows as 2TB filesystem

Expected results:
show as 10TB filesystem

Additional info:
I have not seen the error on servers with 6TB filesystems

Comment 1 Rikard 2015-08-26 11:54:55 UTC
It should have been the latest available version net-snmp-5.5-54.el6_7.1.x86_64 and net-snmp-libs-5.5-54.el6_7.1.x86_64 under "Description of problem" 

//Rikard

Comment 3 Jan Safranek 2015-08-27 16:04:50 UTC
This may be related to bug #1104293 (sorry, confidential) that we fixed in RHEL 6.7. Can you please post snmpwalk output with the bad numbers (=new net-snmp) and good numbers (=old net-snmp packages), together with `df` output?

Comment 4 Rikard 2015-08-31 09:07:16 UTC
Created attachment 1068549 [details]
df output

Comment 5 Rikard 2015-08-31 09:08:09 UTC
Created attachment 1068550 [details]
snmpwalk from new net-snmp

Comment 6 Rikard 2015-08-31 09:08:36 UTC
Created attachment 1068551 [details]
snmpwalk from old net-snmp

Comment 7 Jan Safranek 2015-08-31 14:09:50 UTC
The old net-snmp shows:
HOST-RESOURCES-MIB::hrStorageSize.37 = INTEGER: 2683487208

While the value is correct (2683487208 * hrStorageAllocationUnits gives size of the device), it's bad from SNMP protocol point of view. hrStorageSize must be  Integer32 (0..2147483647) and 2683487208 is higher than 2147483647. 

This caused several 3rd party clients to behave unexpectedly and therefore we fixed this bug in the latest Net-SNMP release - we report values lower than 2^31. To get real size of large drives, we introduced a new option 'realStorageUnits' couple of releases ago.

Add 'realStorageUnits 0' to your /etc/snmp/snmpd.conf. snmpd will then report artificial value of hrStorageAllocationUnits (probably 8k instead of 4k), so hrStorageAllocationUnits * hrStorageSize gives real size of the storage.

SNMP is really old protocol and they did not think about terabytes at that time...

Comment 8 Rikard 2015-09-03 07:25:57 UTC
(In reply to Jan Safranek from comment #7)
> The old net-snmp shows:
> HOST-RESOURCES-MIB::hrStorageSize.37 = INTEGER: 2683487208
> 
> While the value is correct (2683487208 * hrStorageAllocationUnits gives size
> of the device), it's bad from SNMP protocol point of view. hrStorageSize
> must be  Integer32 (0..2147483647) and 2683487208 is higher than 2147483647. 
> 
> This caused several 3rd party clients to behave unexpectedly and therefore
> we fixed this bug in the latest Net-SNMP release - we report values lower
> than 2^31. To get real size of large drives, we introduced a new option
> 'realStorageUnits' couple of releases ago.
> 
> Add 'realStorageUnits 0' to your /etc/snmp/snmpd.conf. snmpd will then
> report artificial value of hrStorageAllocationUnits (probably 8k instead of
> 4k), so hrStorageAllocationUnits * hrStorageSize gives real size of the
> storage.
> 
> SNMP is really old protocol and they did not think about terabytes at that
> time...

Thank you Jan now works to monitor the 10TB filesystems again. Using the new net-snmp-libs-5.5-54.el6_7.1.x86_64 and net-snmp-5.5-54.el6_7.1.x86_64 if the setting "realStorageUnits 0" is in /etc/snmp/snmpd.conf

Comment 9 Jan Safranek 2015-09-03 08:32:51 UTC
Thanks for the feedback. I am closing the bug now.

Comment 10 Jan Safranek 2015-09-21 13:02:18 UTC
*** Bug 1262944 has been marked as a duplicate of this bug. ***


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