damicon / zfswatcher

ZFS pool monitoring and notification daemon
GNU General Public License v3.0
190 stars 38 forks source link

Error parsing zpool status output #20

Open asw44asw opened 4 years ago

asw44asw commented 4 years ago

Hello Developers. I hope contribute with the code refinement I had an error when starting zfswatcher, The log file explains by itself Thank you all

2020-10-01 20:38:17 [info] zfswatcher starting
2020-10-01 20:38:17 [crit] invalid line 11 in status output: remove: Removal of vdev 0 copied 552G in 2h27m, completed on Mon Aug 24 05:40:45 2020
>  pool: backup_servers
> state: ONLINE
>status: One or more devices has experienced an unrecoverable error.  An
>       attempt was made to correct the error.  Applications are unaffected.
>action: Determine if the device needs to be replaced, and clear the errors
>       using 'zpool clear' or replace the device with 'zpool replace'.
>   see: http://zfsonlinux.org/msg/ZFS-8000-9P
>  scan: scrub in progress since Thu Oct  1 19:03:39 2020
>       315G scanned at 56.8M/s, 215G issued at 38.8M/s, 716G total
>       36K repaired, 30.02% done, 0 days 03:40:32 to go
>remove: Removal of vdev 0 copied 552G in 2h27m, completed on Mon Aug 24 05:40:45 2020
>    7.21M memory used for removed device mappings
>config:
>
>       NAME                                    STATE     READ WRITE CKSUM
>       backup_servers                          ONLINE       0     0     0
>         mirror-1                              ONLINE       0     0     0
>           ata-ST1000DM003-1CH162_S1DGGSXD     ONLINE       0     0     0
>           ata-SAMSUNG_HD103SJ_S2NWJ50B351535  ONLINE       1     0     3  (repairing)
>
>errors: No known data errors
>
>  pool: dpool
> state: ONLINE
>  scan: scrub in progress since Thu Oct  1 19:03:49 2020
>       308G scanned at 55.6M/s, 288G issued at 52.1M/s, 388G total
>       0B repaired, 74.37% done, 0 days 00:32:33 to go
>config:
>
>       NAME                                          STATE     READ WRITE CKSUM
>       dpool                                         ONLINE       0     0     0
>         mirror-0                                    ONLINE       0     0     0
>           ata-SAMSUNG_HD154UI_S240J50B101993-part3  ONLINE       0     0     0
>           ata-SAMSUNG_HD154UI_S240J50B712198-part3  ONLINE       0     0     0
>
>errors: No known data errors
>
>  pool: vpool
> state: ONLINE
>  scan: scrub in progress since Thu Oct  1 19:03:56 2020
>       938G scanned at 170M/s, 655G issued at 118M/s, 2.14T total
>       0B repaired, 29.92% done, 0 days 03:40:56 to go
>config:
>
>       NAME                               STATE     READ WRITE CKSUM
>       vpool                              ONLINE       0     0     0
>         ata-ST3000VX000-1ES166_Z501YC0L  ONLINE       0     0     0
>       
>errors: No known data errors
2020-10-01 20:38:17 [crit] exiting, parsing ZFS status failed
2020-10-01 20:38:17 [info] zfswatcher stopping

And the zpool status output

# zpool status
  pool: backup_servers
 state: ONLINE
status: One or more devices has experienced an unrecoverable error.  An
    attempt was made to correct the error.  Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
    using 'zpool clear' or replace the device with 'zpool replace'.
   see: http://zfsonlinux.org/msg/ZFS-8000-9P
  scan: scrub in progress since Thu Oct  1 19:03:39 2020
    352G scanned at 51,5M/s, 252G issued at 36,9M/s, 716G total
    36K repaired, 35,22% done, 0 days 03:34:53 to go
remove: Removal of vdev 0 copied 552G in 2h27m, completed on Mon Aug 24 05:40:45 2020
    7,21M memory used for removed device mappings
config:

    NAME                                    STATE     READ WRITE CKSUM
    backup_servers                          ONLINE       0     0     0
      mirror-1                              ONLINE       0     0     0
        ata-ST1000DM003-1CH162_S1DGGSXD     ONLINE       0     0     0
        ata-SAMSUNG_HD103SJ_S2NWJ50B351535  ONLINE       1     0     3  (repairing)

errors: No known data errors

  pool: dpool
 state: ONLINE
  scan: scrub in progress since Thu Oct  1 19:03:49 2020
    356G scanned at 52,0M/s, 337G issued at 49,3M/s, 388G total
    0B repaired, 86,96% done, 0 days 00:17:29 to go
config:

    NAME                                          STATE     READ WRITE CKSUM
    dpool                                         ONLINE       0     0     0
      mirror-0                                    ONLINE       0     0     0
        ata-SAMSUNG_HD154UI_S240J50B101993-part3  ONLINE       0     0     0
        ata-SAMSUNG_HD154UI_S240J50B712198-part3  ONLINE       0     0     0

errors: No known data errors

  pool: vpool
 state: ONLINE
  scan: scrub in progress since Thu Oct  1 19:03:56 2020
    1,03T scanned at 154M/s, 793G issued at 116M/s, 2,14T total
    0B repaired, 36,26% done, 0 days 03:24:51 to go
config:

    NAME                               STATE     READ WRITE CKSUM
    vpool                              ONLINE       0     0     0
      ata-ST3000VX000-1ES166_Z501YC0L  ONLINE       0     0     0

errors: No known data errors
mariomare22 commented 3 years ago

having the same issue here any luck?

asw44asw commented 3 years ago

No, I gave up using zfswatcher and did my own script in bash, running from cron, based in the return from "zpool status -x" command.

Em 23/02/2021 14:38, mariomare22 escreveu:

having the same issue here any luck?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/damicon/zfswatcher/issues/20#issuecomment-784377155, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARHDPUTGOJNXLHPFV6FL32DTAPRY7ANCNFSM4SBCFJAQ.Web Bug from https://github.com/notifications/beacon/ARHDPUVQRROWEEVSLIRHFCDTAPRY7A5CNFSM4SBCFJA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF3AKKQY.gif

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/damicon/zfswatcher/issues/20#issuecomment-784377155","url": "https://github.com/damicon/zfswatcher/issues/20#issuecomment-784377155", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]