Revert "Remove manual zfs timers, try ubuntu-latest"

This reverts commit 4ba9fe4fa2.
This commit is contained in:
Jarno Rankinen 2024-08-11 18:49:46 +03:00
parent 4ba9fe4fa2
commit d343e5fe39
2 changed files with 30 additions and 1 deletions

View File

@ -21,7 +21,7 @@ env:
jobs: jobs:
build_push_aurora: build_push_aurora:
name: Build and publish SB image with ZFS name: Build and publish SB image with ZFS
runs-on: ubuntu-latest runs-on: ubuntu-20.04
permissions: permissions:
contents: read contents: read

View File

@ -24,6 +24,35 @@ ADDPKGS=(
## Add gregw/extras COPR ## Add gregw/extras COPR
curl -so /etc/yum.repos.d/gregw-extras-fedora-40.repo https://copr.fedorainfracloud.org/coprs/gregw/extras/repo/fedora-40/gregw-extras-fedora-40.repo curl -so /etc/yum.repos.d/gregw-extras-fedora-40.repo https://copr.fedorainfracloud.org/coprs/gregw/extras/repo/fedora-40/gregw-extras-fedora-40.repo
## Add systemd timers for periodic ZFS scrubs
cat << EOF > /usr/lib/systemd/zfs-scrub@.service
[Unit]
Description=zpool scrub on %i
[Service]
Nice=19
IOSchedulingClass=idle
KillSignal=SIGINT
ExecStart=/usr/sbin/zpool scrub %i
[Install]
WantedBy=multi-user.target
EOF
cat << EOF > /usr/lib//systemd/system/zfs-scrub@.timer
[Unit]
Description=Weekly zpool scrub on %i
[Timer]
OnCalendar=Mon *-*-* 04:00:00
AccuracySec=1h
Persistent=true
[Install]
WantedBy=multi-user.target
EOF
RMSTRING="" RMSTRING=""
ADDSTRING="" ADDSTRING=""