apache/hadoop · error · SnapshotException
Failed to create the snapshot. The FileSystem has run out of
Error message
Failed to create the snapshot. The FileSystem has run out of snapshot IDs and ID rollover is not supported and the max snapshot limit is: {} What it means
Error "Failed to create the snapshot. The FileSystem has run out of snapshot IDs and ID rollover is not supported and the max snapshot limit is: {}" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotManager.java:458
* The name of the snapshot.
* @param mtime is the snapshot creation time set by Time.now().
* @throws IOException
* Throw IOException when 1) the given path does not lead to an
* existing snapshottable directory, and/or 2) there exists a
* snapshot with the given name for the directory, and/or 3)
* snapshot number exceeds quota
*/
public String createSnapshot(final LeaseManager leaseManager,
final INodesInPath iip, String snapshotRoot, String snapshotName,
long mtime)
throws IOException {
INodeDirectory srcRoot = getSnapshottableRoot(iip);
if (snapshotCounter == getMaxSnapshotID()) {
// We have reached the maximum allowable snapshot ID and since we don't
// handle rollover we will fail all subsequent snapshot creation
// requests.
throw new SnapshotException(
"Failed to create the snapshot. The FileSystem has run out of " +
"snapshot IDs and ID rollover is not supported " +
"and the max snapshot limit is: " + maxSnapshotLimit);
}
int n = numSnapshots.get();
checkFileSystemSnapshotLimit(n);
srcRoot.addSnapshot(this, snapshotName, leaseManager, mtime);
//create success, update id
snapshotCounter++;
numSnapshots.getAndIncrement();
return Snapshot.getSnapshotPath(snapshotRoot, snapshotName);
}
void checkFileSystemSnapshotLimit(int n) throws SnapshotException {
checkSnapshotLimit(maxSnapshotFSLimit, n, "file system");
}
View on GitHub (pinned to 2add963021)
Solutions
- Delete existing snapshots to free IDs; the snapshot ID space is exhausted and rollover is unsupported.
When it happens
Trigger: Snapshot creation fails because all snapshot IDs up to the max limit are consumed.
Common situations: Very large numbers of snapshots accumulated on a snapshottable directory hitting the ID ceiling.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/1ae44546acba4071.
Report an issue: GitHub.