{"record":{"id":"6bd4c1e0fea0359c","repo":"apache/hadoop","slug":"block-oldreplicainfo-reopen-failed-unable-to","errorCode":null,"errorMessage":"Block ${oldReplicaInfo} reopen failed.  Unable to move meta file  ${oldmeta} to rbw dir ${newmeta}","messagePattern":"Block (.+?) reopen failed\\.  Unable to move meta file  (.+?) to rbw dir (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/LocalReplicaInPipeline.java","lineNumber":431,"sourceCode":"  public void moveReplicaFrom(ReplicaInfo oldReplicaInfo, File newBlkFile)\n      throws IOException {\n\n    if (!(oldReplicaInfo instanceof LocalReplica)) {\n      throw new IOException(\"The source replica with blk id \"\n          + oldReplicaInfo.getBlockId()\n          + \" should be derived from LocalReplica\");\n    }\n\n    final LocalReplica oldReplica = (LocalReplica) oldReplicaInfo;\n    final File oldBlockFile = oldReplica.getBlockFile();\n    final File oldmeta = oldReplica.getMetaFile();\n    final File newmeta = getMetaFile();\n    final FileIoProvider fileIoProvider = getFileIoProvider();\n\n    try {\n      fileIoProvider.rename(getVolume(), oldmeta, newmeta);\n    } catch (IOException e) {\n      throw new IOException(\"Block \" + oldReplicaInfo + \" reopen failed. \" +\n                            \" Unable to move meta file  \" + oldmeta +\n                            \" to rbw dir \" + newmeta, e);\n    }\n\n    try {\n      fileIoProvider.rename(getVolume(), oldBlockFile, newBlkFile);\n    } catch (IOException e) {\n      try {\n        fileIoProvider.rename(getVolume(), newmeta, oldmeta);\n      } catch (IOException ex) {\n        LOG.warn(\"Cannot move meta file \" + newmeta +\n            \"back to the finalized directory \" + oldmeta, ex);\n      }\n      throw new IOException(\"Block \" + oldReplicaInfo + \" reopen failed. \" +\n          \" Unable to move block file \" + oldReplica.getBlockFile() +\n          \" to rbw dir \" + newBlkFile, e);\n    }\n  }","sourceCodeStart":413,"sourceCodeEnd":449,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/LocalReplicaInPipeline.java#L413-L449","documentation":"Error \"Block ${oldReplicaInfo} reopen failed.  Unable to move meta file  ${oldmeta} to rbw dir ${newmeta}\" thrown in apache/hadoop.","triggerScenarios":"Reopening a block for append fails because the meta file cannot be moved into the RBW directory.","commonSituations":"Reopening a block failed because the meta file could not be moved into the RBW directory. Check disk space, permissions, and volume health.","solutions":["Check volume permissions, free space, and disk health; the meta file rename to the rbw directory failed at the filesystem level.","If the volume is failing, remove it from service 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"}