{"record":{"id":"5adaf5555b9c5445","repo":"apache/hadoop","slug":"invalid-value-configured-for-dfs-datanode-failed-v-5adaf5","errorCode":null,"errorMessage":"Invalid value configured for dfs.datanode.failed.volumes.tolerated - {} should be greater than or equal to -1","messagePattern":"Invalid value configured for dfs\\.datanode\\.failed\\.volumes\\.tolerated - (.+?) should be greater than or equal to -1","errorType":"exception","errorClass":"HadoopIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/DatasetVolumeChecker.java","lineNumber":160,"sourceCode":"          + DFS_DATANODE_DISK_CHECK_MIN_GAP_KEY + \" - \"\n          + minDiskCheckGapMs + \" (should be >= 0)\");\n    }\n\n    diskCheckTimeout = conf.getTimeDuration(\n        DFSConfigKeys.DFS_DATANODE_DISK_CHECK_TIMEOUT_KEY,\n        DFSConfigKeys.DFS_DATANODE_DISK_CHECK_TIMEOUT_DEFAULT,\n        TimeUnit.MILLISECONDS);\n\n    if (diskCheckTimeout < 0) {\n      throw new HadoopIllegalArgumentException(\"Invalid value configured for \"\n          + DFS_DATANODE_DISK_CHECK_TIMEOUT_KEY + \" - \"\n          + diskCheckTimeout + \" (should be >= 0)\");\n    }\n\n    lastAllVolumesCheck = timer.monotonicNow() - minDiskCheckGapMs;\n\n    if (maxVolumeFailuresTolerated < DataNode.MAX_VOLUME_FAILURE_TOLERATED_LIMIT) {\n      throw new HadoopIllegalArgumentException(\"Invalid value configured for \"\n          + DFS_DATANODE_FAILED_VOLUMES_TOLERATED_KEY + \" - \"\n          + maxVolumeFailuresTolerated + \" \"\n          + DataNode.MAX_VOLUME_FAILURES_TOLERATED_MSG);\n    }\n\n    delegateChecker = new ThrottledAsyncChecker<>(\n        timer, minDiskCheckGapMs, diskCheckTimeout,\n        Executors.newCachedThreadPool(\n            new ThreadFactoryBuilder()\n                .setNameFormat(\"DataNode DiskChecker thread %d\")\n                .setDaemon(true)\n                .build()));\n\n    checkVolumeResultHandlerExecutorService = Executors.newCachedThreadPool(\n        new ThreadFactoryBuilder()\n            .setNameFormat(\"VolumeCheck ResultHandler thread %d\")\n            .setDaemon(true)\n            .build());","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/DatasetVolumeChecker.java#L142-L178","documentation":"Error \"Invalid value configured for dfs.datanode.failed.volumes.tolerated - {} should be greater than or equal to -1\" thrown in apache/hadoop.","triggerScenarios":"Startup validation finds dfs.datanode.failed.volumes.tolerated set below -1, which is invalid.","commonSituations":"dfs.datanode.failed.volumes.tolerated was set below -1. Set it to -1 (tolerate none) or a non-negative count below the number of volumes.","solutions":["Set dfs.datanode.failed.volumes.tolerated to -1 or a value between 0 and the number of configured data volumes minus one.","Correct the value in hdfs-site.xml and restart the DataNode."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}