diff --git a/infrastructure-control.prose.md b/infrastructure-control.prose.md index 26c9a0f..852fc86 100644 --- a/infrastructure-control.prose.md +++ b/infrastructure-control.prose.md @@ -381,16 +381,23 @@ Two incidents from 2026-09-13/14 demonstrate that backup operations can catastro Before starting ANY snapshot-mode vzdump on a host whose storage is an LVM thin pool, the following checks MUST pass: ```bash -# Check 1: Pool headroom -dmsetup status pve-data-tpool | awk '{print $4, $6}' # data_percent metadata_percent -lvs -o lv_name,data_percent,metadata_percent,lv_size pve-data-tpool - +# Check 1: Pool headroom (PRIMARY - yields percentages directly) +lvs -o lv_name,data_percent,metadata_percent,lv_size pve/data +# Example output (acerpve): +# LV Data% Meta% LSize +# data 29.95 1.22 <816.21g # Required thresholds (documented minimum): # data_percent < 90% (80% recommended for safety margin) # metadata_percent < 70% (metadata fills faster than data) -# Check 2: Verify pool is not in error state +# Check 2: Verify pool is not in error state (dmsetup shows the raw DM device) dmsetup status pve-data-tpool | grep -q "Error\|Fail" && exit 1 +# dmsetup output fields: / / +# $4 is transaction ID (99), NOT a percentage +# Example: 0 99 26676/2183168 4005020/13372736 +# Use $5 and $6 to calculate percentages if needed: +# data_percent = $6 / ($6 split by /) [second number in pair] +# metadata_percent = $5 / ($5 split by /) [second number in pair] ``` **Minimum thresholds**: If either `data_percent >= 90%` or `metadata_percent >= 70%`, the backup MUST NOT start. State explicitly that these are hard stops, not warnings.