1. Immediate Recovery (Disk Expansion)
If the environment supports dynamic volume expansion (e.g., Kubernetes with PVCs):
- Expand PVC: Update the Persistent Volume Claim (PVC) size for the affected StatefulSet.
- Rolling Restart: Perform a rolling restart of the StatefulSet pods to trigger the underlying filesystem expansion.
bash
kubectl rollout restart statefulset <rabbitmq-cluster-name>
- Verify Expansion: Once the pods are back in a Running state, verify the new disk size:
bash
kubectl exec <pod-name> -- df -h /var/lib/rabbitmq
Prevention
- Monitor Disk Alarms: Ensure disk_free_limit is configured and monitored to block publishers before the disk is completely full.
- Over-provisioning: Always over-provision disk space when using Quorum Queues, as they require significant overhead for WAL and segment files.