apache/hadoop · critical · IOException
*********** Upgrade is not supported from this older versio
Error message
*********** Upgrade is not supported from this older version {oldVersion} of storage to the current version. Please upgrade to Hadoop-0.18 or a later version and then upgrade to current version. Old layout version is {oldVersion} and latest layout version this software version can upgrade from is -16. ************ What it means
During storage recovery, Hadoop compares the on-disk layout version against LAST_UPGRADABLE_LAYOUT_VERSION (-16, the layout of Hadoop-0.18, Storage.java:90-91). If the stored version is older than that (oldVersion > -16), the running software has no code path to upgrade it and throws this IOException. The message even degrades to 'too old' for layoutVersion 0.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java:1159
* @param oldVersion the version of the metadata to check with the current
* version
* @throws IOException if upgrade is not supported
*/
public static void checkVersionUpgradable(int oldVersion)
throws IOException {
if (oldVersion > LAST_UPGRADABLE_LAYOUT_VERSION) {
String msg = "*********** Upgrade is not supported from this " +
" older version " + oldVersion +
" of storage to the current version." +
" Please upgrade to " + LAST_UPGRADABLE_HADOOP_VERSION +
" or a later version and then upgrade to current" +
" version. Old layout version is " +
(oldVersion == 0 ? "'too old'" : (""+oldVersion)) +
" and latest layout version this software version can" +
" upgrade from is " + LAST_UPGRADABLE_LAYOUT_VERSION +
". ************";
LOG.error(msg);
throw new IOException(msg);
}
}
/**
* Iterate over each of the {@link FormatConfirmable} objects,
* potentially checking with the user whether it should be formatted.
*
* If running in interactive mode, will prompt the user for each
* directory to allow them to format anyway. Otherwise, returns
* false, unless 'force' is specified.
*
* @param force format regardless of whether dirs exist
* @param interactive prompt the user when a dir exists
* @return true if formatting should proceed
* @throws IOException if some storage cannot be accessed
*/
public static boolean confirmFormat(View on GitHub (pinned to 2add963021)
Solutions
- Perform a two-step upgrade: first move the storage onto Hadoop-0.18 or a later release that still understands the old layout, then upgrade from there to the target version
- If the namespace is disposable, back it up and reformat with 'hdfs namenode -format' (destroys the namespace)
- If the VERSION file was hand-edited, restore the original layoutVersion from backup instead of guessing
Defensive patterns
Strategy: validation
Validate before calling
Properties p = Storage.readPropertiesFile(new File(dir, "VERSION"));
int lv = Integer.parseInt(p.getProperty("layoutVersion"));
if (lv > Storage.LAST_UPGRADABLE_LAYOUT_VERSION) {
throw new IOException("layout " + lv + " predates " + Storage.LAST_UPGRADABLE_HADOOP_VERSION
+ "; two-step upgrade required");
} Try / catch
try {
nameNode.startUpgrade();
} catch (IOException e) {
if (e.getMessage().contains("Upgrade is not supported")) {
// stop the upgrade, plan a two-step migration instead of retrying
}
throw e;
} Prevention
- Read layoutVersion from VERSION and compare with LAST_UPGRADABLE_LAYOUT_VERSION before attempting any upgrade
- Always step through the documented upgrade chain; never jump major generations
- Back up storage directories before every upgrade so a failed path is recoverable
When it happens
Trigger: Starting a NameNode with an upgrade (e.g. -upgrade or a layout-version change) against a storage directory formatted by a pre-0.18 Hadoop release; a VERSION file whose layoutVersion was hand-edited to a bogus value; ancient test fixtures reused against a modern build.
Common situations: Attempting to jump a very old cluster straight to a modern Hadoop release; unit tests with hand-crafted old-format directories; copy-pasted VERSION files from legacy documentation.
Related errors
- Storage directories contain multiple layout versions: {layou
- Cannot rollback to storage version {prevStorage.getLayoutVer
- File system image contains an old layout version {layoutVer
- Found feature flags which we can't handle. Please upgrade yo
- version file in current directory is missing.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/a2f0c9c3eeddb6ff.
Report an issue: GitHub.