Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Kafka Disk or Log-Directory Failure

Use this playbook for disk exhaustion, inode exhaustion, high I/O latency, missing mounts, read-only filesystems, or KafkaStorageException/LogDirFailureException.

Terminal window
kafka-log-dirs.sh --bootstrap-server kafka:9092 --describe
df -h /var/lib/kafka
df -i /var/lib/kafka
findmnt /var/lib/kafka
iostat -xz 1 10
journalctl -k --since "30 minutes ago"

Record the directory ID, affected replicas, device, mount source/options, capacity and inode use, latency, kernel errors, and recent storage changes.

  • Stop unrelated processes from consuming the volume.
  • Prevent new replica placement by cordoning the affected directory or broker.
  • Preserve Kafka and kernel logs before restarting.
  • If the root filesystem is filling, confirm Kafka did not start against an empty fallback directory after a mount failed.
SymptomCheck
100% bytesRetention, unexpected growth, missing tiered-copy progress, other files
100% inodesSegment count, tiny files, non-Kafka files
High await/utilizationDevice saturation, noisy neighbor, compaction, reassignments
Read-only mountKernel/filesystem error and device health
Permission failureOwnership, mode, security policy, mount change
One failed directoryDevice and directory-specific replicas, not only broker health

Evacuate replicas through reassignment when the directory remains readable. Replace the failed device or mount, then initialize only the replacement directory according to the broker storage procedure. Let Kafka rebuild replicas from healthy leaders.

Danger

Do not delete segment, index, checkpoint, or meta.properties files while Kafka is running. Do not copy arbitrary partition files into another live replica, and never run fsck on a mounted filesystem.

  • The intended mount is present after restart.
  • kafka-log-dirs.sh reports no directory error.
  • Replicas catch up and ISR returns to normal.
  • Disk latency, space, and inode growth remain within thresholds.
  • Temporary cordons and reassignment throttles are removed deliberately.

See cluster management for directory evacuation.