{"record":{"id":"4ce6240d44915a9f","repo":"apache/hadoop","slug":"blockpoolslicestorage-recovertransitionread-attem","errorCode":null,"errorMessage":"BlockPoolSliceStorage.recoverTransitionRead: attempt to load an used block storage: {}","messagePattern":"BlockPoolSliceStorage\\.recoverTransitionRead: attempt to load an used block storage: (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolSliceStorage.java","lineNumber":222,"sourceCode":"   * Therefore, a failure on loading any block pool storage results a faulty\n   * data volume.\n   *\n   * @param nsInfo namespace information\n   * @param location storage directories of block pool\n   * @param startOpt startup option\n   * @param callables list of callable storage directory\n   * @param conf configuration\n   * @return an array of loaded block pool directories.\n   * @throws IOException on error\n   */\n  List<StorageDirectory> loadBpStorageDirectories(NamespaceInfo nsInfo,\n      StorageLocation location, StartupOption startOpt,\n      List<Callable<StorageDirectory>> callables, Configuration conf)\n          throws IOException {\n    List<StorageDirectory> succeedDirs = Lists.newArrayList();\n    try {\n      if (containsStorageDir(location, nsInfo.getBlockPoolID())) {\n        throw new IOException(\n            \"BlockPoolSliceStorage.recoverTransitionRead: \" +\n                \"attempt to load an used block storage: \" + location);\n      }\n      final StorageDirectory sd = loadStorageDirectory(\n          nsInfo, location, startOpt, callables, conf);\n      succeedDirs.add(sd);\n    } catch (IOException e) {\n      LOG.warn(\"Failed to analyze storage directories for block pool {}\",\n          nsInfo.getBlockPoolID(), e);\n      throw e;\n    }\n    return succeedDirs;\n  }\n\n  /**\n   * Analyze storage directories. Recover from previous transitions if required.\n   *\n   * The block pool storages are either all analyzed or none of them is loaded.","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolSliceStorage.java#L204-L240","documentation":"BlockPoolSliceStorage.loadBpStorageDirectories detected via containsStorageDir that this StorageLocation is already loaded for the same block pool — i.e. one physical block-pool directory would be loaded twice.","triggerScenarios":"The same path listed multiple times in dfs.datanode.data.dir; entries that differ textually (symlink, trailing slash, relative vs absolute, bind mount) but resolve to the same directory.","commonSituations":"Copy-paste duplication in data.dir; /data and /mnt/data symlinked; templating bugs that emit one volume per disk plus a duplicate.","solutions":["Deduplicate dfs.datanode.data.dir so every entry is a distinct real directory (resolve symlinks)","Give each entry its own disk/mount point","Restart the DN after fixing the configuration"],"exampleFix":"<!-- before -->\n<property><name>dfs.datanode.data.dir</name>\n  <value>/dfs/dn,/dfs/dn,/dfs/dn2</value></property>\n\n<!-- after -->\n<property><name>dfs.datanode.data.dir</name>\n  <value>/dfs/dn,/dfs/dn2</value></property>","handlingStrategy":"validation","validationCode":"Set<Path> seen = new HashSet<>();\nfor (String dir : conf.getTrimmedStringCollection(DFS_DATANODE_DATA_DIR)) {\n  Path canon = new File(dir).getCanonicalFile().toPath();\n  if (!seen.add(canon)) {\n    throw new IllegalArgumentException(\"Duplicate data dir (after symlink resolution): \" + dir);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Lint dfs.datanode.data.dir for duplicates and symlink aliases before deploying","Generate data.dir from a disk inventory (one entry per real device) rather than by hand"],"tags":["hdfs","datanode","storage","configuration","duplicate-path"],"backgroundTag":"duplicate-storage-location","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}