datasets angepasst

This commit is contained in:
Michael Grote 2021-02-12 22:26:26 +01:00
parent 1f402ff5bd
commit dc6dea5e78
10 changed files with 98 additions and 22 deletions

View file

@ -5,13 +5,13 @@
# zfs create hdd_data_raidz/videos # zfs create hdd_data_raidz/videos
# Pools müssen vorher erstellt sein! # Pools müssen vorher erstellt sein!
# SSD_VM_MIRROR # SSD_VM_MIRROR
# zpool create -f -o ashift=12 ssd_vm_mirror mirror /dev/disk/by-id/ata-ADATA_SU650_2J4420001210 /dev/disk/by-id/ata-ADATA_SU650_2J4420001241 # zpool create -f -o ashift=12 rpool mirror /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi8 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi7
# HDD_VM_MIRROR # HDD_VM_MIRROR
# zpool create -f -o ashift=12 hdd_vm_mirror mirror /dev/disk/by-id/ata-WDC_WD20EACS-11BHUB0_WD-WCAZA3124223 /dev/disk/by-id/ata-WDC_WD20EZRX-00D8PB0_WD-WMC4M1682516 mirror /dev/disk/by-id/ata-WDC_WD30EZRX-00DC0B0_WD-WMC1T3979908 /dev/disk/by-id/ata-TOSHIBA_DT01ACA300_83M2DRAKS # zpool create -f -o ashift=12 hdd_vm_mirror mirror /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1 mirror /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi6 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi5
# HDD_DATA_RAIDZ # HDD_DATA_RAIDZ
# zpool create -f -o ashift=12 hdd_data_raidz raidz /dev/disk/by-id/ata-WDC_WD80EZAZ-11TDBA0_2SG991TJ /dev/disk/by-id/ata-WDC_WD80EZAZ-11TDBA0_2SGA23EJ /dev/disk/by-id/ata-ST8000DM004-2CX188_ZCT1AK0F # zpool create -f -o ashift=12 hdd_data_raidz raidz /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi9 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi3 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi4
zfs_datasets: zfs_datasets:
- dataset: ssd_vm_mirror/vm - dataset: rpool/vm/dir
state: present state: present
compression: lz4 compression: lz4
sync: disabled sync: disabled
@ -19,7 +19,7 @@
dnodesize: auto dnodesize: auto
atime: on atime: on
snapdir: hidden snapdir: hidden
- dataset: hdd_vm_mirror/vm - dataset: rpool/vm/zvol
state: present state: present
compression: lz4 compression: lz4
sync: disabled sync: disabled
@ -27,6 +27,15 @@
dnodesize: auto dnodesize: auto
atime: on atime: on
snapdir: hidden snapdir: hidden
- dataset: rpool/vm/qcow
state: present
compression: lz4
sync: disabled
xattr: sa
dnodesize: auto
atime: on
snapdir: hidden
### mgrote.apcupsd ### mgrote.apcupsd
apcupsd_nis_master: true apcupsd_nis_master: true
apcupsd_nis_master_hostname: pve2-test.grote.lan apcupsd_nis_master_hostname: pve2-test.grote.lan

View file

@ -4,14 +4,14 @@
# zfs create -o encryption=aes-256-gcm -o keyformat=passphrase hdd_data_raidz/data_crypt # zfs create -o encryption=aes-256-gcm -o keyformat=passphrase hdd_data_raidz/data_crypt
# zfs create hdd_data_raidz/videos # zfs create hdd_data_raidz/videos
# Pools müssen vorher erstellt sein! # Pools müssen vorher erstellt sein!
# SSD_VM_MIRROR # rpool
# zpool create -f -o ashift=12 ssd_vm_mirror mirror /dev/disk/by-id/ata-ADATA_SU650_2J4420001210 /dev/disk/by-id/ata-ADATA_SU650_2J4420001241 # zpool create -f -o ashift=12 rpool mirror /dev/disk/by-id/ata-ADATA_SU650_2J4420001210 /dev/disk/by-id/ata-ADATA_SU650_2J4420001241
# HDD_VM_MIRROR # HDD_VM_MIRROR
# zpool create -f -o ashift=12 hdd_vm_mirror mirror /dev/disk/by-id/ata-WDC_WD20EACS-11BHUB0_WD-WCAZA3124223 /dev/disk/by-id/ata-WDC_WD20EZRX-00D8PB0_WD-WMC4M1682516 mirror /dev/disk/by-id/ata-WDC_WD30EZRX-00DC0B0_WD-WMC1T3979908 /dev/disk/by-id/ata-TOSHIBA_DT01ACA300_83M2DRAKS # zpool create -f -o ashift=12 hdd_vm_mirror mirror /dev/disk/by-id/ata-WDC_WD20EACS-11BHUB0_WD-WCAZA3124223 /dev/disk/by-id/ata-WDC_WD20EZRX-00D8PB0_WD-WMC4M1682516 mirror /dev/disk/by-id/ata-WDC_WD30EZRX-00DC0B0_WD-WMC1T3979908 /dev/disk/by-id/ata-TOSHIBA_DT01ACA300_83M2DRAKS
# HDD_DATA_RAIDZ # HDD_DATA_RAIDZ
# zpool create -f -o ashift=12 hdd_data_raidz raidz /dev/disk/by-id/ata-WDC_WD80EZAZ-11TDBA0_2SG991TJ /dev/disk/by-id/ata-WDC_WD80EZAZ-11TDBA0_2SGA23EJ /dev/disk/by-id/ata-ST8000DM004-2CX188_ZCT1AK0F # zpool create -f -o ashift=12 hdd_data_raidz raidz /dev/disk/by-id/ata-WDC_WD80EZAZ-11TDBA0_2SG991TJ /dev/disk/by-id/ata-WDC_WD80EZAZ-11TDBA0_2SGA23EJ /dev/disk/by-id/ata-ST8000DM004-2CX188_ZCT1AK0F
zfs_datasets: zfs_datasets:
- dataset: ssd_vm_mirror/vm - dataset: rpool/vm/dir
state: present state: present
compression: lz4 compression: lz4
sync: disabled sync: disabled
@ -19,7 +19,15 @@
dnodesize: auto dnodesize: auto
atime: on atime: on
snapdir: hidden snapdir: hidden
- dataset: hdd_vm_mirror/vm - dataset: rpool/vm/zvol
state: present
compression: lz4
sync: disabled
xattr: sa
dnodesize: auto
atime: on
snapdir: hidden
- dataset: rpool/vm/qcow
state: present state: present
compression: lz4 compression: lz4
sync: disabled sync: disabled
@ -91,5 +99,5 @@
cv4pve_api_user: root@pam!cv4pve-autosnap cv4pve_api_user: root@pam!cv4pve-autosnap
cv4pve_api_token: "{{ lookup('keepass', 'cv4pve_api_token', 'password') }}" cv4pve_api_token: "{{ lookup('keepass', 'cv4pve_api_token', 'password') }}"
cv4pve_vmid: all,-109,-158,-123,-131 cv4pve_vmid: all,-109,-158,-123,-131
cv4pve_keed_snapshots: 3 cv4pve_keep_snapshots: 1
cv4pve_dl_link: "https://github.com/Corsinvest/cv4pve-autosnap/releases/download/v1.9.10/cv4pve-autosnap-linux-x64.zip" cv4pve_dl_link: "https://github.com/Corsinvest/cv4pve-autosnap/releases/download/v1.9.10/cv4pve-autosnap-linux-x64.zip"

View file

@ -2,7 +2,7 @@
### mgrote.zfs_manage_datasets ### mgrote.zfs_manage_datasets
# rppol wird von pve bei installation erstellt # rppol wird von pve bei installation erstellt
zfs_datasets: zfs_datasets:
- dataset: rpool/vm - dataset: rpool/vm/dir
state: present state: present
compression: lz4 compression: lz4
sync: disabled sync: disabled
@ -10,7 +10,22 @@
dnodesize: auto dnodesize: auto
atime: on atime: on
snapdir: hidden snapdir: hidden
### mgrote.zfs_tools_cron - dataset: rpool/vm/zvol
state: present
compression: lz4
sync: disabled
xattr: sa
dnodesize: auto
atime: on
snapdir: hidden
- dataset: rpool/vm/qcow
state: present
compression: lz4
sync: disabled
xattr: sa
dnodesize: auto
atime: on
snapdir: hidden ### mgrote.zfs_tools_cron
zfs_arc_max: "12884901888" zfs_arc_max: "12884901888"
zfs_pools: zfs_pools:
- name: "rpool" - name: "rpool"

View file

@ -2,7 +2,7 @@
### mgrote.zfs_manage_datasets ### mgrote.zfs_manage_datasets
# rppol wird von pve bei installation erstellt # rppol wird von pve bei installation erstellt
zfs_datasets: zfs_datasets:
- dataset: rpool/vm - dataset: rpool/vm/dir
state: present state: present
compression: lz4 compression: lz4
sync: disabled sync: disabled
@ -10,7 +10,22 @@
dnodesize: auto dnodesize: auto
atime: on atime: on
snapdir: hidden snapdir: hidden
### mgrote.zfs_tools_cron - dataset: rpool/vm/zvol
state: present
compression: lz4
sync: disabled
xattr: sa
dnodesize: auto
atime: on
snapdir: hidden
- dataset: rpool/vm/qcow
state: present
compression: lz4
sync: disabled
xattr: sa
dnodesize: auto
atime: on
snapdir: hidden ### mgrote.zfs_tools_cron
zfs_arc_max: "12884901888" zfs_arc_max: "12884901888"
zfs_pools: zfs_pools:
- name: "rpool" - name: "rpool"

View file

@ -2,7 +2,7 @@
### mgrote.zfs_manage_datasets ### mgrote.zfs_manage_datasets
# rppol wird von pve bei installation erstellt # rppol wird von pve bei installation erstellt
zfs_datasets: zfs_datasets:
- dataset: rpool/vm - dataset: rpool/vm/dir
state: present state: present
compression: lz4 compression: lz4
sync: disabled sync: disabled
@ -10,7 +10,22 @@
dnodesize: auto dnodesize: auto
atime: on atime: on
snapdir: hidden snapdir: hidden
### mgrote.zfs_tools_cron - dataset: rpool/vm/zvol
state: present
compression: lz4
sync: disabled
xattr: sa
dnodesize: auto
atime: on
snapdir: hidden
- dataset: rpool/vm/qcow
state: present
compression: lz4
sync: disabled
xattr: sa
dnodesize: auto
atime: on
snapdir: hidden ### mgrote.zfs_tools_cron
zfs_arc_max: "12884901888" zfs_arc_max: "12884901888"
zfs_pools: zfs_pools:
- name: "rpool" - name: "rpool"

View file

@ -2,7 +2,23 @@
### mgrote.zfs_manage_datasets ### mgrote.zfs_manage_datasets
# rppol wird von pve bei installation erstellt # rppol wird von pve bei installation erstellt
zfs_datasets: zfs_datasets:
- dataset: rpool/vm - dataset: rpool/vm/dir
state: present
compression: lz4
sync: disabled
xattr: sa
dnodesize: auto
atime: on
snapdir: hidden
- dataset: rpool/vm/zvol
state: present
compression: lz4
sync: disabled
xattr: sa
dnodesize: auto
atime: on
snapdir: hidden
- dataset: rpool/vm/qcow
state: present state: present
compression: lz4 compression: lz4
sync: disabled sync: disabled

View file

@ -31,7 +31,6 @@ all:
testeinzeln: testeinzeln:
hosts: hosts:
vm-test.grote.lan: vm-test.grote.lan:
lxc-test2.grote.lan:
proxmox: proxmox:
hosts: hosts:
pve2-test.grote.lan: pve2-test.grote.lan:
@ -85,7 +84,6 @@ all:
ansible-test.grote.lan: ansible-test.grote.lan:
docker-test.grote.lan: docker-test.grote.lan:
vm-test.grote.lan: vm-test.grote.lan:
lxc-test2.grote.lan:
pve2-test.grote.lan: pve2-test.grote.lan:
pve3-test.grote.lan: pve3-test.grote.lan:
pve4-test.grote.lan: pve4-test.grote.lan:

View file

@ -21,4 +21,4 @@ Legt einen cronjob und das logfile an.
##### VMs ##### VMs
cv4pve_vmid: all cv4pve_vmid: all
##### Anzahl Snpshots zum aufheben ##### Anzahl Snpshots zum aufheben
cv4pve_keed_snapshots: 3 cv4pve_keep_snapshots: 3

View file

@ -5,4 +5,4 @@
cv4pve_api_token: "XXXXXXXXXXXXXXXXXXXXXX" cv4pve_api_token: "XXXXXXXXXXXXXXXXXXXXXX"
cv4pve_api_user: "root@pam!test2" cv4pve_api_user: "root@pam!test2"
cv4pve_vmid: all cv4pve_vmid: all
cv4pve_keed_snapshots: 3 cv4pve_keep_snapshots: 3

View file

@ -16,7 +16,7 @@ function unlock() {
exlock exlock
( (
echo $(date) echo $(date)
/usr/local/bin/cv4pve/cv4pve-autosnap --host=127.0.0.1 --api-token {{ cv4pve_api_user }}={{ cv4pve_api_token }} --vmid="{{ cv4pve_vmid }}" snap --label='daily' --keep="{{ cv4pve_keed_snapshots }}" --state /usr/local/bin/cv4pve/cv4pve-autosnap --host=127.0.0.1 --api-token {{ cv4pve_api_user }}={{ cv4pve_api_token }} --vmid="{{ cv4pve_vmid }}" snap --label='daily' --keep="{{ cv4pve_keep_snapshots }}" --state
/usr/local/bin/cv4pve/cv4pve-autosnap --host=127.0.0.1 --api-token {{ cv4pve_api_user }}={{ cv4pve_api_token }} --vmid="all" status /usr/local/bin/cv4pve/cv4pve-autosnap --host=127.0.0.1 --api-token {{ cv4pve_api_user }}={{ cv4pve_api_token }} --vmid="all" status
) >> /var/log/cv4pve-autosnap.log 2>&1 ) >> /var/log/cv4pve-autosnap.log 2>&1