apache/hadoop · error · IOException
Not enough capacity ratio left on mount: ${mount}, for ${tar
Error message
Not enough capacity ratio left on mount: ${mount}, for ${target}: capacity ratio: ${capacityRatio}. Sum of the capacity ratio of on same disk mount should be <= 1 What it means
Thrown by MountVolumeMap.setCapacityRatio() (MountVolumeMap.java:101) during DataNode startup or volume refresh when same-disk tiering (HDFS-15548) is enabled and the configured capacity ratios of volumes sharing one disk mount sum to more than 1. Ratios come from dfs.datanode.same-disk-tiering.capacity-ratio.percentage entries of the form [ratio]/path (e.g. [0.3]/disk1/archive), and MountVolumeInfo.setCapacityRatio refuses an assignment that overcommits the mount.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/MountVolumeMap.java:101
void removeVolume(FsVolumeImpl target) {
String mount = target.getMount();
if (!mount.isEmpty()) {
MountVolumeInfo info = mountVolumeMapping.get(mount);
info.removeVolume(target);
if (info.size() == 0) {
mountVolumeMapping.remove(mount);
}
}
}
void setCapacityRatio(FsVolumeImpl target, double capacityRatio)
throws IOException {
String mount = target.getMount();
if (!mount.isEmpty()) {
MountVolumeInfo info = mountVolumeMapping.get(mount);
if (!info.setCapacityRatio(
target.getStorageType(), capacityRatio)) {
throw new IOException(
"Not enough capacity ratio left on mount: "
+ mount + ", for " + target + ": capacity ratio: "
+ capacityRatio + ". Sum of the capacity"
+ " ratio of on same disk mount should be <= 1");
}
}
}
public boolean hasMount(String mount) {
return mountVolumeMapping.containsKey(mount);
}
}
View on GitHub (pinned to 2add963021)
Solutions
- Sum the ratios for every configured volume on the same mount and reduce them so the total is <= 1 (e.g. [0.3]/disk1/archive + [0.7]/disk1/disk)
- Verify each path really lands on the mount you think (df/realpath on the volume dirs) - symlinked paths silently share mounts
- Keep each individual ratio within 0..1 as StorageLocation.parseCapacityRatio requires
- If tiering is not intended, remove the capacity-ratio entries or set dfs.datanode.same-disk-tiering.enabled=false and restart the DataNode
- Apply the corrected value, then re-run refresh or restart; the check re-executes at volume initialization
Example fix
# before: two volumes on /mnt/disk0 overcommit the mount (0.6 + 0.5 > 1) <property> <name>dfs.datanode.same-disk-tiering.capacity-ratio.percentage</name> <value>[0.6]/mnt/disk0/archive,[0.5]/mnt/disk0/disk</value> </property> # after: ratios on one mount sum to exactly 1 <property> <name>dfs.datanode.same-disk-tiering.capacity-ratio.percentage</name> <value>[0.3]/mnt/disk0/archive,[0.7]/mnt/disk0/disk</value> </property>
Defensive patterns
Strategy: validation
Validate before calling
// before enabling same-disk tiering: parse the config and sum per mount
Map<String, Double> perMount = new HashMap<>();
for (Map.Entry<URI, Double> e : StorageLocation.parseCapacityRatio(conf.get(
"dfs.datanode.same-disk-tiering.capacity-ratio.percentage", "")).entrySet()) {
String mount = org.apache.hadoop.fs.FileSystem.getStoreMount(e.getKey()); // or df-based lookup
double sum = perMount.getOrDefault(mount, 0.0) + e.getValue();
if (sum > 1.0) {
throw new IllegalArgumentException("Ratios on mount " + mount + " sum to " + sum);
}
perMount.put(mount, sum);
} Prevention
- Keep the per-mount ratio budget documented next to the config so edits preserve sum <= 1
- Resolve volume paths with df/realpath before assigning ratios - symlinks make two dirs share a mount
- Remember one volume per storage type per mount; ratios are per storage type
- Validate the property format ([ratio]/path, comma-separated) in CI/config management before deploy
When it happens
Trigger: dfs.datanode.same-disk-tiering.enabled=true plus capacity-ratio entries whose ratios on the same mount exceed 1.0 (e.g. [0.6]/mnt/disk/archive and [0.5]/mnt/disk/disk); ratios fine individually but paths resolve to the same mount via symlinks/bind mounts; typo like [1.2]/path passing StorageLocation's 0-1 check is impossible, but two 0.9 entries on one mount is the classic hit.
Common situations: Enabling block tiering (ARCHIVE + DISK volumes on one physical disk) and copy-pasting ratio entries; re-arranging directories so two configured volumes now share a mount; changing one volume's ratio and forgetting the counterpart's; volume refresh (dfsadmin -refreshNodes-style reconfiguration) after editing the ratio property.
Related errors
- Incompatible node types: storageType={storageType} but Stora
- No services to connect, missing NameNode address.
- BlockPoolSliceStorage.recoverTransitionRead: attempt to load
- No block pool offer service for bpid={}
- Not a valid Boolean value for {property} in reconfSlowPeerPa
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/51e919ae4ee49d51.
Report an issue: GitHub.