{"record":{"id":"cfa00293c48ec2cb","repo":"apache/hadoop","slug":"no-more-available-volumes","errorCode":null,"errorMessage":"No more available volumes","messagePattern":"No more available volumes","errorType":"exception","errorClass":"DiskOutOfSpaceException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/AvailableSpaceVolumeChoosingPolicy.java","lineNumber":119,"sourceCode":"  \n  @Override\n  public Configuration getConf() {\n    // Nothing to do. Only added to fulfill the Configurable contract.\n    return null;\n  }\n  \n  private final VolumeChoosingPolicy<V> roundRobinPolicyBalanced =\n      new RoundRobinVolumeChoosingPolicy<V>();\n  private final VolumeChoosingPolicy<V> roundRobinPolicyHighAvailable =\n      new RoundRobinVolumeChoosingPolicy<V>();\n  private final VolumeChoosingPolicy<V> roundRobinPolicyLowAvailable =\n      new RoundRobinVolumeChoosingPolicy<V>();\n\n  @Override\n  public V chooseVolume(List<V> volumes, long replicaSize, String storageId)\n      throws IOException {\n    if (volumes.size() < 1) {\n      throw new DiskOutOfSpaceException(\"No more available volumes\");\n    }\n    // As all the items in volumes are with the same storage type,\n    // so only need to get the storage type index of the first item in volumes\n    StorageType storageType = volumes.get(0).getStorageType();\n    int index = storageType != null ?\n            storageType.ordinal() : StorageType.DEFAULT.ordinal();\n\n    synchronized (syncLocks[index]) {\n      return doChooseVolume(volumes, replicaSize, storageId);\n    }\n  }\n\n  private V doChooseVolume(final List<V> volumes, long replicaSize,\n      String storageId) throws IOException {\n    AvailableSpaceVolumeList volumesWithSpaces =\n        new AvailableSpaceVolumeList(volumes);\n    \n    if (volumesWithSpaces.areAllVolumesWithinFreeSpaceThreshold()) {","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/AvailableSpaceVolumeChoosingPolicy.java#L101-L137","documentation":"Error \"No more available volumes\" thrown in apache/hadoop.","triggerScenarios":"Block allocation when the available-space volume choosing policy finds no volume with enough usable space for the new block.","commonSituations":"See trigger scenarios.","solutions":["Free disk space on the DataNode volumes or add new storage directories to dfs.datanode.data.dir.","Check for failed volumes marked offline and replace the disks.","Adjust the available-space threshold or switch the volume choosing policy if skew causes premature exhaustion."],"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"}