ZFS-Scrub (#69)

Syntax

Variabgle monat ergänzt, scrub jetzt jeden 2. monat am 14.

Sanoid cron kann jetzt dom(day of month)

Vars trim entfernt

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#69
Co-Authored-By: mg <mg@noreply.git.mgrote.net>
Co-Committed-By: mg <mg@noreply.git.mgrote.net>
This commit is contained in:
Michael Grote 2021-04-12 20:55:37 +02:00
parent bf6c87e00f
commit 0901e98181
8 changed files with 39 additions and 50 deletions

View file

@ -50,18 +50,14 @@
zfs_extra_arc_max_size: "2147483648" # 2GB in Bytes
zfs_extra_zfs_pools:
- name: "rpool"
cron_minute_zfs_trim: "5"
cron_hour_zfs_trim: "22"
cron_month_zfs_trim: "4,8,12"
cron_day_zfs_trim: "2"
cron_weekday_zfs_scrub: "6"
cron_minutes_zfs_scrub: "0"
cron_minutes_zfs_scrub: "5"
cron_hour_zfs_scrub: "23"
cron_day_of_month_zfs_scrub: "14"
cron_day_of_week_zfs_scrub: "*"
cron_month_zfs_scrub: "*/2"
- name: "hdd_vm_mirror"
cron_minute_zfs_trim: "5"
cron_hour_zfs_trim: "23"
cron_month_zfs_trim: "4,8,12"
cron_day_zfs_trim: "2"
cron_weekday_zfs_scrub: "6"
cron_minutes_zfs_scrub: "0"
cron_hour_zfs_scrub: "22"
cron_minutes_zfs_scrub: "10"
cron_hour_zfs_scrub: "23"
cron_day_of_month_zfs_scrub: "14"
cron_day_of_week_zfs_scrub: "*"
cron_month_zfs_scrub: "*/2"

View file

@ -81,21 +81,19 @@
zfs_extra_max_usage_health: "90"
zfs_extra_zfs_pools:
- name: "rpool"
cron_minute_zfs_trim: "5"
cron_hour_zfs_trim: "22"
cron_month_zfs_trim: "4,8,12"
cron_day_zfs_trim: "2"
cron_weekday_zfs_scrub: "*/21"
cron_minutes_zfs_scrub: "0"
cron_hour_zfs_scrub: "23"
cron_day_of_month_zfs_scrub: "14"
cron_day_of_week_zfs_scrub: "*"
cron_month_zfs_scrub: "*/2"
- name: "hdd_data_raidz"
cron_minute_zfs_trim: "5"
cron_hour_zfs_trim: "24"
cron_month_zfs_trim: "4,8,12"
cron_day_zfs_trim: "2"
cron_weekday_zfs_scrub: "*/21"
cron_minutes_zfs_scrub: "0"
cron_hour_zfs_scrub: "23"
cron_day_of_month_zfs_scrub: "14"
cron_day_of_week_zfs_scrub: "*"
cron_month_zfs_scrub: "*/2"
### mgrote.zfs_sanoid
sanoid_datasets:
- path: 'hdd_data_raidz/data_crypt'

View file

@ -38,13 +38,11 @@
zfs_extra_arc_max_size: "2147483648" # 2GB in Bytes
zfs_extra_zfs_pools:
- name: "rpool"
cron_minute_zfs_trim: "5"
cron_hour_zfs_trim: "22"
cron_month_zfs_trim: "4,8,12"
cron_day_zfs_trim: "2"
cron_weekday_zfs_scrub: "6"
cron_minutes_zfs_scrub: "0"
cron_minutes_zfs_scrub: "15"
cron_hour_zfs_scrub: "23"
cron_day_of_month_zfs_scrub: "14"
cron_day_of_week_zfs_scrub: "*"
cron_month_zfs_scrub: "*/2"
### mgrote.apcupsd
apcupsd_nis_master: false
apcupsd_nis_master_hostname: pve2-test.grote.lan

View file

@ -38,13 +38,11 @@
zfs_extra_arc_max_size: "6442450944" # 6GB in Bytes
zfs_extra_zfs_pools:
- name: "rpool"
cron_minute_zfs_trim: "5"
cron_hour_zfs_trim: "22"
cron_month_zfs_trim: "4,8,12"
cron_day_zfs_trim: "2"
cron_weekday_zfs_scrub: "*/21"
cron_minutes_zfs_scrub: "0"
cron_minutes_zfs_scrub: "20"
cron_hour_zfs_scrub: "23"
cron_day_of_month_zfs_scrub: "14"
cron_day_of_week_zfs_scrub: "*"
cron_month_zfs_scrub: "*/2"
### mgrote.apcupsd
apcupsd_nis_master: false
apcupsd_nis_master_hostname: pve2.grote.lan

View file

@ -38,13 +38,11 @@
zfs_extra_arc_max_size: "2147483648" # 2GB in Bytes
zfs_extra_zfs_pools:
- name: "rpool"
cron_minute_zfs_trim: "5"
cron_hour_zfs_trim: "22"
cron_month_zfs_trim: "4,8,12"
cron_day_zfs_trim: "2"
cron_weekday_zfs_scrub: "6"
cron_minutes_zfs_scrub: "0"
cron_minutes_zfs_scrub: "25"
cron_hour_zfs_scrub: "23"
cron_day_of_month_zfs_scrub: "14"
cron_day_of_week_zfs_scrub: "*"
cron_month_zfs_scrub: "*/2"
### mgrote.apcupsd
apcupsd_nis_master: false
apcupsd_nis_master_hostname: pve2-test.grote.lan

View file

@ -38,13 +38,11 @@
zfs_extra_arc_max_size: "6442450944" # 6GB in Bytes
zfs_extra_zfs_pools:
- name: "rpool"
cron_minute_zfs_trim: "5"
cron_hour_zfs_trim: "22"
cron_month_zfs_trim: "4,8,12"
cron_day_zfs_trim: "2"
cron_weekday_zfs_scrub: "*/21"
cron_minutes_zfs_scrub: "0"
cron_minutes_zfs_scrub: "30"
cron_hour_zfs_scrub: "23"
cron_day_of_month_zfs_scrub: "14"
cron_day_of_week_zfs_scrub: "*"
cron_month_zfs_scrub: "*/2"
### mgrote.apcupsd
apcupsd_nis_master: false
apcupsd_nis_master_hostname: pve2.grote.lan

View file

@ -9,4 +9,5 @@ Richtet regelmaessige Scrubs(jeden Sonntag) ein.
### Variablen + Defaults
- see [defaults](./defaults/main.yml)
- see [default-filter](./tasks/main.yml))
- Variablen für mgrote.zfs_health/trim/scrub/zed/arc_mem/ sind zusammengefasst unter zfs_extra_*

View file

@ -12,7 +12,9 @@
name: zfs-scrub - "{{ item.name }}"
state: present
job: "{{ zfs_extra_path_zpool }} scrub {{ item.name }}"
weekday: "{{ item.cron_weekday_zfs_scrub }}"
minute: "{{ item.cron_minutes_zfs_scrub }}"
hour: "{{ item.cron_hour_zfs_scrub }}"
month: "{{ item.cron_month_zfs_scrub | default('*') }}"
weekday: "{{ item.cron_day_of_week_zfs_scrub | default('7') }}"
day: "{{ item.cron_day_of_month_zfs_scrub | default('*/21') }}"
hour: "{{ item.cron_hour_zfs_scrub | default('23') }}"
minute: "{{ item.cron_minutes_zfs_scrub | default('30') }}"
with_items: "{{ zfs_extra_zfs_pools }}"