{"record":{"id":"a2f0c9c3eeddb6ff","repo":"apache/hadoop","slug":"upgrade-is-not-supported-from-this-ol","errorCode":null,"errorMessage":"*********** 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. ************","messagePattern":"\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\* Upgrade is not supported from this  older version (.+?) 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 (.+?) and latest layout version this software version can upgrade from is -16\\. \\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"critical","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java","lineNumber":1159,"sourceCode":"   * @param oldVersion the version of the metadata to check with the current\n   *                   version\n   * @throws IOException if upgrade is not supported\n   */\n  public static void checkVersionUpgradable(int oldVersion) \n                                     throws IOException {\n    if (oldVersion > LAST_UPGRADABLE_LAYOUT_VERSION) {\n      String msg = \"*********** Upgrade is not supported from this \" +\n                   \" older version \" + oldVersion + \n                   \" of storage to the current version.\" + \n                   \" Please upgrade to \" + LAST_UPGRADABLE_HADOOP_VERSION +\n                   \" or a later version and then upgrade to current\" +\n                   \" version. Old layout version is \" + \n                   (oldVersion == 0 ? \"'too old'\" : (\"\"+oldVersion)) +\n                   \" and latest layout version this software version can\" +\n                   \" upgrade from is \" + LAST_UPGRADABLE_LAYOUT_VERSION +\n                   \". ************\";\n      LOG.error(msg);\n      throw new IOException(msg); \n    }\n    \n  }\n  \n  /**\n   * Iterate over each of the {@link FormatConfirmable} objects,\n   * potentially checking with the user whether it should be formatted.\n   * \n   * If running in interactive mode, will prompt the user for each\n   * directory to allow them to format anyway. Otherwise, returns\n   * false, unless 'force' is specified.\n   * \n   * @param force format regardless of whether dirs exist\n   * @param interactive prompt the user when a dir exists\n   * @return true if formatting should proceed\n   * @throws IOException if some storage cannot be accessed\n   */\n  public static boolean confirmFormat(","sourceCodeStart":1141,"sourceCodeEnd":1177,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java#L1141-L1177","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"Properties p = Storage.readPropertiesFile(new File(dir, \"VERSION\"));\nint lv = Integer.parseInt(p.getProperty(\"layoutVersion\"));\nif (lv > Storage.LAST_UPGRADABLE_LAYOUT_VERSION) {\n  throw new IOException(\"layout \" + lv + \" predates \" + Storage.LAST_UPGRADABLE_HADOOP_VERSION\n      + \"; two-step upgrade required\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  nameNode.startUpgrade();\n} catch (IOException e) {\n  if (e.getMessage().contains(\"Upgrade is not supported\")) {\n    // stop the upgrade, plan a two-step migration instead of retrying\n  }\n  throw e;\n}","preventionTips":["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"],"tags":["hdfs","upgrade","layout-version","namenode","storage"],"backgroundTag":"unsupported-storage-upgrade","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}