apache/cassandra · warning
Only {} free across all data volumes. Consider adding more c
Error message
Only {} free across all data volumes. Consider adding more capacity to your cluster or removing obsolete snapshots What it means
At startup DatabaseDescriptor sums the unallocated space (File.getUnallocatedSpace) across all data_file_directories and warns if the total is below 64 GiB. Cassandra needs working room for compactions, hints, and snapshots; critically low free space risks failed writes and compactions, so this is an early capacity warning.
Source
Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:900
for (String datadir : conf.data_file_directories)
{
if (datadir == null)
throw new ConfigurationException("data_file_directories must not contain empty entry", false);
if (datadir.equals(conf.local_system_data_file_directory))
throw new ConfigurationException("local_system_data_file_directory must not be the same as any data_file_directories", false);
if (datadir.equals(conf.commitlog_directory))
throw new ConfigurationException("commitlog_directory must not be the same as any data_file_directories", false);
if (datadir.equals(conf.accord.journal_directory))
throw new ConfigurationException("accord.journal_directory must not be the same as any data_file_directories", false);
if (datadir.equals(conf.hints_directory))
throw new ConfigurationException("hints_directory must not be the same as any data_file_directories", false);
if (datadir.equals(conf.saved_caches_directory))
throw new ConfigurationException("saved_caches_directory must not be the same as any data_file_directories", false);
dataFreeBytes = saturatedSum(dataFreeBytes, tryGetSpace(datadir, FileStore::getUnallocatedSpace));
}
if (dataFreeBytes < 64 * ONE_GIB) // 64 GB
logger.warn("Only {} free across all data volumes. Consider adding more capacity to your cluster or removing obsolete snapshots",
FBUtilities.prettyPrintMemory(dataFreeBytes));
if (conf.local_system_data_file_directory != null)
{
if (conf.local_system_data_file_directory.equals(conf.commitlog_directory))
throw new ConfigurationException("local_system_data_file_directory must not be the same as the commitlog_directory", false);
if (conf.local_system_data_file_directory.equals(conf.accord.journal_directory))
throw new ConfigurationException("local_system_data_file_directory must not be the same as the accord.journal_directory", false);
if (conf.local_system_data_file_directory.equals(conf.saved_caches_directory))
throw new ConfigurationException("local_system_data_file_directory must not be the same as the saved_caches_directory", false);
if (conf.local_system_data_file_directory.equals(conf.hints_directory))
throw new ConfigurationException("local_system_data_file_directory must not be the same as the hints_directory", false);
long freeBytes = tryGetSpace(conf.local_system_data_file_directory, FileStore::getUnallocatedSpace);
if (freeBytes < ONE_GIB)
logger.warn("Only {} free in the system data volume. Consider adding more capacity or removing obsolete snapshots",
FBUtilities.prettyPrintMemory(freeBytes));View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Free space by removing obsolete snapshots (nodetool clearsnapshot) and compacting/cleaning expired data
- Add storage capacity or more nodes to the cluster
- If the node is intentionally tiny (dev only), ignore or silence the warning — it is non-fatal
Example fix
// before (shell) nodetool listsnapshots # many old snapshots, disk at 50 GiB free // after nodetool clearsnapshot # frees space; warning disappears on next startup
Defensive patterns
Strategy: validation
Validate before calling
long totalFree = 0;
for (String dir : config.data_file_directories) {
try { totalFree = Math.addExact(totalFree, new File(dir).getUsableSpace()); }
catch (Exception e) { /* ignore unreadable dir */ }
}
if (totalFree < 64L * 1024 * 1024 * 1024) logger.warn("Only {} free across data volumes", totalFree); Try / catch
try { DatabaseDescriptor.applySimpleConfig(conf); } catch (ConfigurationException e) { /* directory collisions/misconfig surface here, not the space warning */ } Prevention
- Set disk-usage alerts well below 100% on data volumes
- Schedule nodetool clearsnapshot and monitor snapshot buildup
- Size volumes to keep >= 64 GiB free on data directories
When it happens
Trigger: applySimpleConfig computes dataFreeBytes as the saturated sum of getUnallocatedSpace over every data directory and it comes out < 64 * 1 GiB; the warning names the pretty-printed free amount.
Common situations: Small dev/test VMs or containers with < 64 GiB disks, production clusters nearly full where old snapshots were never cleared (nodetool clearsnapshot), or over-provisioned node counts on thin volumes.
Related errors
- Not enough space to write %s to %s (%s available)
- Not enough disk space to store %s
- Cannot DROP COMPACT STORAGE as some nodes in the cluster (%s
- No configured data directory contains enough space to write
- Not enough space for compaction (%s) of %s.%s, estimated sst
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/a66a36e4210300a6.
Report an issue: GitHub.