{"record":{"id":"f10ede15cb030b85","repo":"apache/hadoop","slug":"invalid-value-configured-for-dfs-datanode-failed-v-f10ede","errorCode":null,"errorMessage":"Invalid value configured for dfs.datanode.failed.volumes.tolerated - {}. Value configured is either less than maxVolumeFailureLimit or greater than to the number of configured volumes ({}).","messagePattern":"Invalid value configured for dfs\\.datanode\\.failed\\.volumes\\.tolerated - (.+?)\\. Value configured is either less than maxVolumeFailureLimit or greater than to the number of configured volumes \\((.+?)\\)\\.","errorType":"exception","errorClass":"HadoopIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java","lineNumber":322,"sourceCode":"    this.dataStorage = storage;\n    this.conf = conf;\n    this.smallBufferSize = DFSUtilClient.getSmallBufferSize(conf);\n    this.lockManager = datanode.getDataSetLockManager();\n\n    // The number of volumes required for operation is the total number\n    // of volumes minus the number of failed volumes we can tolerate.\n    volFailuresTolerated = datanode.getDnConf().getVolFailuresTolerated();\n\n    Collection<StorageLocation> dataLocations = DataNode.getStorageLocations(conf);\n    List<VolumeFailureInfo> volumeFailureInfos = getInitialVolumeFailureInfos(\n        dataLocations, storage);\n\n    volsConfigured = datanode.getDnConf().getVolsConfigured();\n    int volsFailed = volumeFailureInfos.size();\n\n    if (volFailuresTolerated < DataNode.MAX_VOLUME_FAILURE_TOLERATED_LIMIT\n        || volFailuresTolerated >= volsConfigured) {\n      throw new HadoopIllegalArgumentException(\"Invalid value configured for \"\n          + \"dfs.datanode.failed.volumes.tolerated - \" + volFailuresTolerated\n          + \". Value configured is either less than maxVolumeFailureLimit or greater than \"\n          + \"to the number of configured volumes (\" + volsConfigured + \").\");\n    }\n    if (volFailuresTolerated == DataNode.MAX_VOLUME_FAILURE_TOLERATED_LIMIT) {\n      if (volsConfigured == volsFailed) {\n        throw new DiskErrorException(\n            \"Too many failed volumes - \" + \"current valid volumes: \"\n                + storage.getNumStorageDirs() + \", volumes configured: \"\n                + volsConfigured + \", volumes failed: \" + volsFailed\n                + \", volume failures tolerated: \" + volFailuresTolerated);\n      }\n    } else {\n      if (volsFailed > volFailuresTolerated) {\n        throw new DiskErrorException(\n            \"Too many failed volumes - \" + \"current valid volumes: \"\n                + storage.getNumStorageDirs() + \", volumes configured: \"\n                + volsConfigured + \", volumes failed: \" + volsFailed","sourceCodeStart":304,"sourceCodeEnd":340,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java#L304-L340","documentation":"Error \"Invalid value configured for dfs.datanode.failed.volumes.tolerated - {}. Value configured is either less than maxVolumeFailureLimit or greater than to the number of configured volumes ({}).\" thrown in apache/hadoop.","triggerScenarios":"DataNode startup when dfs.datanode.failed.volumes.tolerated is negative, below the max volume failure limit, or greater than the number of configured data volumes.","commonSituations":"See trigger scenarios.","solutions":["Set dfs.datanode.failed.volumes.tolerated in hdfs-site.xml to a value between the max volume failure limit and the number of configured data volumes.","Count the directories in dfs.datanode.data.dir and ensure the tolerated value does not exceed that count."],"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-22T20:17:22.307Z"}