homeserver/host_vars/pve2-test2.grote.lan.yml
mg f305b9c48d zfs: Neuaufbau rpool (#387)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#387
2022-06-26 13:32:42 +02:00

47 lines
2 KiB
YAML

---
# mgrote.zfs_manage_datasets
## rpool
### sudo zpool create -f -o ashift=12 -o feature@encryption=enabled -O encryption=on -O keylocation=prompt -O keyformat=passphrase rpool mirror /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi3 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi5 mirror /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi4 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi10
## HDD_DATA_RAIDZ
### sudo zpool create -o ashift=12 -o feature@encryption=enabled -O encryption=on -O keylocation=prompt -O keyformat=passphrase hdd_data_raidz mirror /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi8 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi9
zfs_datasets: # DatenPools werden hier nicht verwaltet
- dataset: rpool
state: present
compression: zstd
sync: disabled
xattr: sa
dnodesize: auto
atime: on
snapdir: hidden
reservation: 1G
- dataset: rpool/vm
state: present
- dataset: rpool/vm/dir
state: present
- dataset: rpool/vm/zvol
state: present
- dataset: hdd_data_raidz/snapshot_test
state: present
### mgrote.zfs_extra # Variablen für mgrote.zfs_health/trim/scrub/zed/arc_mem/ sind zusammengefasst unter zfs_extra_*
zfs_extra_arc_max_size: "2147483648" # 2GB in Bytes
zfs_extra_zfs_pools:
- name: "rpool"
systemd_timer_schedule: "*-01,04,07,10-01 23:00"
- name: "hdd_vm_mirror"
systemd_timer_schedule: "*-01,04,07,10-01 23:00"
### mgrote.cv4pve-autosnap
cv4pve_api_user: root@pam!cv4pve-autosnap
cv4pve_api_token: "{{ lookup('keepass', 'cv4pve_api_token_pve2-test2', 'password') }}"
cv4pve_vmid: all,-127,-112,-100,-116,-105
cv4pve_keep_snapshots: 5
cv4pve_dl_link: "https://github.com/Corsinvest/cv4pve-autosnap/releases/download/v1.10.0/cv4pve-autosnap-linux-x64.zip"
### mgrote.zfs_sanoid
sanoid_datasets:
- path: 'hdd_data_raidz/snapshot_test'
template: '14tage'
recursive: 'yes'
snapshots: true