apache/cassandra · error · ConfigurationException

local_system_data_file_directory must not be the same as the

Error message

local_system_data_file_directory must not be the same as the hints_directory

What it means

DatabaseDescriptor.applySimpleConfig throws this ConfigurationException when local_system_data_file_directory equals hints_directory. Cassandra requires hints storage and local system data storage to live on different configured paths so that hint replay and system-table access are isolated and each volume's free-space check (e.g. the ONE_GIB warning) applies to a dedicated volume.

Source

Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:912

            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));
        }

        if (conf.commitlog_directory.equals(conf.accord.journal_directory))
            throw new ConfigurationException("accord.journal_directory must not be the same as the commitlog_directory", false);
        if (conf.commitlog_directory.equals(conf.hints_directory))
            throw new ConfigurationException("hints_directory must not be the same as the commitlog_directory", false);
        if (conf.commitlog_directory.equals(conf.saved_caches_directory))
            throw new ConfigurationException("saved_caches_directory must not be the same as the commitlog_directory", false);

        if (conf.accord.journal_directory.equals(conf.hints_directory))
            throw new ConfigurationException("hints_directory must not be the same as the accord.journal_directory", false);
        if (conf.accord.journal_directory.equals(conf.saved_caches_directory))

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Set hints_directory to a different path in cassandra.yaml.
  2. Use distinct subdirectories under the same mount if only one disk is available.
  3. Remove the explicit local_system_data_file_directory setting if you do not need a dedicated local system data volume.

Example fix

// before (cassandra.yaml)
local_system_data_file_directory: /data/cassandra
hints_directory: /data/cassandra
// after
local_system_data_file_directory: /data/cassandra/local_system
hints_directory: /data/cassandra/hints
Defensive patterns

Strategy: validation

Validate before calling

if (cfg.local_system_data_file_directory != null && cfg.local_system_data_file_directory.equals(cfg.hints_directory))
    throw new IllegalArgumentException("local_system_data_file_directory must differ from hints_directory");

Type guard

boolean dirsDistinct(String a, String b) { return a == null || b == null || !new File(a).getAbsolutePath().equals(new File(b).getAbsolutePath()); }

Try / catch

try { DatabaseDescriptor.applyAll(cfg); } catch (ConfigurationException e) { logger.error("Directory collision: {}", e.getMessage()); System.exit(1); }

Prevention

When it happens

Trigger: Set cassandra.yaml local_system_data_file_directory to the same path as hints_directory and start the node; validation runs during applySimpleConfig (toolInitialization/applyAll).

Common situations: Hints directory reconfigured to save disk but accidentally matched to the local system data path; single-volume container deployments where every directory key was set to one mount path.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/9330275e40a615ff. Report an issue: GitHub.