Project

General

Profile

Bug #6548

>2tb ZFS filesystems not reporting properly in net-snmp (Bump to 5.7.3)

Added by chune chune almost 4 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-01-10
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

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

snmpOI-paste.txt (7.96 KB) snmpOI-paste.txt net-snmp 5.4.4 vs 5.7.3 hrStorageAllocationUnits chune chune, 2016-01-10 06:29 PM

History

#1

Updated by chune chune almost 4 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

#2

Updated by Aurélien Larcher over 3 years ago

This update could be contributed to oi-userland instead of using 3rd party pkgsrc.

#3

Updated by Ken Mays almost 2 years ago

We can close this ticket.
Package: ,5.11-2017.0.0.0:20171017T060959Z

Also available in: Atom PDF