{"record":{"id":"61f86fbb98fbc3d1","repo":"hashicorp/nomad","slug":"no-csi-mount-point-found-for-volume-s","errorCode":null,"errorMessage":"No CSI Mount Point found for volume: %s","messagePattern":"No CSI Mount Point found for volume: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/allocrunner/taskrunner/volume_hook.go","lineNumber":184,"sourceCode":"func (h *volumeHook) prepareCSIVolumes(req *interfaces.TaskPrestartRequest, volumes map[string]*structs.VolumeRequest) ([]*drivers.MountConfig, error) {\n\tif len(volumes) == 0 {\n\t\treturn nil, nil\n\t}\n\n\tvar mounts []*drivers.MountConfig\n\n\tmountRequests := partitionMountsByVolume(req.Task.VolumeMounts)\n\tcsiMountPoints := h.runner.allocHookResources.GetCSIMounts()\n\tfor alias, request := range volumes {\n\t\tmountsForAlias, ok := mountRequests[alias]\n\t\tif !ok {\n\t\t\t// This task doesn't use the volume\n\t\t\tcontinue\n\t\t}\n\n\t\tcsiMountPoint, ok := csiMountPoints[alias]\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"No CSI Mount Point found for volume: %s\", alias)\n\t\t}\n\n\t\tfor _, m := range mountsForAlias {\n\t\t\tmcfg := &drivers.MountConfig{\n\t\t\t\tRequestName:     request.Name,\n\t\t\t\tHostPath:        csiMountPoint.Source,\n\t\t\t\tTaskPath:        m.Destination,\n\t\t\t\tReadonly:        request.ReadOnly || m.ReadOnly,\n\t\t\t\tPropagationMode: m.PropagationMode,\n\t\t\t\tSELinuxLabel:    m.SELinuxLabel,\n\t\t\t}\n\t\t\tmounts = append(mounts, mcfg)\n\t\t}\n\t}\n\n\tif len(mounts) > 0 {\n\t\tcaps, err := h.runner.DriverCapabilities()\n\t\tif err != nil {","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/allocrunner/taskrunner/volume_hook.go#L166-L202","documentation":"In prepareCSIVolumes, the hook maps each task volume_mount alias to a CSI mount point that the client computed earlier (from the allocation's volumes and CSI node publishing). If the alias declared in the task's volume_mount stanza has no corresponding entry in csiMountPoints, Prestart fails. This means the task references a volume that was never staged/published for this allocation or was named incorrectly.","triggerScenarios":"Task's volume_mount stanza uses a volume name that does not match any group-level volume declaration with type = \"csi\", or the group CSI volume exists but the client never obtained a mount point for it (missing csi_mount_point entry in csiMountPoints map for that alias), e.g. the volume was not successfully published/staged by the CSI plugin for this node.","commonSituations":"Typo in the volume name inside volume_mount (name mismatch with the group volume block); CSI volume failed to stage/publish earlier (plugin error) so the mount point is absent; job updated to reference a CSI volume on a node whose CSI plugin didn't register; copying a job between clusters where the CSI volume doesn't exist.","solutions":["Make the volume_mount volume name exactly match the group-level volume declaration (volume \"name\" { type = \"csi\" ... })","Check CSI volume health and per-alloc events: nomad volume status <id>, and fix the failing CSI plugin/stage-publish step","Ensure the target client node has a running, registered CSI plugin that supports the volume's filesystem/access mode","Re-run or reschedule the allocation after the CSI controller/node publish succeeds"],"exampleFix":"// before\nvolume \"db\" { type = \"csi\" source = \"ebs-0\" }\ntask \"app\" { volume_mount { volume = \"database\" } } // typo\n// after\ntask \"app\" { volume_mount { volume = \"db\" } }","handlingStrategy":"validation","validationCode":"// Validate at job-authoring time: every task volume_mount name must match a group volume\ntaskMounts := map[string]bool{}\nfor _, m := range task.VolumeMounts { taskMounts[m.Volume] = true }\nfor name := range taskMounts {\n    if _, ok := group.Volumes[name]; !ok || group.Volumes[name].Type != \"csi\" {\n        return fmt.Errorf(\"task %q mounts undeclared CSI volume %q\", task.Name, name)\n    }\n}\n// Also check publication health before deploy: nomad volume status <source>","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy-paste volume names between group volume blocks and volume_mount exactly","Check CSI volume allocs/events (nomad volume status) to confirm stage/publish succeeded","Ensure the CSI plugin runs and registers on every client that can receive the task","Watch alloc events for earlier CSI publish failures before this hook runs"],"tags":["nomad","csi","volumes","prestart"],"backgroundTag":"csi-mount-point-not-found","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}