zfs-tools: MaxCap parametrisiert (#6)

zfs-tools: MaxCap parametrisiert

Co-authored-by: Michael Grote <38253905+quotengrote@users.noreply.github.com>
Reviewed-on: mg/ansible#6
This commit is contained in:
Michael Grote 2020-12-19 11:50:55 +01:00
parent ffe99130f9
commit b96545ba03
3 changed files with 5 additions and 3 deletions

View file

@ -14,8 +14,6 @@ Deaktiviert das mitinstallierte scrub-Script in /etc/cron.d/zfsutils-linux.
### Variablen + Defaults ### Variablen + Defaults
##### Wer soll die Mails bekommen ##### Wer soll die Mails bekommen
empfaenger_mail: michael.grote@posteo.de empfaenger_mail: michael.grote@posteo.de
##### name des zu ueberwachenden Pools -
- [ ] pruefen ob auch mehrere Pools gehen
zfs_pool: zfs_vm_mirror zfs_pool: zfs_vm_mirror
##### Maximale Groesse ARC in Bytes ##### Maximale Groesse ARC in Bytes
Beim aendern wird die Zeile einmal mit dem alten Wert und dem neuen Wert in die Zeile eingefuegt! Beim aendern wird die Zeile einmal mit dem alten Wert und dem neuen Wert in die Zeile eingefuegt!
@ -34,3 +32,5 @@ Trim: Minute, Stunde, Monat, Tag des Monats
Scrub: Wochentag, Minute, Stunde Scrub: Wochentag, Minute, Stunde
##### Pfad zu zpool-binary ##### Pfad zu zpool-binary
pfad_zu_zpool: "/usr/sbin/zpool" pfad_zu_zpool: "/usr/sbin/zpool"
##### Füllstand für Warnmail
zfs_tool_max_cap: "80"

View file

@ -15,3 +15,5 @@ cron_month_zfs_trim: "4,8,12"
cron_day_zfs_trim: "2" cron_day_zfs_trim: "2"
pfad_zu_zpool: "/usr/sbin/zpool" pfad_zu_zpool: "/usr/sbin/zpool"
zfs_tool_max_cap: "80"

View file

@ -19,7 +19,7 @@ fi
# SSD then 80% is reasonable. If you have a 60TB raid-z2 array then you can # SSD then 80% is reasonable. If you have a 60TB raid-z2 array then you can
# probably set the warning closer to 95%. # probably set the warning closer to 95%.
maxCapacity=70 maxCapacity= {{ zfs_tool_max_cap }}
if [ ${problems} -eq 0 ]; then if [ ${problems} -eq 0 ]; then
capacity=$(/sbin/zpool list -H -o capacity) capacity=$(/sbin/zpool list -H -o capacity)