{"record":{"id":"4cabb3facc0a4ec7","repo":"apache/hadoop","slug":"block-this-reopen-failed-unable-to-move-meta","errorCode":null,"errorMessage":"Block ${this} reopen failed.  Unable to move meta file  ${oldmeta} to ${newmeta}","messagePattern":"Block (.+?) reopen failed\\.  Unable to move meta file  (.+?) to (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/LocalReplica.java","lineNumber":391,"sourceCode":"  }\n\n  @Override\n  public void bumpReplicaGS(long newGS) throws IOException {\n    long oldGS = getGenerationStamp();\n    final File oldmeta = getMetaFile();\n    setGenerationStamp(newGS);\n    final File newmeta = getMetaFile();\n\n    // rename meta file to new GS\n    if (LOG.isDebugEnabled()) {\n      LOG.debug(\"Renaming \" + oldmeta + \" to \" + newmeta);\n    }\n    try {\n      // calling renameMeta on the ReplicaInfo doesn't work here\n      getFileIoProvider().rename(getVolume(), oldmeta, newmeta);\n    } catch (IOException e) {\n      setGenerationStamp(oldGS); // restore old GS\n      throw new IOException(\"Block \" + this + \" reopen failed. \" +\n                            \" Unable to move meta file  \" + oldmeta +\n                            \" to \" + newmeta, e);\n    }\n  }\n\n  @Override\n  public void truncateBlock(long newLength) throws IOException {\n    truncateBlock(getVolume(), getBlockFile(), getMetaFile(),\n        getNumBytes(), newLength, getFileIoProvider());\n  }\n\n  @Override\n  public int compareWith(ScanInfo info) {\n    return info.getBlockFile().compareTo(getBlockFile());\n  }\n\n  @Override\n  public void copyMetadata(URI destination) throws IOException {","sourceCodeStart":373,"sourceCodeEnd":409,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/LocalReplica.java#L373-L409","documentation":"Error \"Block ${this} reopen failed.  Unable to move meta file  ${oldmeta} to ${newmeta}\" thrown in apache/hadoop.","triggerScenarios":"Reopening a block (append) fails because the metadata file cannot be moved from the finalized location to the RBW directory.","commonSituations":"Reopening a block failed because its metadata file could not be renamed, usually a disk or permission problem on the volume. Check volume health and permissions.","solutions":["Check permissions and available space on the volume; the meta file move failed due to I/O or permission errors.","Inspect the volume for disk errors; if the volume is failing, remove it from dfs.datanode.data.dir and let the block re-replicate."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}