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:
parent
bf6c87e00f
commit
0901e98181
8 changed files with 39 additions and 50 deletions
|
@ -50,18 +50,14 @@
|
||||||
zfs_extra_arc_max_size: "2147483648" # 2GB in Bytes
|
zfs_extra_arc_max_size: "2147483648" # 2GB in Bytes
|
||||||
zfs_extra_zfs_pools:
|
zfs_extra_zfs_pools:
|
||||||
- name: "rpool"
|
- name: "rpool"
|
||||||
cron_minute_zfs_trim: "5"
|
cron_minutes_zfs_scrub: "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_hour_zfs_scrub: "23"
|
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"
|
- name: "hdd_vm_mirror"
|
||||||
cron_minute_zfs_trim: "5"
|
cron_minutes_zfs_scrub: "10"
|
||||||
cron_hour_zfs_trim: "23"
|
cron_hour_zfs_scrub: "23"
|
||||||
cron_month_zfs_trim: "4,8,12"
|
cron_day_of_month_zfs_scrub: "14"
|
||||||
cron_day_zfs_trim: "2"
|
cron_day_of_week_zfs_scrub: "*"
|
||||||
cron_weekday_zfs_scrub: "6"
|
cron_month_zfs_scrub: "*/2"
|
||||||
cron_minutes_zfs_scrub: "0"
|
|
||||||
cron_hour_zfs_scrub: "22"
|
|
||||||
|
|
|
@ -81,21 +81,19 @@
|
||||||
zfs_extra_max_usage_health: "90"
|
zfs_extra_max_usage_health: "90"
|
||||||
zfs_extra_zfs_pools:
|
zfs_extra_zfs_pools:
|
||||||
- name: "rpool"
|
- 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: "0"
|
||||||
cron_hour_zfs_scrub: "23"
|
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"
|
- 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_minutes_zfs_scrub: "0"
|
||||||
cron_hour_zfs_scrub: "23"
|
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
|
### mgrote.zfs_sanoid
|
||||||
sanoid_datasets:
|
sanoid_datasets:
|
||||||
- path: 'hdd_data_raidz/data_crypt'
|
- path: 'hdd_data_raidz/data_crypt'
|
||||||
|
|
|
@ -38,13 +38,11 @@
|
||||||
zfs_extra_arc_max_size: "2147483648" # 2GB in Bytes
|
zfs_extra_arc_max_size: "2147483648" # 2GB in Bytes
|
||||||
zfs_extra_zfs_pools:
|
zfs_extra_zfs_pools:
|
||||||
- name: "rpool"
|
- name: "rpool"
|
||||||
cron_minute_zfs_trim: "5"
|
cron_minutes_zfs_scrub: "15"
|
||||||
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_hour_zfs_scrub: "23"
|
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
|
### mgrote.apcupsd
|
||||||
apcupsd_nis_master: false
|
apcupsd_nis_master: false
|
||||||
apcupsd_nis_master_hostname: pve2-test.grote.lan
|
apcupsd_nis_master_hostname: pve2-test.grote.lan
|
||||||
|
|
|
@ -38,13 +38,11 @@
|
||||||
zfs_extra_arc_max_size: "6442450944" # 6GB in Bytes
|
zfs_extra_arc_max_size: "6442450944" # 6GB in Bytes
|
||||||
zfs_extra_zfs_pools:
|
zfs_extra_zfs_pools:
|
||||||
- name: "rpool"
|
- name: "rpool"
|
||||||
cron_minute_zfs_trim: "5"
|
cron_minutes_zfs_scrub: "20"
|
||||||
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_hour_zfs_scrub: "23"
|
||||||
|
cron_day_of_month_zfs_scrub: "14"
|
||||||
|
cron_day_of_week_zfs_scrub: "*"
|
||||||
|
cron_month_zfs_scrub: "*/2"
|
||||||
### mgrote.apcupsd
|
### mgrote.apcupsd
|
||||||
apcupsd_nis_master: false
|
apcupsd_nis_master: false
|
||||||
apcupsd_nis_master_hostname: pve2.grote.lan
|
apcupsd_nis_master_hostname: pve2.grote.lan
|
||||||
|
|
|
@ -38,13 +38,11 @@
|
||||||
zfs_extra_arc_max_size: "2147483648" # 2GB in Bytes
|
zfs_extra_arc_max_size: "2147483648" # 2GB in Bytes
|
||||||
zfs_extra_zfs_pools:
|
zfs_extra_zfs_pools:
|
||||||
- name: "rpool"
|
- name: "rpool"
|
||||||
cron_minute_zfs_trim: "5"
|
cron_minutes_zfs_scrub: "25"
|
||||||
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_hour_zfs_scrub: "23"
|
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
|
### mgrote.apcupsd
|
||||||
apcupsd_nis_master: false
|
apcupsd_nis_master: false
|
||||||
apcupsd_nis_master_hostname: pve2-test.grote.lan
|
apcupsd_nis_master_hostname: pve2-test.grote.lan
|
||||||
|
|
|
@ -38,13 +38,11 @@
|
||||||
zfs_extra_arc_max_size: "6442450944" # 6GB in Bytes
|
zfs_extra_arc_max_size: "6442450944" # 6GB in Bytes
|
||||||
zfs_extra_zfs_pools:
|
zfs_extra_zfs_pools:
|
||||||
- name: "rpool"
|
- name: "rpool"
|
||||||
cron_minute_zfs_trim: "5"
|
cron_minutes_zfs_scrub: "30"
|
||||||
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_hour_zfs_scrub: "23"
|
||||||
|
cron_day_of_month_zfs_scrub: "14"
|
||||||
|
cron_day_of_week_zfs_scrub: "*"
|
||||||
|
cron_month_zfs_scrub: "*/2"
|
||||||
### mgrote.apcupsd
|
### mgrote.apcupsd
|
||||||
apcupsd_nis_master: false
|
apcupsd_nis_master: false
|
||||||
apcupsd_nis_master_hostname: pve2.grote.lan
|
apcupsd_nis_master_hostname: pve2.grote.lan
|
||||||
|
|
|
@ -9,4 +9,5 @@ Richtet regelmaessige Scrubs(jeden Sonntag) ein.
|
||||||
|
|
||||||
### Variablen + Defaults
|
### Variablen + Defaults
|
||||||
- see [defaults](./defaults/main.yml)
|
- 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_*
|
- Variablen für mgrote.zfs_health/trim/scrub/zed/arc_mem/ sind zusammengefasst unter zfs_extra_*
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
name: zfs-scrub - "{{ item.name }}"
|
name: zfs-scrub - "{{ item.name }}"
|
||||||
state: present
|
state: present
|
||||||
job: "{{ zfs_extra_path_zpool }} scrub {{ item.name }}"
|
job: "{{ zfs_extra_path_zpool }} scrub {{ item.name }}"
|
||||||
weekday: "{{ item.cron_weekday_zfs_scrub }}"
|
month: "{{ item.cron_month_zfs_scrub | default('*') }}"
|
||||||
minute: "{{ item.cron_minutes_zfs_scrub }}"
|
weekday: "{{ item.cron_day_of_week_zfs_scrub | default('7') }}"
|
||||||
hour: "{{ item.cron_hour_zfs_scrub }}"
|
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 }}"
|
with_items: "{{ zfs_extra_zfs_pools }}"
|
||||||
|
|
Loading…
Reference in a new issue