zfs degraded, no mail or any other alert.

    • Offizieller Beitrag

    I really need to see the OP's zed.rc file. The salt code doesn't add an address if notifications aren't enabled.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • same here:


    Code
    # This file is auto-generated by openmediavault (https://www.openmediavault.org)
    # WARNING: Do not edit this file, your changes will get lost.
    
    ZED_EMAIL_ADDR=me@mail.gr
    ZED_NOTIFY_INTERNAL_SECS=3600
    • Offizieller Beitrag

    It is configured as expected then. There would be no email addr is notifications weren't enabled. I recommend trying Krisbee's post who has more knowledge about zfs than I do.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    It sounds like a removed drive gives an UNAVAIL state change not degraded. The notification was fixed in 2.1.3. I'm not clear on what the correct fix is to notify on UNAVAIL. Sounds like you need to add ZED_NOTIFY_VERBOSE=1 to zed.rc. If someone can confirm that, I could add it to the plugin.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • It sounds like a removed drive gives an UNAVAIL state change not degraded. The notification was fixed in 2.1.3. I'm not clear on what the correct fix is to notify on UNAVAIL. Sounds like you need to add ZED_NOTIFY_VERBOSE=1 to zed.rc. If someone can confirm that, I could add it to the plugin.


    I agree it needs to change or become user configurable. I'm just going through some tests again after changing zed.rc


    The current version of statechange-notify.sh should generate an email for DEGRADED, FAULTED, REMOVED or UNAVAIL. It includes the fix from a previous issue raised at zfs github.


    I changed my zed.rc to this in order to try to catch all events while testing.


    Code
    # This file is auto-generated by openmediavault (https://www.openmediavault.org)
    # WARNING: Do not edit this file, your changes will get lost.
    
    ZED_EMAIL_ADDR=dummysmtp@gmail.com
    ZED_NOTIFY_INTERNAL_SECS=3600
    ZED_NOTIFY_VERBOSE=1
    ZED_SYSLOG_SUBCLASS_INCLUDE="*"


    When I pull a drive from the VM, it is FAULTED in the ZFS pool and the associated statechange event is generated as expected:




    After changing zed.rc, an email alert is now generated correctly for this event with a matching time:


    • Offizieller Beitrag

    I changed my zed.rc to this in order to try to catch all events while testing.

    Ok, just let me know if you think I should have the plugin add these two lines:

    ZED_NOTIFY_VERBOSE=1

    ZED_SYSLOG_SUBCLASS_INCLUDE="*"


    The plugin doesn't have a settings tab. So, if people wanted to disable these, it would probably have to be environment variables. Or they are just added to every system.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • ryecoaaron


    Just adding ZED_NOTIFY_VERBOSE=1 to zed.rc does seem to be sufficient, but would you also consider adding ZED_SYSLOG_SUBCLASS_EXCLUDE="history_event" This comes from the default debian/proxmox zed.rc which includes:



    Code
    ##
    # Which set of event subclasses to log
    # By default, events from all subclasses are logged.
    # If ZED_SYSLOG_SUBCLASS_INCLUDE is set, only subclasses
    # matching the pattern are logged. Use the pipe symbol (|)
    # or shell wildcards (*, ?) to match multiple subclasses.
    # Otherwise, if ZED_SYSLOG_SUBCLASS_EXCLUDE is set, the
    # matching subclasses are excluded from logging.
    #ZED_SYSLOG_SUBCLASS_INCLUDE="checksum|scrub_*|vdev.*"
    ZED_SYSLOG_SUBCLASS_EXCLUDE="history_event"
  • For anyone else reading this, testing would have been a lot lot quicker had I known about zinject ( part of the zfs-test suite) before hand.


    zinject.8 — OpenZFS documentation


    I daresay you'd be brave to try it on a live zfs pool, but all you need to create a degraded pool is something like:


    root@omv7vm:~# zinject -d scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-6 -A degrade xpool


    which instantly degrades the pool and an email is generated.



    To clear up:


    zinject -c all


    And clear pool as necessary.

    • Offizieller Beitrag

    Just adding ZED_NOTIFY_VERBOSE=1 to zed.rc does seem to be sufficient, but would you also consider adding ZED_SYSLOG_SUBCLASS_EXCLUDE="history_event" This comes from the default debian/proxmox zed.rc which includes

    Added - https://github.com/OpenMediaVa…8d87b5796cdbdee99bc377ce7

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    should i wait for an update then, or edit zed.rc ?

    I would edit the file. When the update goes out, it won't have anything to change.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • tdriver

    Hat das Label gelöst hinzugefügt.
  • tdriver I shouldn't think it would be long before an update appears. As ryecoarron says, you can edit /etc/zfs/zed.d/zed.rc now if you wanted. Beware any changes will be over-written if you make, save and apply an changes to your Notifications settings in the WebUI and of course finally by the awaited update. If you edit zed.rc you must also restart the zfs-zed service by systemctl restart zfs-zed

    • Offizieller Beitrag

    If you edit zed.rc you must also restart the zfs-zed service

    The plugin isn't doing that. Guess I will have to make that change.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!