Cassandra Disk full

A node's disk is full, preventing further writes.

Understanding Apache Cassandra

Apache Cassandra is a highly scalable, distributed NoSQL database designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. It is widely used for its ability to manage large datasets across multiple nodes with ease, ensuring data redundancy and fault tolerance.

Identifying the Symptom: Disk Full

One common issue encountered in Cassandra is the 'Disk full' error. This occurs when a node's disk space is completely utilized, preventing further writes to the database. This can lead to degraded performance and potential data loss if not addressed promptly.

Observed Error

When the disk is full, you might observe errors in the logs such as:

ERROR [CompactionExecutor:1] 2023-10-01 12:00:00,000 CassandraDaemon.java:123 - Out of disk space, unable to write data

Exploring the Issue: Disk Full

The 'Disk full' issue arises when the storage capacity allocated to a Cassandra node is exhausted. This can happen due to several reasons such as high write throughput, inadequate disk space allocation, or lack of regular maintenance tasks like compaction and cleanup.

Root Causes

  • High volume of write operations leading to rapid disk consumption.
  • Insufficient disk space allocated during initial setup.
  • Lack of regular maintenance tasks such as compaction and cleanup.

Steps to Resolve the Disk Full Issue

To resolve the 'Disk full' issue, you can follow these steps:

1. Free Up Disk Space

Identify and remove unnecessary files or data from the disk. This can include old snapshots, logs, or temporary files. Use the following command to list and remove old snapshots:

nodetool clearsnapshot

2. Add Additional Storage

If freeing up space is not sufficient, consider adding additional storage to the node. This might involve attaching new disks or expanding existing volumes.

3. Perform Regular Maintenance

Ensure regular maintenance tasks are scheduled, such as:

  • Compaction: nodetool compact
  • Cleanup: nodetool cleanup

Additional Resources

For more detailed information on managing disk space in Cassandra, refer to the following resources:

Never debug

Cassandra

manually again

Let Dr. Droid create custom investigation plans for your infrastructure.

Start Free POC (15-min setup) →
Automate Debugging for
Cassandra
See how Dr. Droid creates investigation plans for your infrastructure.

MORE ISSUES

Made with ❤️ in Bangalore & San Francisco 🏢

Doctor Droid