diff --git a/group_vars/fileserver.yml b/group_vars/fileserver.yml index 0c4e1f21..af06df20 100644 --- a/group_vars/fileserver.yml +++ b/group_vars/fileserver.yml @@ -64,7 +64,7 @@ users_ro: 'win10' users_rw: 'annemariedroessler michaelgrote' - name: 'proxmox' - path: '/shares/proxmox' + path: '/shares_pve_backup' users_ro: 'win10 michaelgrote' users_rw: 'pve' smb_workgroup: WORKGROUP diff --git a/host_vars/pve2.grote.lan.yml b/host_vars/pve2.grote.lan.yml index f5308f08..31605a2c 100644 --- a/host_vars/pve2.grote.lan.yml +++ b/host_vars/pve2.grote.lan.yml @@ -40,6 +40,14 @@ dnodesize: auto atime: on snapdir: hidden + - dataset: hdd_data_raidz/pve_backup + state: present + compression: lz4 + sync: disabled + xattr: sa + dnodesize: auto + atime: on + snapdir: hidden ### mgrote.apcupsd apcupsd_nis_master: true apcupsd_nis_master_hostname: pve2.grote.lan @@ -65,12 +73,16 @@ cron_hour_zfs_scrub: "23" ### mgrote.zfs_sanoid sanoid_datasets: - - path: 'hdd_data_raidz/videos' - template: 'hourly' # muss in Templates angelegt sein - recursive: ' yes' - path: 'hdd_data_raidz/data_crypt' template: 'fiveminutes' - recursive: ' yes' + recursive: 'no' + snapshots: true + - path: 'hdd_data_raidz/videos' + template: 'hourly' + recursive: 'yes' + snapshots: true + - path: 'hdd_data_raidz/pve_backup' + snapshots: false # deaktiviert sanoid für das dataset sanoid_templates: - name: 'fiveminutes' keep_hourly: '24' # Aufheben (Stunde) diff --git a/roles/mgrote.zfs_sanoid/defaults/main.yml b/roles/mgrote.zfs_sanoid/defaults/main.yml index a0d82c14..7c8e6278 100644 --- a/roles/mgrote.zfs_sanoid/defaults/main.yml +++ b/roles/mgrote.zfs_sanoid/defaults/main.yml @@ -7,10 +7,14 @@ sanoid_datasets: - path: 'hdd_data_raidz/data' template: 'fiveminutes' - recursive: ' no' + recursive: 'no' + snapshots: true - path: 'hdd_data_raidz/videos' template: 'hourly' - recursive: ' yes' + recursive: 'yes' + snapshots: true + - path: 'hdd_data_raidz/test' + snapshots: false # deaktiviert sanoid für das dataset ### Templates sanoid_templates: diff --git a/roles/mgrote.zfs_sanoid/templates/sanoid.conf.j2 b/roles/mgrote.zfs_sanoid/templates/sanoid.conf.j2 index a0bea3c2..cd4f0c29 100644 --- a/roles/mgrote.zfs_sanoid/templates/sanoid.conf.j2 +++ b/roles/mgrote.zfs_sanoid/templates/sanoid.conf.j2 @@ -1,10 +1,12 @@ {{ file_header | default () }} ## ZFS Section -------------------------------- ## -{% for item in sanoid_datasets %} +{% for item in sanoid_datasets if item.snapshots is sameas true %} +{% if item.snapshots is sameas true %} [{{ item.path }}] use_template = {{ item.template }} recursive = {{ item.recursive }} ## -------------------------------------------- ## +{% endif %} {% endfor %}