{"record":{"id":"dbb94ca91e76ca3a","repo":"apache/cassandra","slug":"small-volume-detected-at-setting-to","errorCode":null,"errorMessage":"Small {} volume detected at '{}'; setting {} to {}.  You can override this in cassandra.yaml","messagePattern":"Small (.+?) volume detected at '(.+?)'; setting (.+?) to (.+?)\\.  You can override this in cassandra\\.yaml","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":1482,"sourceCode":"        return storagedir(type + \"_directory\") + File.pathSeparator() + type;\n    }\n\n    private static String storagedir(String errMsgType)\n    {\n        String storagedir = STORAGE_DIR.getString();\n        if (storagedir == null)\n            throw new ConfigurationException(errMsgType + \" is missing and \" + STORAGE_DIR.getKey() + \" system property is not set\", false);\n        return storagedir;\n    }\n\n    static int calculateDefaultSpaceInMiB(String type, String path, String setting, int preferredSizeInMiB, long totalSpaceInBytes, long totalSpaceNumerator, long totalSpaceDenominator)\n    {\n        final long totalSizeInMiB = totalSpaceInBytes / ONE_MIB;\n        final int minSizeInMiB = Ints.saturatedCast(totalSpaceNumerator * totalSizeInMiB / totalSpaceDenominator);\n\n        if (minSizeInMiB < preferredSizeInMiB)\n        {\n            logger.warn(\"Small {} volume detected at '{}'; setting {} to {}.  You can override this in cassandra.yaml\",\n                        type, path, setting, minSizeInMiB);\n            return minSizeInMiB;\n        }\n        else\n        {\n            return preferredSizeInMiB;\n        }\n    }\n\n    public static void applyAddressConfig() throws ConfigurationException\n    {\n        applyAddressConfig(conf);\n    }\n\n    public static void applyAddressConfig(Config config) throws ConfigurationException\n    {\n        listenAddress = null;\n        rpcAddress = null;","sourceCodeStart":1464,"sourceCodeEnd":1500,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L1464-L1500","documentation":"A startup warning from DatabaseDescriptor when auto-computed size settings (e.g. commitlog segment or disk-access-related sizes derived as a fraction of a volume) would exceed the actual space on a small volume. Cassandra clamps the setting to the calculated minimum (minSizeInMiB) and logs this so the operator knows to override it in cassandra.yaml.","triggerScenarios":"Starting a node on a small disk/volume (e.g. container or CI image with a few GiB) where totalSpaceNumerator/Denominator-based fraction of total volume size is smaller than the preferred default size in MiB for the given setting/path.","commonSituations":"Running Cassandra in Docker/Kubernetes with small ephemeral volumes; laptops/dev VMs; CI test runners; embedded/edge deployments where default sizes tuned for server disks don't fit.","solutions":["Accept the warning — Cassandra already clamped the value; it is informational.","If the clamped value is unsuitable, set the setting explicitly in cassandra.yaml (e.g. a fixed max_mutation_size/commitlog segment size appropriate to your volume).","Give the data/commitlog directory a larger volume if the clamped value harms throughput.","Suppress noise in test environments by provisioning adequate disk or pinning explicit config values."],"exampleFix":"// before (cassandra.yaml)\n# setting left to auto-sizing\n// after\ncommitlog_segment_size_in_mb: 16  # explicit value for small volume","handlingStrategy":"validation","validationCode":"# estimate auto-sized value before start\ntotal_mib = shutil.disk_usage('/var/lib/cassandra').total // (1024*1024)\nsetting_mib = int(total_mib * numerator / denominator)\nif setting_mib < preferred: print('will be clamped to', setting_mib)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set the size setting explicitly in cassandra.yaml on small volumes (containers, CI, laptops).","Provision adequate disk for data/commitlog directories.","Read startup warnings — they tell you the effective clamped value."],"tags":["configuration","startup","disk","sizing"],"backgroundTag":"invalid-config-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}