Automation · Storage Automation
ZFS Automation
Cheat sheet · https://pcornel.dk/topic.php?topic=5748
Answer
ZFS automation creates pools and datasets with zpool and zfs, sets properties like compression and quotas, schedules snapshots and scrubs and replicates with zfs send/receive or syncoid.
Remember
- zpool and zfs commands manage pools and datasets.
- Set properties like compression and quotas.
- Schedule snapshots and replication.
First checks
ansible <h> -m community.general.zfs -a 'name=<pool>/<ds> state=present extra_zfs_properties={compression: lz4}' --check— datasetzfs list -o name,used,avail,compression— verify- Pool capacity check (<80 %) — safety
Commands
zpool status
Verify in this order
desired dataset → zfs module → properties
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5748