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

    BSD periodic(8) - use for ZFS monitoring/scrubs?

    Scheduled Pinned Locked Moved Development
    3 Posts 2 Posters 979 Views
    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.
    • luckman212L
      luckman212 LAYER 8
      last edited by luckman212

      Saw this post over on reddit about FreeBSD periodic(8) which comes out of the box ready to do various nice things. One of them is to check and scrub ZFS pools and report errors via email/syslog. Rather than re-invent the wheel, is there a way to wire this up on 2.4.x ?

      I see the relevant bits and configs are already in place on my system...

      /etc/defaults/periodic.conf
      /etc/periodic/daily/404.status-zfs
      /etc/periodic/daily/800.scrub-zfs
      

      but when I try to run

      # periodic daily
      

      I'm greeted with eval: mail: not found
      (It does seem to run and churn through a bunch of things though)

      I assume I need to set some variable or adjust a conf file since mail does not exist on a default install. Maybe it can be made to use mail.php somehow? I saw this note about installing sendmail (but it's from old docs on 2.3 so I am reluctant to even try). Since it's there in FreshPorts, seems like I could try pkg install sendmail+tls+sasl2 and dive down a rabbit hole...

      any tips?

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        We have disabled some things (like mail) that periodic wants, but I'm not sure we've taken a look at that lately to see if any of it is viable to bring back. The cron entries are disabled for periodic as well.

        We do like to re-use what we can in FreeBSD where possible, so it would most likely be that path we take when we get around to rigging up ZFS support. Though we may not use periodic directly but the scripts it has. Too early to say.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • luckman212L
          luckman212 LAYER 8
          last edited by

          Thanks for the reply Jim. Sounds like this is pretty far off. I guess for now I'll just make a simple script and cron entry to scrub every now and then and dump the results into syslog.

          1 Reply Last reply Reply Quote 0
          • S Sn3akerz referenced this topic on
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.