hashicorp/nomad · error
volume %q content source %q does not exist: %v
Error message
volume %q content source %q does not exist: %v
What it means
ControllerCreateVolume received gRPC code NotFound from the CSI plugin when the request carried a ContentSource (snapshot or volume to clone). Nomad wraps this as "content source does not exist": the snapshot or source volume referenced in the request could not be found by the plugin. It is a lookup failure of the source object, not the target volume.
Source
Thrown at plugins/csi/client.go:443
err := req.Validate()
if err != nil {
return nil, err
}
creq := req.ToCSIRepresentation()
resp, err := c.controllerClient.CreateVolume(ctx, creq, opts...)
// these standard gRPC error codes are overloaded with CSI-specific
// meanings, so translate them into user-understandable terms
// https://github.com/container-storage-interface/spec/blob/master/spec.md#createvolume-errors
if err != nil {
code := status.Code(err)
switch code {
case codes.InvalidArgument:
return nil, fmt.Errorf(
"volume %q snapshot source %q is not compatible with these parameters: %v",
req.Name, req.ContentSource, err)
case codes.NotFound:
return nil, fmt.Errorf(
"volume %q content source %q does not exist: %v",
req.Name, req.ContentSource, err)
case codes.AlreadyExists:
return nil, fmt.Errorf(
"volume %q already exists but is incompatible with these parameters: %v",
req.Name, err)
case codes.ResourceExhausted:
return nil, fmt.Errorf(
"unable to provision %q in accessible_topology: %v",
req.Name, err)
case codes.OutOfRange:
return nil, fmt.Errorf(
"unsupported capacity_range for volume %q: %v", req.Name, err)
case codes.Internal:
return nil, fmt.Errorf(
"controller plugin returned an internal error, check the plugin allocation logs for more information: %v", err)
}
return nil, errView on GitHub (pinned to 482b49bf1a)
Solutions
- Confirm the snapshot/source volume ID exists in the storage backend (list snapshots via the storage vendor's CLI/console).
- Check that the CSI plugin is configured for the same region/account/cluster as the snapshot.
- Recreate the snapshot if it was removed by a retention or cleanup job.
- Fix the `source_volume`/`snapshot_id` field in the volume spec and re-run `nomad volume create`.
Example fix
// before type = "csi" source_volume = "vol-0123abc" // after (existing volume in the same cluster) type = "csi" source_volume = "vol-0456def"
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check that the source volume/snapshot exists before create-from-source
if vol.SourceVolumeID != "" {
if _, err := lookupBackendVolume(vol.SourceVolumeID); err != nil {
return fmt.Errorf("source volume %s not found in backend: %w", vol.SourceVolumeID, err)
}
} Type guard
func contentSourceExists(src *csi.ContentSource) bool {
return src != nil && (src.SnapshotID != "" || src.VolumeId != "")
} Try / catch
vol, err := client.ControllerCreateVolume(ctx, req)
if err != nil && strings.Contains(err.Error(), "content source") && strings.Contains(err.Error(), "does not exist") {
// re-resolve snapshot/source ID, then retry with corrected reference
} Prevention
- Verify snapshot/source volume IDs exist in the same region/account as the plugin target.
- Account for snapshot retention policies before referencing old snapshots.
- Use infrastructure-as-code so source IDs are generated consistently, not hand-typed.
When it happens
Trigger: Calling ControllerCreateVolume with req.ContentSource set (snapshot_id or source volume) where the plugin returns codes.NotFound — the snapshot/source volume ID doesn't exist, was deleted, or belongs to a different storage cluster/tenant.
Common situations: Typo in the snapshot ID in the volume spec; snapshot pruned by retention policy before restore; creating the volume against a plugin instance pointed at a different region/cluster than where the snapshot lives; cross-namespace snapshot reference.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- volume %q could not be found: %v
- CSI.ControllerListVolumes: plugin returned an invalid entry
- plugin not found: %s
- node %q has reached the maximum allowable number of attached
- volume %q is already published on another node and does not
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/828efb9f8c23c800.
Report an issue: GitHub.