Bug #6548
open>2tb ZFS filesystems not reporting properly in net-snmp (Bump to 5.7.3)
0%
Description
This issue affects openindiana, omniOS and potentially other distros, however my steps to fix listed here are specific to OI Hipster (OI-hipster-text-20151003.iso).
ZFS filesystems who's size are greater than 2TB are reported incorrectly in HOST-RESOURCES-MIB::hrStorageTable due to the hrStorageAllocationUnits being set to 512 Bytes. Later versions of net-snmp address this bug so in short the fix is to upgrade net-snmp up to 5.7.3. However when net-snmp 5.7.3 is built from source the issue remains if you are relying on the $PATH variable for your snmpd path. The fix (in this particular case) is to symlink snmpd and snmptrapd from your build directory (in my case it was /usr/local/sbin) to your /usr/sbin directory. Only then does the hrStorageAllocationUnits get set correctly for larger sized ZFS filesystems. See attached paste of snmptable output running net-snmp 5.4.4 vs 5.7.3. Notice the hrStorageAllocationUnits value for filesystems: "test4TB" and "pool01-data"
steps to reproduce:
On a fresh install of OI-hipster-text-20151003.iso:
pkg install lint header
PATH=/opt/local/gcc47/bin:/opt/local/sbin:/opt/local/bin:$PATH && export PATH
:; curl http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/bootstrap-2014Q2-x86_64.tar.gz | gtar -zxpf - -C /
pkgin -y update
pkgin -y install gcc47
mkdir /root/net-snmp && cd /root/net-snmp
wget http://sourceforge.net/projects/net-snmp/files/net-snmp/5.7.3/net-snmp-5.7.3.tar.gz
tar -xsf net-snmp-5.7.3.tar.gz
cd /root/net-snmp/net-snmp-5.7.3
echo "./configure --with-mib-modules="ucd-snmp/diskio smux mibII/mta_sendmail" --with-cc=gcc" > bcc.sh
chmod +x bcc.sh
make
make test
svcadm disable net-snmp
make install
cd /usr/sbin && mv snmpd snmpd.orig && mv snmptrapd snmptrapd.orig && ln /usr/local/sbin/snmpd /usr/sbin/snmpd && ln /usr/local/sbin/snmptrapd /usr/sbin/snmptrapd
svcadm enable net-snmp
Files
Updated by chune chune about 7 years ago
EDIT: quote fail
steps to reproduce:
On a fresh install of OI-hipster-text-20151003.iso:
pkg install lint header
PATH=/opt/local/gcc47/bin:/opt/local/sbin:/opt/local/bin:$PATH && export PATH
:; curl http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/bootstrap-2014Q2-x86_64.tar.gz | gtar -zxpf - -C /
pkgin -y update
pkgin -y install gcc47
mkdir /root/net-snmp && cd /root/net-snmp
wget http://sourceforge.net/projects/net-snmp/files/net-snmp/5.7.3/net-snmp-5.7.3.tar.gz
tar -xsf net-snmp-5.7.3.tar.gz
cd /root/net-snmp/net-snmp-5.7.3
./configure --with-mib-modules="ucd-snmp/diskio smux mibII/mta_sendmail" --with-cc=gcc
make
make test
svcadm disable net-snmp
make install
cd /usr/sbin && mv snmpd snmpd.orig && mv snmptrapd snmptrapd.orig && ln /usr/local/sbin/snmpd /usr/sbin/snmpd && ln /usr/local/sbin/snmptrapd /usr/sbin/snmptrapd
svcadm enable net-snmp
Updated by Aurélien Larcher over 6 years ago
This update could be contributed to oi-userland instead of using 3rd party pkgsrc.
Updated by Ken Mays over 5 years ago
We can close this ticket.
Package: system/management/snmp/net-snmp@5.7.3,5.11-2017.0.0.0:20171017T060959Z