{"record":{"id":"6e8779b4ebdb6d88","repo":"apache/cassandra","slug":"local-system-data-file-directory-must-not-be-the-s-6e8779","errorCode":null,"errorMessage":"local_system_data_file_directory must not be the same as the accord.journal_directory","messagePattern":"local_system_data_file_directory must not be the same as the accord\\.journal_directory","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":908,"sourceCode":"            if (datadir.equals(conf.accord.journal_directory))\n                throw new ConfigurationException(\"accord.journal_directory must not be the same as any data_file_directories\", false);\n            if (datadir.equals(conf.hints_directory))\n                throw new ConfigurationException(\"hints_directory must not be the same as any data_file_directories\", false);\n            if (datadir.equals(conf.saved_caches_directory))\n                throw new ConfigurationException(\"saved_caches_directory must not be the same as any data_file_directories\", false);\n\n            dataFreeBytes = saturatedSum(dataFreeBytes, tryGetSpace(datadir, FileStore::getUnallocatedSpace));\n        }\n        if (dataFreeBytes < 64 * ONE_GIB) // 64 GB\n            logger.warn(\"Only {} free across all data volumes. Consider adding more capacity to your cluster or removing obsolete snapshots\",\n                        FBUtilities.prettyPrintMemory(dataFreeBytes));\n\n        if (conf.local_system_data_file_directory != null)\n        {\n            if (conf.local_system_data_file_directory.equals(conf.commitlog_directory))\n                throw new ConfigurationException(\"local_system_data_file_directory must not be the same as the commitlog_directory\", false);\n            if (conf.local_system_data_file_directory.equals(conf.accord.journal_directory))\n                throw new ConfigurationException(\"local_system_data_file_directory must not be the same as the accord.journal_directory\", false);\n            if (conf.local_system_data_file_directory.equals(conf.saved_caches_directory))\n                throw new ConfigurationException(\"local_system_data_file_directory must not be the same as the saved_caches_directory\", false);\n            if (conf.local_system_data_file_directory.equals(conf.hints_directory))\n                throw new ConfigurationException(\"local_system_data_file_directory must not be the same as the hints_directory\", false);\n\n            long freeBytes = tryGetSpace(conf.local_system_data_file_directory, FileStore::getUnallocatedSpace);\n\n            if (freeBytes < ONE_GIB)\n                logger.warn(\"Only {} free in the system data volume. Consider adding more capacity or removing obsolete snapshots\",\n                            FBUtilities.prettyPrintMemory(freeBytes));\n        }\n\n        if (conf.commitlog_directory.equals(conf.accord.journal_directory))\n            throw new ConfigurationException(\"accord.journal_directory must not be the same as the commitlog_directory\", false);\n        if (conf.commitlog_directory.equals(conf.hints_directory))\n            throw new ConfigurationException(\"hints_directory must not be the same as the commitlog_directory\", false);\n        if (conf.commitlog_directory.equals(conf.saved_caches_directory))\n            throw new ConfigurationException(\"saved_caches_directory must not be the same as the commitlog_directory\", false);","sourceCodeStart":890,"sourceCodeEnd":926,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L890-L926","documentation":"At startup Cassandra validates that all dedicated directories point to distinct filesystem paths. This ConfigurationException is thrown by DatabaseDescriptor.applySimpleConfig when the configured local_system_data_file_directory is identical to the accord.journal_directory, because both subsystems need independent write bandwidth and disk-space accounting; sharing a volume can corrupt capacity assumptions and starve Accord durable storage.","triggerScenarios":"Set cassandra.yaml local_system_data_file_directory to the exact same path string as accord.journal_directory, then start the node (or apply the config via ConfigHelper.applyAll / toolInitialization during config loading).","commonSituations":"Copy-pasting cassandra.yaml where several *_directory settings were left pointing to the same mount point; operators consolidating directories onto a single SSD; scripts that set both dirs to a common prefix like /var/lib/cassandra without distinguishing subpaths.","solutions":["Edit cassandra.yaml so local_system_data_file_directory and accord.journal_directory are different paths (e.g. /var/lib/cassandra/local_system vs /var/lib/cassandra/accord_journal).","If directories must share a filesystem, keep the configured path strings distinct (distinct subdirectories) — the check compares path equality, not device identity.","If local_system_data_file_directory is unnecessary, remove/comment it so this validation block is skipped entirely."],"exampleFix":"// before (cassandra.yaml)\nlocal_system_data_file_directory: /data/cassandra\naccord:\n  journal_directory: /data/cassandra\n// after\nlocal_system_data_file_directory: /data/cassandra/local_system\naccord:\n  journal_directory: /data/cassandra/accord_journal","handlingStrategy":"validation","validationCode":"// before startup\nString local = cfg.local_system_data_file_directory;\nString journal = cfg.accord != null ? cfg.accord.journal_directory : null;\nif (local != null && local.equals(journal))\n    throw new IllegalArgumentException(\"local_system_data_file_directory must differ from accord.journal_directory\");","typeGuard":"boolean dirsDistinct(String a, String b) { return a == null || b == null || !new File(a).getAbsolutePath().equals(new File(b).getAbsolutePath()); }","tryCatchPattern":"try { DatabaseDescriptor.applyAll(cfg); } catch (ConfigurationException e) { logger.error(\"Invalid directory configuration: {}\", e.getMessage()); System.exit(1); }","preventionTips":["Use distinct subdirectory paths per subsystem, never one shared path","Lint cassandra.yaml at deploy time to assert all *_directory values are pairwise unique","Review any change that introduces a new dedicated directory key against existing ones"],"tags":["config","startup","directory-conflict"],"backgroundTag":"conflicting-config-options","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}