{"record":{"id":"f20a7f5f51e86a45","repo":"apache/hadoop","slug":"the-operation-is-not-allowed-because-there-are-mou","errorCode":null,"errorMessage":"The operation is not allowed because there are mount points: {} under the path: {}","messagePattern":"The operation is not allowed because there are mount points: (.+?) under the path: (.+?)","errorType":"exception","errorClass":"AccessControlException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java","lineNumber":2177,"sourceCode":"    try {\n      if (failIfLocked) {\n        // check if there is any mount point under the path\n        final List<String> mountPoints =\n            this.subclusterResolver.getMountPoints(path);\n        if (mountPoints != null) {\n          StringBuilder sb = new StringBuilder();\n          sb.append(\"The operation is not allowed because \");\n          if (mountPoints.isEmpty()) {\n            sb.append(\"the path: \")\n                .append(path)\n                .append(\" is a mount point\");\n          } else {\n            sb.append(\"there are mount points: \")\n                .append(String.join(\",\", mountPoints))\n                .append(\" under the path: \")\n                .append(path);\n          }\n          throw new AccessControlException(sb.toString());\n        }\n      }\n\n      // Check the location for this path\n      final PathLocation location =\n          this.subclusterResolver.getDestinationForPath(path);\n      if (location == null) {\n        throw new NoLocationException(path, this.subclusterResolver.getClass());\n      }\n\n      // We may block some write operations\n      if (opCategory.get() == OperationCategory.WRITE) {\n        // Check if the path is in a read only mount point\n        if (isPathReadOnly(path)) {\n          if (this.rpcMonitor != null) {\n            this.rpcMonitor.routerFailureReadOnly();\n          }\n          throw new IOException(path + \" is in a read only mount point\");","sourceCodeStart":2159,"sourceCodeEnd":2195,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java#L2159-L2195","documentation":"Thrown by RouterRpcServer.getLocationsForPath(path, failIfLocked=true) in HDFS Router-Based Federation (RBF) when the target path is itself a mount point (empty mount-point list) or has other mount points nested underneath it. The Router forwards operations to a single subcluster, so an operation that would partially apply to a subtree spanning multiple mount points is rejected with an AccessControlException that names the conflicting mount points. This guard is used by operations that must act atomically on one namespace, e.g. rename, setQuota/unsetQuota, and the snapshot commands.","triggerScenarios":"Calling rename where src or dst subtree contains a nested mount point; hdfs dfsadmin -setQuota/-clrQuota through the Router on a directory that is or contains a mount point; allowSnapshot/createSnapshot/renameSnapshot/deleteSnapshot on a snapshot root whose tree contains mount points; any Router RPC path that invokes getLocationsForPath(src, true).","commonSituations":"Mount table defines /data plus a more specific /data/cold entry and an admin tries to rename or set quota on /data; a default '/' mount coexists with child mounts and tree-wide operations hit the children; users treat the Router as if it were a single NameNode supporting cross-mount operations.","solutions":["Restructure the mount table so the operation target no longer contains nested mount points (move or remove the child entry with hdfs dfsrouteradmin -rm, then hdfs dfsrouteradmin -refresh)","Run the operation on each affected subcluster directly against the underlying NameNode instead of through the Router","For quotas use Router-based quotas (hdfs dfsrouteradmin quota commands) rather than per-NameNode setQuota on paths spanning mounts","Verify the actual layout with hdfs dfsrouteradmin -ls <path> and retry against a narrower path that stays inside one mount"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Before rename/quota/snapshot via Router, check for nested mounts:\n// (admin side) hdfs dfsrouteradmin -ls /parent\n// shows child mount entries under the path -> operation will fail.","typeGuard":null,"tryCatchPattern":"try {\n  dfs.rename(src, dst);\n} catch (AccessControlException e) {\n  if (e.getMessage().contains(\"mount points\")) {\n    // path crosses mount boundaries: split the operation per subcluster\n    // or restructure the mount table\n  } else { throw e; }\n}","preventionTips":["Keep mount-table subtrees free of nested mounts for directories that receive tree-wide admin operations","Document which paths are mount roots so operators avoid rename/setQuota across them","In automation, probe hdfs dfsrouteradmin -ls <path> before issuing quota or snapshot commands through the Router"],"tags":["hadoop","hdfs","rbf","federation","mount-table","access-control","rename","quota"],"backgroundTag":"mount-point-conflict","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}