apache/hadoop · error · DiskOutOfSpaceException

Out of space: The volume with the most available space (={}

Error message

Out of space: The volume with the most available space (={} B) is less than the block size (={} B).

What it means

Error "Out of space: The volume with the most available space (={} B) is less than the block size (={} B)." thrown in apache/hadoop.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/RoundRobinVolumeChoosingPolicy.java:124

    while (true) {
      final V volume = volumes.get(curVolume);
      curVolume = (curVolume + 1) % volumes.size();
      long availableVolumeSize = volume.getAvailable();
      if (availableVolumeSize > blockSize + additionalAvailableSpace) {
        curVolumes[curVolumeIndex] = curVolume;
        return volume;
      }

      if (availableVolumeSize > maxAvailable) {
        maxAvailable = availableVolumeSize;
      }

      LOG.warn("The volume[{}] with the available space (={} B) is "
              + "less than the block size (={} B).", volume.getBaseURI(),
          availableVolumeSize, blockSize);
      if (curVolume == startVolume) {
        throw new DiskOutOfSpaceException("Out of space: "
            + "The volume with the most available space (=" + maxAvailable
            + " B) is less than the block size (=" + blockSize + " B).");
      }
    }
  }
}

View on GitHub (pinned to 2add963021)

Solutions

  1. Free space on the volume with the most available space, or add larger volumes to the DataNode.
  2. Reduce the HDFS block size for the file being written so it fits the available space.
  3. Consider dfs.datanode.available-space-volume-choosing-policy.balanced-space-preference-fraction if using AvailableSpaceVolumeChoosingPolicy to avoid this skew.

When it happens

Trigger: 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.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/ca93cf220136ea0e. Report an issue: GitHub.