Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    ZFS zpool mirror Monitoring

    General pfSense Questions
    4
    7
    547
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • junicast
      junicast last edited by

      pfSense has been supporting ZFS for some time now and I'm very happy with it, especially the fact, that I can setup a mirror of two disks on physical installations.

      Yet I miss an option to monitor the health of such a setup. Does pfSense itself send out notifications if it detects zpool failure similar like TrueNAS does?

      Even if it does, I think integrating it into the monitoring would be more ideal, since you can acknowledge and silence during a maintenance, you get what I mean.

      Currently I'm thinking about putting this script onto every host and utilize it with Nagios, but the script won't be included in a backup config file, right?

      What is best practice for this topic?

      AKEGEC provels 2 Replies Last reply Reply Quote 0
      • AKEGEC
        AKEGEC @junicast last edited by

        @pmisch pfsense and truenas are two different things. One is fire-walling and the other is storing. Don't forget 2.5 ++ version is quite unstable, but sure you can always try it. Make sure to do a backup.

        1 Reply Last reply Reply Quote 0
        • stephenw10
          stephenw10 Netgate Administrator last edited by

          When we move to ZFS as the default file system we will almost certainly use it for multi drive systems too. At that time the existing GEOM mirror functionality would need to be replicated for ZFS mirrors. It's something we're looking at doing anyway.

          Steve

          1 Reply Last reply Reply Quote 1
          • provels
            provels @junicast last edited by provels

            @pmisch
            I did this to monitor, but no notifications:
            https://forum.netgate.com/topic/155349/where-to-view-the-status-of-a-zfs-mirror/5?_=1620467813682

            Peder

            MAIN - pfSense+ 23.01-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD
            BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

            1 Reply Last reply Reply Quote 2
            • stephenw10
              stephenw10 Netgate Administrator last edited by

              Nice. 👍

              provels 1 Reply Last reply Reply Quote 0
              • provels
                provels @stephenw10 last edited by

                @stephenw10 High praise! :)

                Peder

                MAIN - pfSense+ 23.01-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD
                BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                1 Reply Last reply Reply Quote 0
                • junicast
                  junicast last edited by

                  In the end I wrote a very tiny shell script to check the ZFS status and put it into /usr/local/libexec/nagios/check_zfs_status.sh

                  #!/bin/sh
                  cmdzpool="/sbin/zpool"
                  healthcheck=`$cmdzpool status -x | grep -c "all pools are healthy"`
                  if [ $healthcheck -eq 1 ]
                  then
                          echo "ZFS Volumes OK"
                          return 0
                  else
                          echo "ZFS Volumes error."
                          return 2
                  fi
                  

                  It's not the ideal solution since the check has to be installed manually but it's better than nothing.

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post