{"record":{"id":"41b73485db9c0906","repo":"apache/hadoop","slug":"invalid-value-configured-for-dfs-datanode-failed-v-41b734","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/StorageLocationChecker.java","lineNumber":112,"sourceCode":"        DFS_DATANODE_DISK_CHECK_TIMEOUT_DEFAULT,\n        TimeUnit.MILLISECONDS);\n\n    if (maxAllowedTimeForCheckMs <= 0) {\n      throw new HadoopIllegalArgumentException(\"Invalid value configured for \"\n          + DFS_DATANODE_DISK_CHECK_TIMEOUT_KEY + \" - \"\n          + maxAllowedTimeForCheckMs + \" (should be > 0)\");\n    }\n\n    expectedPermission = new FsPermission(\n        conf.get(DFS_DATANODE_DATA_DIR_PERMISSION_KEY,\n            DFS_DATANODE_DATA_DIR_PERMISSION_DEFAULT));\n\n    maxVolumeFailuresTolerated = conf.getInt(\n        DFS_DATANODE_FAILED_VOLUMES_TOLERATED_KEY,\n        DFS_DATANODE_FAILED_VOLUMES_TOLERATED_DEFAULT);\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    this.timer = timer;\n\n    delegateChecker = new ThrottledAsyncChecker<>(\n        timer,\n        conf.getTimeDuration(\n            DFSConfigKeys.DFS_DATANODE_DISK_CHECK_MIN_GAP_KEY,\n            DFSConfigKeys.DFS_DATANODE_DISK_CHECK_MIN_GAP_DEFAULT,\n            TimeUnit.MILLISECONDS),\n        0,\n        Executors.newCachedThreadPool(\n            new ThreadFactoryBuilder()\n                .setNameFormat(\"StorageLocationChecker thread %d\")\n                .setDaemon(true)","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/StorageLocationChecker.java#L94-L130","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 to a value less than -1.","commonSituations":"dfs.datanode.failed.volumes.tolerated was set below -1 in storage location checks. Use -1 or a valid non-negative count.","solutions":["Set dfs.datanode.failed.volumes.tolerated to -1 or higher in hdfs-site.xml and restart the DataNode.","Use -1 to tolerate all-but-one volume failures, or a non-negative count below the number of volumes."],"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"}