Technical Tip: How to compact ETCD revision to gain space
| Description | This article describes how to compact the ETCD revision to gain space. |
| Scope | FortiSIEM. |
| Solution | When a NOSPACE error is frequently met by the ETCD service, it is possible to compact the revision to gain space and resolve it.
Follow these steps on any of the supervisor nodes of the HA cluster:
ETCDCTL_API=3 etcdctl endpoint status --write-out=json | jq '.[0].Status.dbSizeInUse' 573440
export ETCDCTL_API=3 REV=$(etcdctl get "" --prefix --keys-only -w json | jq -r '.header.revision') SAFE_REV=$((REV - 1))
echo $SAFE_REV 4516337
etcdctl compact $SAFE_REV compacted revision 4516337
ETCDCTL_API=3 etcdctl endpoint status --write-out=json | jq '.[0].Status.dbSizeInUse' 36864 |
