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.
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.
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
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.
To resolve the 'Disk full' issue, you can follow these steps:
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
If freeing up space is not sufficient, consider adding additional storage to the node. This might involve attaching new disks or expanding existing volumes.
Ensure regular maintenance tasks are scheduled, such as:
nodetool compact
nodetool cleanup
For more detailed information on managing disk space in Cassandra, refer to the following resources:
Let Dr. Droid create custom investigation plans for your infrastructure.
Start Free POC (15-min setup) →