Created attachment 325382 [details] Patch for the spec to add -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 Description of problem: The build of net-snmp provided on Red Hat Enterprise Linux 4 does not use the stat*64 variant. That causes an error with disks larger than 32Tb. Version-Release number of selected component (if applicable): net-snmp-libs-5.1.2-13.2 How reproducible: 100% reproducible Steps to Reproduce: 1. strace -p $(cat /var/run/snmpd.pid) 2>&1 | grep stat 2. snmpwalk -v 2c localhost -c public UCD-SNMP-MIB::dskPercent Actual results: statfs("/", {f_type="EXT2_SUPER_MAGIC", ...}) = 0 Expected results: statfs64("/", 84, {f_type="EXT2_SUPER_MAGIC", ...}) = 0 Additional info: With disks larger than 32Tb, the statfs() call fails in var_extensible_disk() of agent/mibgroup/ucd-snmp/disk.c The problem does not happen on Red Hat Enterprise Linux 5 because net-snmp is built with “-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64” while this is not the case on Red Hat Enterprise Linux 4. One can simulate a disk > 32Tb using device mapper with dm-zero and dm-snapshot but I don't think we ship any filesystem that can handle more than 16Tb on EL4, so the best is to use a kernel that includes jfs to install on top of the 32Tb disk. Otherwise, use strace as shown above.
I'd fix it in next update. Please note the requested change fixes only dskPercent OID (that's what the IT is about), the other items in dskTable (like dskAvail, dskTotal, ...) will report only 31 bits (Integer32 incl. one bit for sign) and are useless for disks >~2TB.
Release note added. If any revisions are required, please set the "requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: * UCD-SNMP-MIB::dskPercent was based on statfs, which would fail when used on devices larger than 32 terabytes. Net-snmp is now built with support for 64-bit file offsets, and can therefore use statfs64 to calculate disk usage correctly for large devices.
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-2009-0984.html