Project

General

Profile

Bug #25734

Expose zvol state through SNMP

Added by Daniel W over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
No priority
Assignee:
Vladimir Vinogradenko
Category:
Middleware
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Whitebox
Supermicro MBD-A1SAM-2550F-O
Supermicro CSE-825
Dell Perc h310
6x Seagate SSHD 2TB

ChangeLog Required:
No

Description

As the title says. The given data point sits at 44 units used, and never increments. The HOST-RESOURCES-MIB::hrStorageSize actually decrements as more data is written.

I have seen documentation that there is a FreeNAS MIB, which I have loaded, but SNMP does not output any data with those IDs. FreeNAS does output correct numbers in it's UI

config:
1 volume
2 zvols

running "snmpwalk -v 2c -c <community> -ALL <hostname>

hrStorage section output includes
HOST-RESOURCES-MIB::hrStorageDescr.31 = STRING: /
HOST-RESOURCES-MIB::hrStorageDescr.32 = STRING: /dev
HOST-RESOURCES-MIB::hrStorageDescr.33 = STRING: /etc
HOST-RESOURCES-MIB::hrStorageDescr.34 = STRING: /mnt
HOST-RESOURCES-MIB::hrStorageDescr.35 = STRING: /var
HOST-RESOURCES-MIB::hrStorageDescr.36 = STRING: /boot/grub
HOST-RESOURCES-MIB::hrStorageDescr.37 = STRING: /dev/fd
HOST-RESOURCES-MIB::hrStorageDescr.38 = STRING: /mnt/<VOLUME>
HOST-RESOURCES-MIB::hrStorageDescr.39 = STRING: /var/db/system
HOST-RESOURCES-MIB::hrStorageDescr.40 = STRING: /var/db/system/cores
HOST-RESOURCES-MIB::hrStorageDescr.41 = STRING: /var/db/system/samba4

HOST-RESOURCES-MIB::hrStorageAllocationUnits.38 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageSize.38 = INTEGER: 1614175649
HOST-RESOURCES-MIB::hrStorageUsed.38 = INTEGER: 44

Total actual size is 7.1 TiB (as opposed to the 6.01 displayed now)(6 2 TB drives in RAIDZ2)
Current used size is actually just over 1 TiB (as opposed to the 160k indicated)

Note: the volume appears above as .38, but neither zvol appears, which would be nice.


Related issues

Related to FreeNAS - Bug #24402: Improvements to SNMP MIBResolved2017-06-07

History

#1 Updated by Dru Lavigne over 1 year ago

  • Assignee changed from Release Council to William Grzybowski

William: can you load balance this one? It might be suited to Sasha.

#2 Updated by William Grzybowski over 1 year ago

  • Assignee changed from William Grzybowski to Vladimir Vinogradenko
  • Target version set to 11.1

Vladimir, can you take a look, please?

I knopw SNMP is not your thing but you can take your time to research on it, there is no hurry.

Thanks!

#3 Updated by Vladimir Vinogradenko over 1 year ago

  • Status changed from Unscreened to Screened

#4 Updated by Vladimir Vinogradenko over 1 year ago

  • Status changed from Screened to 15
  • Assignee changed from Vladimir Vinogradenko to William Grzybowski

#5 Updated by Vladimir Vinogradenko over 1 year ago

  • Assignee changed from William Grzybowski to Daniel W

#6 Updated by Vladimir Vinogradenko over 1 year ago

  • Assignee changed from Daniel W to Vladimir Vinogradenko

#7 Updated by Vladimir Vinogradenko over 1 year ago

  • Status changed from 15 to Investigation

#8 Updated by Vladimir Vinogradenko over 1 year ago

  • Status changed from Investigation to 15
  • Assignee changed from Vladimir Vinogradenko to Daniel W

Daniel, do I understand correctly that you're using sparse zvols and you're storing your data there? If so, results are correct: as sparse zvols grow, your /mnt/<VOLUME> available storage size decreases (total 7 TiB - 1 TiB on zvols = 6 TiB reported) and used storage size stays close to zero as there is no data stored in /mnt/<VOLUME> itself.

So the only problem left is exposing zvols state through snmp. It'll be done as part of https://bugs.freenas.org/issues/24402, the question if zvols can be added to HOST-RESOURCES-MIB::hrStorage* tables is not solved yet though.

#9 Updated by Daniel W over 1 year ago

That is correct.

It being exposed anywhere would solve my use case. as a subvalue of hrStorage* would make the most sense to me, but exposing it as FREENAS-MIB:: would be just fine, if that worked. (Which it doesn't on my box)

I would be happy to try the workaround noted in 24402 if you can provide me a few more details on what it is.

#10 Updated by Dru Lavigne over 1 year ago

  • Status changed from 15 to Unscreened
  • Assignee changed from Daniel W to Vladimir Vinogradenko

#11 Updated by Vladimir Vinogradenko about 1 year ago

  • Status changed from Unscreened to Needs Developer Review
  • Assignee changed from Vladimir Vinogradenko to William Grzybowski

New MIB file structure contains entries for zvols and new SNMP agent uses them

#12 Updated by Dru Lavigne about 1 year ago

  • Related to Bug #24402: Improvements to SNMP MIB added

#13 Updated by William Grzybowski about 1 year ago

  • Status changed from Needs Developer Review to Reviewed by Developer

#14 Updated by Dru Lavigne about 1 year ago

  • Assignee changed from William Grzybowski to Vladimir Vinogradenko

#15 Updated by Vladimir Vinogradenko about 1 year ago

  • Status changed from Reviewed by Developer to Ready For Release

#16 Updated by Dru Lavigne about 1 year ago

  • Subject changed from HOST-RESOURCES-MIB::hrStorageUsed doesn't increment. to Expose zvol state through SNMP
  • Target version changed from 11.1 to 11.1-BETA1

#17 Updated by Dru Lavigne about 1 year ago

  • Needs QA changed from No to Yes

#18 Updated by Dru Lavigne about 1 year ago

  • Status changed from Ready For Release to Resolved

#19 Updated by Nick Wolff about 1 year ago

  • Status changed from Resolved to Ready For Release
  • Target version changed from 11.1-BETA1 to 11.1

Waiting for snmp fix in next 11.1 beta to test

#20 Updated by Dru Lavigne about 1 year ago

  • Target version changed from 11.1 to 11.1-RC2

#21 Updated by Dru Lavigne about 1 year ago

  • Status changed from Ready For Release to 47

#22 Updated by Dru Lavigne about 1 year ago

  • Target version changed from 11.1-RC2 to 11.1-RC3

#23 Updated by Vladimir Vinogradenko about 1 year ago

This is assigned to me. Am I supposed to do something?

#24 Updated by William Grzybowski about 1 year ago

Vladimir Vinogradenko wrote:

This is assigned to me. Am I supposed to do something?

No, QA team scans for all "RC: Ready for Testing" status.

#25 Updated by Nick Wolff about 1 year ago

  • Needs QA changed from Yes to No
  • QA Status Test Passes FreeNAS added

Test passes

root@fncertified:~ # snmpwalk -m +FREENAS-MIB -v 2c -c public 127.0.0.1 .1.3.6.1.4.1.50536 | grep zvol
FREENAS-MIB::zvolDescr.0 = STRING: tank/nwolff/freenas-11.0u3-boot
FREENAS-MIB::zvolDescr.1 = STRING: tank/nwolff/21336-boot-zpool-device-size/16g-boot
FREENAS-MIB::zvolDescr.2 = STRING: tank/nwolff/21336-boot-zpool-device-size/20g-boot
FREENAS-MIB::zvolDescr.3 = STRING: tank/nwolff/21336-boot-zpool-device-size/10g-boot
FREENAS-MIB::zvolDescr.4 = STRING: tank/nwolff/freenas-vlan-boot
FREENAS-MIB::zvolDescr.5 = STRING: tank/nwolff/win-test
FREENAS-MIB::zvolDescr.6 = STRING: tank/nwolff/test-encryption
FREENAS-MIB::zvolDescr.7 = STRING: tank/nwolff/win-sysprepped
FREENAS-MIB::zvolDescr.8 = STRING: tank/nwolff/freenas-iso-upgrade-test
FREENAS-MIB::zvolAllocationUnits.0 = INTEGER: 16384 Bytes
FREENAS-MIB::zvolAllocationUnits.1 = INTEGER: 16384 Bytes
FREENAS-MIB::zvolAllocationUnits.2 = INTEGER: 16384 Bytes
FREENAS-MIB::zvolAllocationUnits.3 = INTEGER: 16384 Bytes
FREENAS-MIB::zvolAllocationUnits.4 = INTEGER: 16384 Bytes
FREENAS-MIB::zvolAllocationUnits.5 = INTEGER: 16384 Bytes
FREENAS-MIB::zvolAllocationUnits.6 = INTEGER: 16384 Bytes
FREENAS-MIB::zvolAllocationUnits.7 = INTEGER: 16384 Bytes
FREENAS-MIB::zvolAllocationUnits.8 = INTEGER: 16384 Bytes
FREENAS-MIB::zvolSize.0 = INTEGER: 2621440
FREENAS-MIB::zvolSize.1 = INTEGER: 1048576
FREENAS-MIB::zvolSize.2 = INTEGER: 1310720
FREENAS-MIB::zvolSize.3 = INTEGER: 655360
FREENAS-MIB::zvolSize.4 = INTEGER: 2621440
FREENAS-MIB::zvolSize.5 = INTEGER: 6553600
FREENAS-MIB::zvolSize.6 = INTEGER: 655360
FREENAS-MIB::zvolSize.7 = INTEGER: 6553600
FREENAS-MIB::zvolSize.8 = INTEGER: 2621440
FREENAS-MIB::zvolUsed.0 = INTEGER: 47916
FREENAS-MIB::zvolUsed.1 = INTEGER: 1052800
FREENAS-MIB::zvolUsed.2 = INTEGER: 1315968
FREENAS-MIB::zvolUsed.3 = INTEGER: 658048
FREENAS-MIB::zvolUsed.4 = INTEGER: 2703568
FREENAS-MIB::zvolUsed.5 = INTEGER: 4393227
FREENAS-MIB::zvolUsed.6 = INTEGER: 1237
FREENAS-MIB::zvolUsed.7 = INTEGER: 2113053
FREENAS-MIB::zvolUsed.8 = INTEGER: 107477
FREENAS-MIB::zvolAvailable.0 = INTEGER: 2028826860
FREENAS-MIB::zvolAvailable.1 = INTEGER: 2029879643
FREENAS-MIB::zvolAvailable.2 = INTEGER: 2030088514
FREENAS-MIB::zvolAvailable.3 = INTEGER: 2029430596
FREENAS-MIB::zvolAvailable.4 = INTEGER: 2031332270
FREENAS-MIB::zvolAvailable.5 = INTEGER: 2028826860
FREENAS-MIB::zvolAvailable.6 = INTEGER: 2028826860
FREENAS-MIB::zvolAvailable.7 = INTEGER: 2028826860
FREENAS-MIB::zvolAvailable.8 = INTEGER: 2028826860

#26 Updated by Dru Lavigne about 1 year ago

  • Status changed from 47 to Resolved

Also available in: Atom PDF