Skip to main content
mbenvenuti
Staff
Staff
March 4, 2026

Technical Tip: How to compact ETCD revision to gain space

  • March 4, 2026
  • 0 replies
  • 430 views
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:

 

  1. Check the ETCD data usage.

 

ETCDCTL_API=3 etcdctl endpoint status --write-out=json | jq '.[0].Status.dbSizeInUse'

573440

 

  1. Identify the revision to compact.

 

export ETCDCTL_API=3

REV=$(etcdctl get "" --prefix --keys-only -w json | jq -r '.header.revision')

SAFE_REV=$((REV - 1))

 

echo $SAFE_REV

4516337

 

  1. Compact revision.

 

etcdctl compact $SAFE_REV

compacted revision 4516337

 

  1. Check ETCD data usage.

 

ETCDCTL_API=3 etcdctl endpoint status --write-out=json | jq '.[0].Status.dbSizeInUse'

36864

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.