{"record":{"id":"ca93cf220136ea0e","repo":"apache/hadoop","slug":"out-of-space-the-volume-with-the-most-available-s","errorCode":null,"errorMessage":"Out of space: The volume with the most available space (={} B) is less than the block size (={} B).","messagePattern":"Out of space: The volume with the most available space \\(=(.+?) B\\) is less than the block size \\(=(.+?) B\\)\\.","errorType":"exception","errorClass":"DiskOutOfSpaceException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/RoundRobinVolumeChoosingPolicy.java","lineNumber":124,"sourceCode":"\n    while (true) {\n      final V volume = volumes.get(curVolume);\n      curVolume = (curVolume + 1) % volumes.size();\n      long availableVolumeSize = volume.getAvailable();\n      if (availableVolumeSize > blockSize + additionalAvailableSpace) {\n        curVolumes[curVolumeIndex] = curVolume;\n        return volume;\n      }\n\n      if (availableVolumeSize > maxAvailable) {\n        maxAvailable = availableVolumeSize;\n      }\n\n      LOG.warn(\"The volume[{}] with the available space (={} B) is \"\n              + \"less than the block size (={} B).\", volume.getBaseURI(),\n          availableVolumeSize, blockSize);\n      if (curVolume == startVolume) {\n        throw new DiskOutOfSpaceException(\"Out of space: \"\n            + \"The volume with the most available space (=\" + maxAvailable\n            + \" B) is less than the block size (=\" + blockSize + \" B).\");\n      }\n    }\n  }\n}\n","sourceCodeStart":106,"sourceCodeEnd":131,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/RoundRobinVolumeChoosingPolicy.java#L106-L131","documentation":"chooseVolume round-robins over all volumes looking for one with enough free space (blockSize + additionalAvailableSpace); after a full pass where even the best volume lacks space, it gives up with this out-of-space error.","triggerScenarios":"Block allocation when even the volume with the most free space has fewer bytes available than the block size. Avoid by adding capacity or freeing space.","commonSituations":"See trigger scenarios.","solutions":["Free space on the volume with the most available space, or add larger volumes to the DataNode.","Reduce the HDFS block size for the file being written so it fits the available space.","Consider dfs.datanode.available-space-volume-choosing-policy.balanced-space-preference-fraction if using AvailableSpaceVolumeChoosingPolicy to avoid this skew."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}