[POC] parse JSON output of ZFS commands#64
Draft
jmcgover wants to merge 22 commits into
Draft
Conversation
… field...of type int it too big
Author
zpool status --json --json-flat-vdevs --json-int | python -m json.toolFull output:{
"output_version": {
"command": "zpool status",
"vers_major": 0,
"vers_minor": 1
},
"pools": {
"greenwood": {
"name": "greenwood",
"state": "ONLINE",
"pool_guid": 240630935905734902,
"txg": 60298799,
"spa_version": 5000,
"zpl_version": 5,
"status": "One or more devices has experienced an unrecoverable error. An\n\tattempt was made to correct the error. Applications are unaffected.\n",
"action": "Determine if the device needs to be replaced, and clear the errors\n\tusing 'zpool clear' or replace the device with 'zpool replace'.\n",
"msgid": "ZFS-8000-9P",
"moreinfo": "https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-9P",
"scan_stats": {
"function": "SCRUB",
"state": "FINISHED",
"start_time": 1767782105,
"end_time": 1767829343,
"to_examine": 42025429180416,
"examined": 42018061897728,
"skipped": 14696448,
"processed": 983040,
"errors": 0,
"bytes_per_scan": 0,
"pass_start": 1767818537,
"scrub_pause": 0,
"scrub_spent_paused": 0,
"issued_bytes_per_scan": 8485179076608,
"issued": 42018036584448
},
"vdevs": {
"redwood": {
"name": "redwood",
"vdev_type": "disk",
"guid": 1693533752164838511,
"path": "/dev/disk/by-vdev/redwood-part1",
"phys_path": "pci-0000:01:00.0-sas-phy7-lun-0",
"devid": "ata-WDC_WD40EFZX-68AWUN0_WD-WX12DA0R1JNC-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"maple": {
"name": "maple",
"vdev_type": "disk",
"guid": 13069515523376549602,
"path": "/dev/disk/by-vdev/maple-part1",
"phys_path": "pci-0000:01:00.0-sas-phy6-lun-0",
"devid": "ata-WDC_WD40EFPX-68C6CN0_WD-WX62D15PLTV8-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"beech": {
"name": "beech",
"vdev_type": "disk",
"guid": 10338606211899637945,
"path": "/dev/disk/by-vdev/beech-part1",
"phys_path": "pci-0000:01:00.0-sas-phy1-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z3076EQT-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"willow": {
"name": "willow",
"vdev_type": "disk",
"guid": 17747722603856524209,
"path": "/dev/disk/by-vdev/willow-part1",
"phys_path": "pci-0000:01:00.0-sas-phy0-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z307H0QR-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"birch": {
"name": "birch",
"vdev_type": "disk",
"guid": 10432169852342298766,
"path": "/dev/disk/by-vdev/birch-part1",
"phys_path": "pci-0000:01:00.0-sas-phy3-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z307FDNV-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"oak": {
"name": "oak",
"vdev_type": "disk",
"guid": 5598510555668390460,
"path": "/dev/disk/by-vdev/oak-part1",
"phys_path": "pci-0000:01:00.0-sas-phy2-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z307E12J-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"walnut": {
"name": "walnut",
"vdev_type": "disk",
"guid": 5052862979346025662,
"path": "/dev/disk/by-vdev/walnut-part1",
"phys_path": "pci-0000:02:00.0-sas-phy1-lun-0",
"devid": "ata-ST4000DM000-2AE166_WDH02AEY-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"pine": {
"name": "pine",
"vdev_type": "disk",
"guid": 11194587813252383021,
"path": "/dev/disk/by-vdev/pine-part1",
"phys_path": "pci-0000:01:00.0-sas-phy5-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z30620SR-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"sycamore": {
"name": "sycamore",
"vdev_type": "disk",
"guid": 17046160168366816094,
"path": "/dev/disk/by-vdev/sycamore-part1",
"phys_path": "pci-0000:01:00.0-sas-phy4-lun-0",
"devid": "ata-HGST_HUS724040ALE640_PK1331PAKP6G9S-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"palm": {
"name": "palm",
"vdev_type": "disk",
"guid": 3462721303918148450,
"path": "/dev/disk/by-vdev/palm-part1",
"phys_path": "pci-0000:02:00.0-sas-phy2-lun-0",
"devid": "ata-ST4000DM000-2AE166_WDH02KMA-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"gum": {
"name": "gum",
"vdev_type": "disk",
"guid": 17480034178652514697,
"path": "/dev/disk/by-vdev/gum-part1",
"phys_path": "pci-0000:02:00.0-sas-phy3-lun-0",
"devid": "ata-HGST_HUS724040ALE640_PK1334PAKSAD5S-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"poplar": {
"name": "poplar",
"vdev_type": "disk",
"guid": 3990993109261751504,
"path": "/dev/disk/by-vdev/poplar-part1",
"phys_path": "pci-0000:02:00.0-sas-phy3-lun-0",
"devid": "ata-ST4000DM000-2AE166_WDH02KXB-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"dogwood": {
"name": "dogwood",
"vdev_type": "disk",
"guid": 13434953024622563852,
"path": "/dev/disk/by-vdev/dogwood-part1",
"phys_path": "pci-0000:00:1f.2-ata-5",
"devid": "ata-WDC_WD40EFZX-68AWUN0_WD-WX12DA0EAAVZ-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"ash": {
"name": "ash",
"vdev_type": "disk",
"guid": 13908182941863625816,
"path": "/dev/disk/by-vdev/ash-part1",
"phys_path": "pci-0000:02:00.0-sas-phy4-lun-0",
"devid": "ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E1SU6T3L-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"self_healed": 3928064,
"phys_space": 4000776716288,
"read_errors": 56,
"write_errors": 0,
"checksum_errors": 0,
"scan_processed": 983040,
"slow_ios": 44
},
"alder": {
"name": "alder",
"vdev_type": "disk",
"guid": 3898698817971933339,
"path": "/dev/disk/by-vdev/alder-part1",
"phys_path": "pci-0000:02:00.0-sas-phy6-lun-0",
"devid": "ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E6XYD58S-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"linden": {
"name": "linden",
"vdev_type": "disk",
"guid": 16738412563713742014,
"path": "/dev/disk/by-vdev/linden-part1",
"phys_path": "pci-0000:02:00.0-sas-phy7-lun-0",
"devid": "ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E2UCCERP-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"raidz2-0": {
"name": "raidz2-0",
"vdev_type": "raidz",
"guid": 8276276583640132761,
"class": "normal",
"state": "ONLINE",
"parent": "greenwood",
"alloc_space": 42037226803200,
"total_space": 63771674411008,
"def_space": 52312701665280,
"rep_dev_size": 63771674411008,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"vdevs": {
"redwood": {
"name": "redwood",
"vdev_type": "disk",
"guid": 1693533752164838511,
"path": "/dev/disk/by-vdev/redwood-part1",
"phys_path": "pci-0000:01:00.0-sas-phy7-lun-0",
"devid": "ata-WDC_WD40EFZX-68AWUN0_WD-WX12DA0R1JNC-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"maple": {
"name": "maple",
"vdev_type": "disk",
"guid": 13069515523376549602,
"path": "/dev/disk/by-vdev/maple-part1",
"phys_path": "pci-0000:01:00.0-sas-phy6-lun-0",
"devid": "ata-WDC_WD40EFPX-68C6CN0_WD-WX62D15PLTV8-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"beech": {
"name": "beech",
"vdev_type": "disk",
"guid": 10338606211899637945,
"path": "/dev/disk/by-vdev/beech-part1",
"phys_path": "pci-0000:01:00.0-sas-phy1-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z3076EQT-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"willow": {
"name": "willow",
"vdev_type": "disk",
"guid": 17747722603856524209,
"path": "/dev/disk/by-vdev/willow-part1",
"phys_path": "pci-0000:01:00.0-sas-phy0-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z307H0QR-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"birch": {
"name": "birch",
"vdev_type": "disk",
"guid": 10432169852342298766,
"path": "/dev/disk/by-vdev/birch-part1",
"phys_path": "pci-0000:01:00.0-sas-phy3-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z307FDNV-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"oak": {
"name": "oak",
"vdev_type": "disk",
"guid": 5598510555668390460,
"path": "/dev/disk/by-vdev/oak-part1",
"phys_path": "pci-0000:01:00.0-sas-phy2-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z307E12J-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"walnut": {
"name": "walnut",
"vdev_type": "disk",
"guid": 5052862979346025662,
"path": "/dev/disk/by-vdev/walnut-part1",
"phys_path": "pci-0000:02:00.0-sas-phy1-lun-0",
"devid": "ata-ST4000DM000-2AE166_WDH02AEY-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"pine": {
"name": "pine",
"vdev_type": "disk",
"guid": 11194587813252383021,
"path": "/dev/disk/by-vdev/pine-part1",
"phys_path": "pci-0000:01:00.0-sas-phy5-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z30620SR-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"sycamore": {
"name": "sycamore",
"vdev_type": "disk",
"guid": 17046160168366816094,
"path": "/dev/disk/by-vdev/sycamore-part1",
"phys_path": "pci-0000:01:00.0-sas-phy4-lun-0",
"devid": "ata-HGST_HUS724040ALE640_PK1331PAKP6G9S-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"palm": {
"name": "palm",
"vdev_type": "disk",
"guid": 3462721303918148450,
"path": "/dev/disk/by-vdev/palm-part1",
"phys_path": "pci-0000:02:00.0-sas-phy2-lun-0",
"devid": "ata-ST4000DM000-2AE166_WDH02KMA-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"gum": {
"name": "gum",
"vdev_type": "disk",
"guid": 17480034178652514697,
"path": "/dev/disk/by-vdev/gum-part1",
"phys_path": "pci-0000:02:00.0-sas-phy3-lun-0",
"devid": "ata-HGST_HUS724040ALE640_PK1334PAKSAD5S-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"poplar": {
"name": "poplar",
"vdev_type": "disk",
"guid": 3990993109261751504,
"path": "/dev/disk/by-vdev/poplar-part1",
"phys_path": "pci-0000:02:00.0-sas-phy3-lun-0",
"devid": "ata-ST4000DM000-2AE166_WDH02KXB-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"dogwood": {
"name": "dogwood",
"vdev_type": "disk",
"guid": 13434953024622563852,
"path": "/dev/disk/by-vdev/dogwood-part1",
"phys_path": "pci-0000:00:1f.2-ata-5",
"devid": "ata-WDC_WD40EFZX-68AWUN0_WD-WX12DA0EAAVZ-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"ash": {
"name": "ash",
"vdev_type": "disk",
"guid": 13908182941863625816,
"path": "/dev/disk/by-vdev/ash-part1",
"phys_path": "pci-0000:02:00.0-sas-phy4-lun-0",
"devid": "ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E1SU6T3L-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"self_healed": 3928064,
"phys_space": 4000776716288,
"read_errors": 56,
"write_errors": 0,
"checksum_errors": 0,
"scan_processed": 983040,
"slow_ios": 44
},
"alder": {
"name": "alder",
"vdev_type": "disk",
"guid": 3898698817971933339,
"path": "/dev/disk/by-vdev/alder-part1",
"phys_path": "pci-0000:02:00.0-sas-phy6-lun-0",
"devid": "ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E6XYD58S-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"linden": {
"name": "linden",
"vdev_type": "disk",
"guid": 16738412563713742014,
"path": "/dev/disk/by-vdev/linden-part1",
"phys_path": "pci-0000:02:00.0-sas-phy7-lun-0",
"devid": "ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E2UCCERP-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
}
}
},
"greenwood": {
"name": "greenwood",
"vdev_type": "root",
"guid": 240630935905734902,
"class": "normal",
"state": "ONLINE",
"alloc_space": 42037226803200,
"total_space": 63771674411008,
"def_space": 52312701665280,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"vdevs": {
"redwood": {
"name": "redwood",
"vdev_type": "disk",
"guid": 1693533752164838511,
"path": "/dev/disk/by-vdev/redwood-part1",
"phys_path": "pci-0000:01:00.0-sas-phy7-lun-0",
"devid": "ata-WDC_WD40EFZX-68AWUN0_WD-WX12DA0R1JNC-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"maple": {
"name": "maple",
"vdev_type": "disk",
"guid": 13069515523376549602,
"path": "/dev/disk/by-vdev/maple-part1",
"phys_path": "pci-0000:01:00.0-sas-phy6-lun-0",
"devid": "ata-WDC_WD40EFPX-68C6CN0_WD-WX62D15PLTV8-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"beech": {
"name": "beech",
"vdev_type": "disk",
"guid": 10338606211899637945,
"path": "/dev/disk/by-vdev/beech-part1",
"phys_path": "pci-0000:01:00.0-sas-phy1-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z3076EQT-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"willow": {
"name": "willow",
"vdev_type": "disk",
"guid": 17747722603856524209,
"path": "/dev/disk/by-vdev/willow-part1",
"phys_path": "pci-0000:01:00.0-sas-phy0-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z307H0QR-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"birch": {
"name": "birch",
"vdev_type": "disk",
"guid": 10432169852342298766,
"path": "/dev/disk/by-vdev/birch-part1",
"phys_path": "pci-0000:01:00.0-sas-phy3-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z307FDNV-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"oak": {
"name": "oak",
"vdev_type": "disk",
"guid": 5598510555668390460,
"path": "/dev/disk/by-vdev/oak-part1",
"phys_path": "pci-0000:01:00.0-sas-phy2-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z307E12J-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"walnut": {
"name": "walnut",
"vdev_type": "disk",
"guid": 5052862979346025662,
"path": "/dev/disk/by-vdev/walnut-part1",
"phys_path": "pci-0000:02:00.0-sas-phy1-lun-0",
"devid": "ata-ST4000DM000-2AE166_WDH02AEY-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"pine": {
"name": "pine",
"vdev_type": "disk",
"guid": 11194587813252383021,
"path": "/dev/disk/by-vdev/pine-part1",
"phys_path": "pci-0000:01:00.0-sas-phy5-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z30620SR-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"sycamore": {
"name": "sycamore",
"vdev_type": "disk",
"guid": 17046160168366816094,
"path": "/dev/disk/by-vdev/sycamore-part1",
"phys_path": "pci-0000:01:00.0-sas-phy4-lun-0",
"devid": "ata-HGST_HUS724040ALE640_PK1331PAKP6G9S-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"palm": {
"name": "palm",
"vdev_type": "disk",
"guid": 3462721303918148450,
"path": "/dev/disk/by-vdev/palm-part1",
"phys_path": "pci-0000:02:00.0-sas-phy2-lun-0",
"devid": "ata-ST4000DM000-2AE166_WDH02KMA-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"gum": {
"name": "gum",
"vdev_type": "disk",
"guid": 17480034178652514697,
"path": "/dev/disk/by-vdev/gum-part1",
"phys_path": "pci-0000:02:00.0-sas-phy3-lun-0",
"devid": "ata-HGST_HUS724040ALE640_PK1334PAKSAD5S-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"poplar": {
"name": "poplar",
"vdev_type": "disk",
"guid": 3990993109261751504,
"path": "/dev/disk/by-vdev/poplar-part1",
"phys_path": "pci-0000:02:00.0-sas-phy3-lun-0",
"devid": "ata-ST4000DM000-2AE166_WDH02KXB-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"dogwood": {
"name": "dogwood",
"vdev_type": "disk",
"guid": 13434953024622563852,
"path": "/dev/disk/by-vdev/dogwood-part1",
"phys_path": "pci-0000:00:1f.2-ata-5",
"devid": "ata-WDC_WD40EFZX-68AWUN0_WD-WX12DA0EAAVZ-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"ash": {
"name": "ash",
"vdev_type": "disk",
"guid": 13908182941863625816,
"path": "/dev/disk/by-vdev/ash-part1",
"phys_path": "pci-0000:02:00.0-sas-phy4-lun-0",
"devid": "ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E1SU6T3L-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"self_healed": 3928064,
"phys_space": 4000776716288,
"read_errors": 56,
"write_errors": 0,
"checksum_errors": 0,
"scan_processed": 983040,
"slow_ios": 44
},
"alder": {
"name": "alder",
"vdev_type": "disk",
"guid": 3898698817971933339,
"path": "/dev/disk/by-vdev/alder-part1",
"phys_path": "pci-0000:02:00.0-sas-phy6-lun-0",
"devid": "ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E6XYD58S-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"linden": {
"name": "linden",
"vdev_type": "disk",
"guid": 16738412563713742014,
"path": "/dev/disk/by-vdev/linden-part1",
"phys_path": "pci-0000:02:00.0-sas-phy7-lun-0",
"devid": "ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E2UCCERP-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"raidz2-0": {
"name": "raidz2-0",
"vdev_type": "raidz",
"guid": 8276276583640132761,
"class": "normal",
"state": "ONLINE",
"parent": "greenwood",
"alloc_space": 42037226803200,
"total_space": 63771674411008,
"def_space": 52312701665280,
"rep_dev_size": 63771674411008,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"vdevs": {
"redwood": {
"name": "redwood",
"vdev_type": "disk",
"guid": 1693533752164838511,
"path": "/dev/disk/by-vdev/redwood-part1",
"phys_path": "pci-0000:01:00.0-sas-phy7-lun-0",
"devid": "ata-WDC_WD40EFZX-68AWUN0_WD-WX12DA0R1JNC-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"maple": {
"name": "maple",
"vdev_type": "disk",
"guid": 13069515523376549602,
"path": "/dev/disk/by-vdev/maple-part1",
"phys_path": "pci-0000:01:00.0-sas-phy6-lun-0",
"devid": "ata-WDC_WD40EFPX-68C6CN0_WD-WX62D15PLTV8-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"beech": {
"name": "beech",
"vdev_type": "disk",
"guid": 10338606211899637945,
"path": "/dev/disk/by-vdev/beech-part1",
"phys_path": "pci-0000:01:00.0-sas-phy1-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z3076EQT-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"willow": {
"name": "willow",
"vdev_type": "disk",
"guid": 17747722603856524209,
"path": "/dev/disk/by-vdev/willow-part1",
"phys_path": "pci-0000:01:00.0-sas-phy0-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z307H0QR-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"birch": {
"name": "birch",
"vdev_type": "disk",
"guid": 10432169852342298766,
"path": "/dev/disk/by-vdev/birch-part1",
"phys_path": "pci-0000:01:00.0-sas-phy3-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z307FDNV-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"oak": {
"name": "oak",
"vdev_type": "disk",
"guid": 5598510555668390460,
"path": "/dev/disk/by-vdev/oak-part1",
"phys_path": "pci-0000:01:00.0-sas-phy2-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z307E12J-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"walnut": {
"name": "walnut",
"vdev_type": "disk",
"guid": 5052862979346025662,
"path": "/dev/disk/by-vdev/walnut-part1",
"phys_path": "pci-0000:02:00.0-sas-phy1-lun-0",
"devid": "ata-ST4000DM000-2AE166_WDH02AEY-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"pine": {
"name": "pine",
"vdev_type": "disk",
"guid": 11194587813252383021,
"path": "/dev/disk/by-vdev/pine-part1",
"phys_path": "pci-0000:01:00.0-sas-phy5-lun-0",
"devid": "ata-ST4000DM000-1F2168_Z30620SR-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"sycamore": {
"name": "sycamore",
"vdev_type": "disk",
"guid": 17046160168366816094,
"path": "/dev/disk/by-vdev/sycamore-part1",
"phys_path": "pci-0000:01:00.0-sas-phy4-lun-0",
"devid": "ata-HGST_HUS724040ALE640_PK1331PAKP6G9S-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"palm": {
"name": "palm",
"vdev_type": "disk",
"guid": 3462721303918148450,
"path": "/dev/disk/by-vdev/palm-part1",
"phys_path": "pci-0000:02:00.0-sas-phy2-lun-0",
"devid": "ata-ST4000DM000-2AE166_WDH02KMA-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"gum": {
"name": "gum",
"vdev_type": "disk",
"guid": 17480034178652514697,
"path": "/dev/disk/by-vdev/gum-part1",
"phys_path": "pci-0000:02:00.0-sas-phy3-lun-0",
"devid": "ata-HGST_HUS724040ALE640_PK1334PAKSAD5S-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"poplar": {
"name": "poplar",
"vdev_type": "disk",
"guid": 3990993109261751504,
"path": "/dev/disk/by-vdev/poplar-part1",
"phys_path": "pci-0000:02:00.0-sas-phy3-lun-0",
"devid": "ata-ST4000DM000-2AE166_WDH02KXB-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"dogwood": {
"name": "dogwood",
"vdev_type": "disk",
"guid": 13434953024622563852,
"path": "/dev/disk/by-vdev/dogwood-part1",
"phys_path": "pci-0000:00:1f.2-ata-5",
"devid": "ata-WDC_WD40EFZX-68AWUN0_WD-WX12DA0EAAVZ-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"ash": {
"name": "ash",
"vdev_type": "disk",
"guid": 13908182941863625816,
"path": "/dev/disk/by-vdev/ash-part1",
"phys_path": "pci-0000:02:00.0-sas-phy4-lun-0",
"devid": "ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E1SU6T3L-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"self_healed": 3928064,
"phys_space": 4000776716288,
"read_errors": 56,
"write_errors": 0,
"checksum_errors": 0,
"scan_processed": 983040,
"slow_ios": 44
},
"alder": {
"name": "alder",
"vdev_type": "disk",
"guid": 3898698817971933339,
"path": "/dev/disk/by-vdev/alder-part1",
"phys_path": "pci-0000:02:00.0-sas-phy6-lun-0",
"devid": "ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E6XYD58S-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
},
"linden": {
"name": "linden",
"vdev_type": "disk",
"guid": 16738412563713742014,
"path": "/dev/disk/by-vdev/linden-part1",
"phys_path": "pci-0000:02:00.0-sas-phy7-lun-0",
"devid": "ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E2UCCERP-part1",
"class": "normal",
"state": "ONLINE",
"parent": "raidz2-0",
"rep_dev_size": 3985734369280,
"phys_space": 4000776716288,
"read_errors": 0,
"write_errors": 0,
"checksum_errors": 0,
"slow_ios": 0
}
}
}
}
}
},
"error_count": 0
}
}
}
|
jmcgover
commented
Jan 12, 2026
Comment on lines
+63
to
+66
| for vdev_name, vdev_status := range pool_status.Vdevs { | ||
| logger.Debug("Vdev Name", "name", vdev_name) | ||
| logger.Debug("Vdev Status", "status", vdev_status) | ||
| } |
Author
There was a problem hiding this comment.
Somehow, I'm only logging or parsing+keeping the last entry in this map:
$ ./zfs_exporter --log.level=debug
time=2026-01-12T00:08:23.842-08:00 level=INFO source=zfs_exporter.go:40 msg="Starting zfs_exporter" version="(version=2.3.11, branch=master, revision=66f4ffada99cb1cad096e3ef6323fbdb2c6082b6)"
time=2026-01-12T00:08:23.842-08:00 level=INFO source=zfs_exporter.go:41 msg="Build context" context="(go=go1.25.5 X:nodwarf5, platform=linux/amd64, user=paul@trunks, date=20260112-07:59:54, tags=netgo)"
time=2026-01-12T00:08:23.847-08:00 level=DEBUG source=version_json.go:69 msg="ZFS Command Output" stdout="{\"output_version\":{\"command\":\"zfs version\",\"vers_major\":0,\"vers_minor\":1},\"zfs_version\":{\"userland\":\"zfs-2.4.0-1\",\"kernel\":\"zfs-kmod-2.4.0-1\"}}\n"
time=2026-01-12T00:08:23.847-08:00 level=DEBUG source=version_json.go:82 msg="ZFS Command Output Parsed" output.output_version.command="zfs version" output.output_version.major=0 output.output_version.minor=0 output.zfs_version.userland=zfs-2.4.0-1 output.zfs_version.kernel=zfs-kmod-2.4.0-1
time=2026-01-12T00:08:23.848-08:00 level=INFO source=zfs_exporter.go:49 msg="ZFS Version" version=zfs-2.4.0-1
time=2026-01-12T00:08:23.861-08:00 level=DEBUG source=pool_status_json.go:153 msg="ZFS Command Output" stdout="{\"output_version\":{\"command\":\"zpool status\",\"vers_major\":0,\"vers_minor\":1},\"pools\":{\"greenwood\":{\"name\":\"greenwood\",\"state\":\"ONLINE\",\"pool_guid\":240630935905734902,\"txg\":60298799,\"spa_version\":5000,\"zpl_version\":5,\"status\":\"One or more devices has experienced an unrecoverable error. An\\n\\tattempt was made to correct the error. Applications are unaffected.\\n\",\"action\":\"Determine if the device needs to be replaced, and clear the errors\\n\\tusing 'zpool clear' or replace the device with 'zpool replace'.\\n\",\"msgid\":\"ZFS-8000-9P\",\"moreinfo\":\"https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-9P\",\"scan_stats\":{\"function\":\"SCRUB\",\"state\":\"FINISHED\",\"start_time\":1767782105,\"end_time\":1767829343,\"to_examine\":42025429180416,\"examined\":42018061897728,\"skipped\":14696448,\"processed\":983040,\"errors\":0,\"bytes_per_scan\":0,\"pass_start\":1767818537,\"scrub_pause\":0,\"scrub_spent_paused\":0,\"issued_bytes_per_scan\":8485179076608,\"issued\":42018036584448},\"vdevs\":{\"greenwood\":{\"name\":\"greenwood\",\"vdev_type\":\"root\",\"guid\":240630935905734902,\"class\":\"normal\",\"state\":\"ONLINE\",\"alloc_space\":42037226803200,\"total_space\":63771674411008,\"def_space\":52312701665280,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"vdevs\":{\"raidz2-0\":{\"name\":\"raidz2-0\",\"vdev_type\":\"raidz\",\"guid\":8276276583640132761,\"class\":\"normal\",\"state\":\"ONLINE\",\"alloc_space\":42037226803200,\"total_space\":63771674411008,\"def_space\":52312701665280,\"rep_dev_size\":63771674411008,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"vdevs\":{\"redwood\":{\"name\":\"redwood\",\"vdev_type\":\"disk\",\"guid\":1693533752164838511,\"path\":\"/dev/disk/by-vdev/redwood-part1\",\"phys_path\":\"pci-0000:01:00.0-sas-phy7-lun-0\",\"devid\":\"ata-WDC_WD40EFZX-68AWUN0_WD-WX12DA0R1JNC-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0},\"maple\":{\"name\":\"maple\",\"vdev_type\":\"disk\",\"guid\":13069515523376549602,\"path\":\"/dev/disk/by-vdev/maple-part1\",\"phys_path\":\"pci-0000:01:00.0-sas-phy6-lun-0\",\"devid\":\"ata-WDC_WD40EFPX-68C6CN0_WD-WX62D15PLTV8-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0},\"beech\":{\"name\":\"beech\",\"vdev_type\":\"disk\",\"guid\":10338606211899637945,\"path\":\"/dev/disk/by-vdev/beech-part1\",\"phys_path\":\"pci-0000:01:00.0-sas-phy1-lun-0\",\"devid\":\"ata-ST4000DM000-1F2168_Z3076EQT-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0},\"willow\":{\"name\":\"willow\",\"vdev_type\":\"disk\",\"guid\":17747722603856524209,\"path\":\"/dev/disk/by-vdev/willow-part1\",\"phys_path\":\"pci-0000:01:00.0-sas-phy0-lun-0\",\"devid\":\"ata-ST4000DM000-1F2168_Z307H0QR-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0},\"birch\":{\"name\":\"birch\",\"vdev_type\":\"disk\",\"guid\":10432169852342298766,\"path\":\"/dev/disk/by-vdev/birch-part1\",\"phys_path\":\"pci-0000:01:00.0-sas-phy3-lun-0\",\"devid\":\"ata-ST4000DM000-1F2168_Z307FDNV-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0},\"oak\":{\"name\":\"oak\",\"vdev_type\":\"disk\",\"guid\":5598510555668390460,\"path\":\"/dev/disk/by-vdev/oak-part1\",\"phys_path\":\"pci-0000:01:00.0-sas-phy2-lun-0\",\"devid\":\"ata-ST4000DM000-1F2168_Z307E12J-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0},\"walnut\":{\"name\":\"walnut\",\"vdev_type\":\"disk\",\"guid\":5052862979346025662,\"path\":\"/dev/disk/by-vdev/walnut-part1\",\"phys_path\":\"pci-0000:02:00.0-sas-phy1-lun-0\",\"devid\":\"ata-ST4000DM000-2AE166_WDH02AEY-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0},\"pine\":{\"name\":\"pine\",\"vdev_type\":\"disk\",\"guid\":11194587813252383021,\"path\":\"/dev/disk/by-vdev/pine-part1\",\"phys_path\":\"pci-0000:01:00.0-sas-phy5-lun-0\",\"devid\":\"ata-ST4000DM000-1F2168_Z30620SR-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0},\"sycamore\":{\"name\":\"sycamore\",\"vdev_type\":\"disk\",\"guid\":17046160168366816094,\"path\":\"/dev/disk/by-vdev/sycamore-part1\",\"phys_path\":\"pci-0000:01:00.0-sas-phy4-lun-0\",\"devid\":\"ata-HGST_HUS724040ALE640_PK1331PAKP6G9S-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0},\"palm\":{\"name\":\"palm\",\"vdev_type\":\"disk\",\"guid\":3462721303918148450,\"path\":\"/dev/disk/by-vdev/palm-part1\",\"phys_path\":\"pci-0000:02:00.0-sas-phy2-lun-0\",\"devid\":\"ata-ST4000DM000-2AE166_WDH02KMA-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0},\"gum\":{\"name\":\"gum\",\"vdev_type\":\"disk\",\"guid\":17480034178652514697,\"path\":\"/dev/disk/by-vdev/gum-part1\",\"phys_path\":\"pci-0000:02:00.0-sas-phy3-lun-0\",\"devid\":\"ata-HGST_HUS724040ALE640_PK1334PAKSAD5S-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0},\"poplar\":{\"name\":\"poplar\",\"vdev_type\":\"disk\",\"guid\":3990993109261751504,\"path\":\"/dev/disk/by-vdev/poplar-part1\",\"phys_path\":\"pci-0000:02:00.0-sas-phy3-lun-0\",\"devid\":\"ata-ST4000DM000-2AE166_WDH02KXB-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0},\"dogwood\":{\"name\":\"dogwood\",\"vdev_type\":\"disk\",\"guid\":13434953024622563852,\"path\":\"/dev/disk/by-vdev/dogwood-part1\",\"phys_path\":\"pci-0000:00:1f.2-ata-5\",\"devid\":\"ata-WDC_WD40EFZX-68AWUN0_WD-WX12DA0EAAVZ-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0},\"ash\":{\"name\":\"ash\",\"vdev_type\":\"disk\",\"guid\":13908182941863625816,\"path\":\"/dev/disk/by-vdev/ash-part1\",\"phys_path\":\"pci-0000:02:00.0-sas-phy4-lun-0\",\"devid\":\"ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E1SU6T3L-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"self_healed\":3928064,\"phys_space\":4000776716288,\"read_errors\":56,\"write_errors\":0,\"checksum_errors\":0,\"scan_processed\":983040,\"slow_ios\":44},\"alder\":{\"name\":\"alder\",\"vdev_type\":\"disk\",\"guid\":3898698817971933339,\"path\":\"/dev/disk/by-vdev/alder-part1\",\"phys_path\":\"pci-0000:02:00.0-sas-phy6-lun-0\",\"devid\":\"ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E6XYD58S-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0},\"linden\":{\"name\":\"linden\",\"vdev_type\":\"disk\",\"guid\":16738412563713742014,\"path\":\"/dev/disk/by-vdev/linden-part1\",\"phys_path\":\"pci-0000:02:00.0-sas-phy7-lun-0\",\"devid\":\"ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E2UCCERP-part1\",\"class\":\"normal\",\"state\":\"ONLINE\",\"rep_dev_size\":3985734369280,\"phys_space\":4000776716288,\"read_errors\":0,\"write_errors\":0,\"checksum_errors\":0,\"slow_ios\":0}}}}}},\"error_count\":0}}}\n"
time=2026-01-12T00:08:23.862-08:00 level=DEBUG source=pool_status_json.go:166 msg="Zpool Status Output Parsed" output.output_version.command="zpool status" output.output_version.major=0 output.output_version.minor=0 output.num_pools=1
time=2026-01-12T00:08:23.862-08:00 level=DEBUG source=zfs_exporter.go:57 msg="Num Pools" num_pools=1
time=2026-01-12T00:08:23.862-08:00 level=DEBUG source=zfs_exporter.go:59 msg="Pool Name" name=greenwood
time=2026-01-12T00:08:23.862-08:00 level=DEBUG source=zfs_exporter.go:60 msg="Pool Vdevs" num_vdevs=1
time=2026-01-12T00:08:23.862-08:00 level=DEBUG source=zfs_exporter.go:61 msg="Pool Status" status.name=greenwood status.state=ONLINE status.pool_guid=240630935905734902 status.txg=60298799 status.spa_version=5000 status.zpl_version=5 status.status="One or more devices has experienced an unrecoverable error. An\n\tattempt was made to correct the error. Applications are unaffected.\n" status.action="Determine if the device needs to be replaced, and clear the errors\n\tusing 'zpool clear' or replace the device with 'zpool replace'.\n" status.more_info=https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-9P status.num_vdevs=1
time=2026-01-12T00:08:23.862-08:00 level=DEBUG source=zfs_exporter.go:62 msg="Pool ScanStats" scan_stats.function=SCRUB scan_stats.state=FINISHED scan_stats.start_time=1767782105 scan_stats.end_time=1767829343 scan_stats.to_examine=42025429180416 scan_stats.examined=42018061897728 scan_stats.skipped=14696448 scan_stats.processed=983040 scan_stats.errors=0 scan_stats.BytesPerScan=0 scan_stats.pass_start=1767818537 scan_stats.scrub_pause=0 scan_stats.scrub_spent_paused=0 scan_stats.issued_bytes_per_scan=8485179076608
time=2026-01-12T00:08:23.862-08:00 level=DEBUG source=zfs_exporter.go:64 msg="Vdev Name" name=greenwood
time=2026-01-12T00:08:23.862-08:00 level=DEBUG source=zfs_exporter.go:65 msg="Vdev Status" status.name=greenwood status.vdev_type=root status.guid=240630935905734902 status.path="" status.phys_path="" status.devid="" status.class=normal status.state=ONLINE status.parent="" status.rep_dev_size=0 status.phys_space=0 status.read_errors=0 status.write_errors=0 status.checksum_errors=0 status.slow_ios=0
time=2026-01-12T00:08:23.862-08:00 level=INFO source=zfs_exporter.go:93 msg="Enabling pools" pools=(all)
time=2026-01-12T00:08:23.862-08:00 level=INFO source=zfs_exporter.go:102 msg="Enabling collectors" collectors="dataset-filesystem, dataset-volume, pool"
time=2026-01-12T00:08:23.863-08:00 level=ERROR source=zfs_exporter.go:128 msg="Error starting HTTP server" err="listen tcp :9134: bind: address already in use"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
zfs {list,get,mount,version}zpool {status,list,get,version}zfs version --jsonzpool status --json --json-int --json-flat-vdevsgoTODO
--json*support inzfs/zpoolcommandsExample