apache/hadoop · error · IOException
No image directories available!
Error message
No image directories available!
What it means
Error "No image directories available!" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java:1235
public void removeFromCheckpointing(long txid) {
currentlyCheckpointing.remove(txid);
}
void save(FSNamesystem src, File dst) throws IOException {
final long txid = getCorrectLastAppliedOrWrittenTxId();
LOG.info("save fsimage with txid={} to {}", txid, dst.getAbsolutePath());
final SaveNamespaceContext context = new SaveNamespaceContext(src, txid, new Canceler());
final Storage.StorageDirectory storageDirectory = new Storage.StorageDirectory(dst);
Files.createDirectories(storageDirectory.getCurrentDir().toPath());
new FSImageSaver(context, storageDirectory, NameNodeFile.IMAGE).run();
}
private synchronized void saveFSImageInAllDirs(FSNamesystem source,
NameNodeFile nnf, long txid, Canceler canceler) throws IOException {
StartupProgress prog = NameNode.getStartupProgress();
prog.beginPhase(Phase.SAVING_CHECKPOINT);
if (storage.getNumStorageDirs(NameNodeDirType.IMAGE) == 0) {
throw new IOException("No image directories available!");
}
if (canceler == null) {
canceler = new Canceler();
}
SaveNamespaceContext ctx = new SaveNamespaceContext(
source, txid, canceler);
try {
List<Thread> saveThreads = new ArrayList<Thread>();
// save images into current
for (Iterator<StorageDirectory> it
= storage.dirIterator(NameNodeDirType.IMAGE); it.hasNext();) {
StorageDirectory sd = it.next();
FSImageSaver saver = new FSImageSaver(ctx, sd, nnf);
Thread saveThread = new Thread(saver, saver.toString());
saveThreads.add(saveThread);
saveThread.start();
}View on GitHub (pinned to 2add963021)
Solutions
- Configure dfs.namenode.name.dir with at least one writable storage directory.
- Check disk space and permissions on the configured image directories.
When it happens
Trigger: Saving the namespace when all configured image storage directories have failed or been removed from service.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/cd1372b1222ca9dc.
Report an issue: GitHub.