apache/hadoop · error · HadoopIllegalArgumentException

Invalid value configured for dfs.datanode.failed.volumes.tol

Error message

Invalid value configured for dfs.datanode.failed.volumes.tolerated - {} should be greater than or equal to -1

What it means

Error "Invalid value configured for dfs.datanode.failed.volumes.tolerated - {} should be greater than or equal to -1" thrown in apache/hadoop.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/DatasetVolumeChecker.java:160

          + DFS_DATANODE_DISK_CHECK_MIN_GAP_KEY + " - "
          + minDiskCheckGapMs + " (should be >= 0)");
    }

    diskCheckTimeout = conf.getTimeDuration(
        DFSConfigKeys.DFS_DATANODE_DISK_CHECK_TIMEOUT_KEY,
        DFSConfigKeys.DFS_DATANODE_DISK_CHECK_TIMEOUT_DEFAULT,
        TimeUnit.MILLISECONDS);

    if (diskCheckTimeout < 0) {
      throw new HadoopIllegalArgumentException("Invalid value configured for "
          + DFS_DATANODE_DISK_CHECK_TIMEOUT_KEY + " - "
          + diskCheckTimeout + " (should be >= 0)");
    }

    lastAllVolumesCheck = timer.monotonicNow() - minDiskCheckGapMs;

    if (maxVolumeFailuresTolerated < DataNode.MAX_VOLUME_FAILURE_TOLERATED_LIMIT) {
      throw new HadoopIllegalArgumentException("Invalid value configured for "
          + DFS_DATANODE_FAILED_VOLUMES_TOLERATED_KEY + " - "
          + maxVolumeFailuresTolerated + " "
          + DataNode.MAX_VOLUME_FAILURES_TOLERATED_MSG);
    }

    delegateChecker = new ThrottledAsyncChecker<>(
        timer, minDiskCheckGapMs, diskCheckTimeout,
        Executors.newCachedThreadPool(
            new ThreadFactoryBuilder()
                .setNameFormat("DataNode DiskChecker thread %d")
                .setDaemon(true)
                .build()));

    checkVolumeResultHandlerExecutorService = Executors.newCachedThreadPool(
        new ThreadFactoryBuilder()
            .setNameFormat("VolumeCheck ResultHandler thread %d")
            .setDaemon(true)
            .build());

View on GitHub (pinned to 2add963021)

Solutions

  1. Set dfs.datanode.failed.volumes.tolerated to -1 or a value between 0 and the number of configured data volumes minus one.
  2. Correct the value in hdfs-site.xml and restart the DataNode.

When it happens

Trigger: Startup validation finds dfs.datanode.failed.volumes.tolerated set below -1, which is invalid.

Common situations: dfs.datanode.failed.volumes.tolerated was set below -1. Set it to -1 (tolerate none) or a non-negative count below the number of volumes.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/5adaf5555b9c5445. Report an issue: GitHub.