{"record":{"id":"4fdf963728db6651","repo":"apache/hadoop","slug":"the-persistent-memory-volume-dfs-datanode-pmem-ca","errorCode":null,"errorMessage":"The persistent memory volume, dfs.datanode.pmem.cache.dirs is not configured!","messagePattern":"The persistent memory volume, dfs\\.datanode\\.pmem\\.cache\\.dirs is not configured!","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/PmemVolumeManager.java","lineNumber":136,"sourceCode":"  private final ArrayList<String> pmemVolumes = new ArrayList<>();\n  // Maintain which pmem volume a block is cached to.\n  private final Map<ExtendedBlockId, Byte> blockKeyToVolume =\n      new ConcurrentHashMap<>();\n  private final List<UsedBytesCount> usedBytesCounts = new ArrayList<>();\n  private boolean cacheRecoveryEnabled;\n\n  /**\n   * The total cache capacity in bytes of persistent memory.\n   */\n  private long cacheCapacity;\n  private static long maxBytesPerPmem = -1;\n  private int count = 0;\n  private byte nextIndex = 0;\n\n  private PmemVolumeManager(String[] pmemVolumesConfig,\n                            boolean cacheRecoveryEnabled) throws IOException {\n    if (pmemVolumesConfig == null || pmemVolumesConfig.length == 0) {\n      throw new IOException(\"The persistent memory volume, \" +\n          DFSConfigKeys.DFS_DATANODE_PMEM_CACHE_DIRS_KEY +\n          \" is not configured!\");\n    }\n    this.cacheRecoveryEnabled = cacheRecoveryEnabled;\n    this.loadVolumes(pmemVolumesConfig);\n    cacheCapacity = 0L;\n    for (UsedBytesCount counter : usedBytesCounts) {\n      cacheCapacity += counter.getMaxBytes();\n    }\n  }\n\n  public synchronized static void init(\n      String[] pmemVolumesConfig, boolean cacheRecoveryEnabled)\n      throws IOException {\n    if (pmemVolumeManager == null) {\n      pmemVolumeManager = new PmemVolumeManager(pmemVolumesConfig,\n          cacheRecoveryEnabled);\n    }","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/PmemVolumeManager.java#L118-L154","documentation":"Error \"The persistent memory volume, dfs.datanode.pmem.cache.dirs is not configured!\" thrown in apache/hadoop.","triggerScenarios":"DataNode startup with memory-mapped (pmem) caching enabled but dfs.datanode.pmem.cache.dirs not configured.","commonSituations":"See trigger scenarios.","solutions":["Configure dfs.datanode.pmem.cache.dirs in hdfs-site.xml with the persistent memory (DAX) mount paths before enabling pmem cache.","Remove pmem cache configuration entirely if persistent memory is not available on this DataNode."],"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-23T01:17:44.959Z"}