Description of problem: When trying to monitor filesystems greater than 16 TB using net-snmp in RHEL5 using snmpwalk walking OID .1.3.6.1.2.1.25.2.3.1 from HOST-RESOURCES-TYPES, hrStorageAllocationUnits * hrStorageSize does not report the correct size for > 16 TB filesystems. Version-Release number of selected component (if applicable): net-snmp-libs-5.3.2.2-9.el5_5.1 net-snmp-utils-5.3.2.2-9.el5_5.1 How reproducible: Every time Steps to Reproduce: 1. Create a >16TB filesystem and mount it (verify correct size using df). 2. Run the equivalent of 'snmpwalk -Os -c test -v 1 127.0.0.1 .1.3.6.1.2.1.25.2.3.1' and look at hrStorageAllocationUnits and hrStorageSize. 3. The product of hrStorageAllocationUnits and hrStorageSize does not reflect the accurate size of the filesystem Actual results: # df -B 4096 Filesystem 4K-blocks Used Available Use% Mounted on /dev/sdc1 26843512732 1832 26843510900 1% /mnt # snmpwalk -Os -c test -v 1 127.0.0.1 .1.3.6.1.2.1.25.2.3.1 hrStorageDescr.9 = STRING: /mnt hrStorageAllocationUnits.9 = INTEGER: 4096 Bytes hrStorageSize.9 = INTEGER: 1073708956 Expected results: The product of hrStorageAllocationUnits and hrStorageSize should be accurate for > 16 TB filesystems. Additional info:
(In reply to comment #0) > hrStorageAllocationUnits.9 = INTEGER: 4096 Bytes > hrStorageSize.9 = INTEGER: 1073708956 The hrStorageSize is certainly wrong, but there is not much I can do about it. It *must* be 32bit value, as defined in RFC 2790. In new Net-SNMP release it does not wrap at 2^31 but sticks to it if the real value is higher, i.e. reports 2147483647 for all devices bigger than 2 billion of allocation unit (instead of reporting 'size modulo 2^21'). We talked upstream about possibility of lying about hrStorageAllocationUnits - not to use the real allocation unit size, but compute a bigger one so hrStorageSize fits into 32 bits (and hrStorageAllocationUnits*hrStorageSize provide real size of the device), but it was generally frowned upon. Maybe the time for such measures has come...
I have finally pushed it upstream, see http://net-snmp.svn.sourceforge.net/viewvc/net-snmp?view=revision&revision=19941 I'll port it back to RHEL5/6, but the new behavior will be off by default and it must be explicitly enabled in snmpd.conf.
Andrew, thank you for the reproducer. I have tested this bug with net-snmp-5.3.2.2-12.el5 (see reproducer https://tcms.engineering.redhat.com/case/92807/) but snmpd does not see the XFS filesystem while the old version does. [root@rhel5 ~]# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 5999168 1928576 3760936 34% / /dev/vda1 101086 12547 83320 14% /boot tmpfs 513456 0 513456 0% /dev/shm /dev/vdb 107374050928 7328 107374043600 1% /mnt/hugefs [root@rhel5 ~]# rpm -q net-snmp net-snmp-5.3.2.2-12.el5 [root@rhel5 ~]# snmpwalk -v2c -c public -v 1 127.0.0.1 .1.3.6.1.2.1.25.2.3.1 | grep hrStorageDescr HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Physical memory HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Virtual memory HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: Memory buffers HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: Cached memory HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: Swap space HOST-RESOURCES-MIB::hrStorageDescr.31 = STRING: / HOST-RESOURCES-MIB::hrStorageDescr.35 = STRING: /boot [root@rhel5 ~]# rpm -q net-snmp net-snmp-5.3.2.2-9.el5 [root@rhel5 ~]# snmpwalk -v2c -c public -v 1 127.0.0.1 .1.3.6.1.2.1.25.2.3.1 | grep hrStorageDescr HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Memory Buffers HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real Memory HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Swap Space HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: / HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: /boot HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: /mnt/hugefs # snmpwalk -v2c -c public -v 1 127.0.0.1 hrFSTable | grep '\.3' HOST-RESOURCES-MIB::hrFSIndex.3 = INTEGER: 3 HOST-RESOURCES-MIB::hrFSMountPoint.3 = STRING: "/mnt/hugefs" HOST-RESOURCES-MIB::hrFSRemoteMountPoint.3 = "" HOST-RESOURCES-MIB::hrFSType.3 = OID: HOST-RESOURCES-TYPES::hrFSOther HOST-RESOURCES-MIB::hrFSAccess.3 = INTEGER: readWrite(1) HOST-RESOURCES-MIB::hrFSBootable.3 = INTEGER: false(2) HOST-RESOURCES-MIB::hrFSStorageIndex.3 = INTEGER: 6 HOST-RESOURCES-MIB::hrFSLastFullBackupDate.3 = STRING: 0-1-1,0:0:0.0 HOST-RESOURCES-MIB::hrFSLastPartialBackupDate.3 = STRING: 0-1-1,0:0:0.0
Moving to 'assigned', XFS needs to be fixed
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-1076.html