I'd create a single raidcheck.service that runs daily and calls a script
that itself determines which device to check, e.g. /dev/md$[dayofyear % 16].

On Sun, Jul 26, 2020, 22:56 Ian Pilcher <arequip...@gmail.com> wrote:

> My NAS has 16 MD RAID devices.  I've created a simple service
> (raidcheck@.service) that will trigger a check of the RAID device
> identified by the argument.  E.g., 'systemctl start raidcheck@md1' will
> trigger the check of md1 (after checking that no other array is being
> checked/synced, no arrays are degraded, etc.).
>
> It takes 6-8 hours to check one of these arrays, so I want to run one
> check every night at 23:00.  So (picking tonight as an arbitrary
> starting point) md1 would run tonight, md2 would run tomorrow night, md3
> would run the following night ... all the way through md16.  Then the
> cycle would start over with md1.
>
> I had thought that I would be able to create 16 separate timers (one for
> each device), each scheduled to trigger every 16 days at 23:00, starting
> on a particular day.
>
> Looking through the systemd.timer(5) and systemd.time(7) man pages,
> however, I haven't been able to figure out how to do this.  Is it not
> possible, or am I missing something?
>
> --
> ========================================================================
>                   In Soviet Russia, Google searches you!
> ========================================================================
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to