hashicorp/nomad · error
storage provider does not have enough space for this snapsho
Error message
storage provider does not have enough space for this snapshot: %v
What it means
ControllerCreateSnapshot maps gRPC codes.ResourceExhausted from the CSI plugin to this message: per the CSI spec it means the storage provider does not have enough capacity (quota, snapshot pool space, or snapshot count limit) to create the snapshot. Nomad translates the raw gRPC code so the user sees a capacity problem rather than an opaque RPC failure.
Source
Thrown at plugins/csi/client.go:654
creq := req.ToCSIRepresentation()
resp, err := c.controllerClient.CreateSnapshot(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#createsnapshot-errors
if err != nil {
code := status.Code(err)
switch code {
case codes.AlreadyExists:
return nil, fmt.Errorf(
"snapshot %q already exists but is incompatible with volume ID %q: %v",
req.Name, req.VolumeID, err)
case codes.Aborted:
return nil, fmt.Errorf(
"snapshot %q is already pending: %v",
req.Name, err)
case codes.ResourceExhausted:
return nil, fmt.Errorf(
"storage provider does not have enough space for this snapshot: %v", 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, err
}
snap := resp.GetSnapshot()
return &ControllerCreateSnapshotResponse{
Snapshot: &Snapshot{
ID: snap.GetSnapshotId(),
SourceVolumeID: snap.GetSourceVolumeId(),
SizeBytes: snap.GetSizeBytes(),
CreateTime: snap.GetCreationTime().GetSeconds(),
IsReady: snap.GetReadyToUse(),
},
}, nilView on GitHub (pinned to 482b49bf1a)
Solutions
- Delete old/unused snapshots (ControllerDeleteSnapshot) to free snapshot capacity, then retry.
- Increase the snapshot quota/reserve on the storage backend or cloud account.
- Reduce snapshot frequency or volume count; add retention/pruning to the snapshot schedule.
- Inspect the wrapped gRPC error and plugin logs for the exact backend quota that was exceeded.
Example fix
// before: create fails when quota full
err := createSnapshot(vol)
// after: prune expired snapshots first
if err := pruneExpiredSnapshots(ctx, vol); err != nil { return err }
err := createSnapshot(vol) Defensive patterns
Strategy: fallback
Validate before calling
func snapshotQuotaHeadroom(ctx context.Context, c *client, keep int) error {
resp, err := c.ControllerListSnapshots(ctx, &ControllerListSnapshotsRequest{})
if err != nil { return err }
if len(resp.Snapshots) >= quotaLimit-keep {
return fmt.Errorf("snapshot quota nearly exhausted: %d/%d", len(resp.Snapshots), quotaLimit)
}
return nil
} Try / catch
_, err := c.ControllerCreateSnapshot(ctx, req)
if err != nil && strings.Contains(err.Error(), "not have enough space") {
if perr := pruneOldestSnapshots(ctx, c, 1); perr != nil { return perr }
_, err = c.ControllerCreateSnapshot(ctx, req)
} Prevention
- Enforce a retention policy that deletes snapshots older than N days.
- Monitor snapshot pool usage/quota on the storage backend.
- Alert before quota exhaustion rather than failing creates.
When it happens
Trigger: Calling ControllerCreateSnapshot when the storage backend has exhausted snapshot storage quota, exceeded a maximum-snapshot-count limit, or its snapshot pool is full; the plugin returns codes.ResourceExhausted (client.go:654).
Common situations: Retention policy never deletes old snapshots so the pool fills; storage array snapshot reserve too small; cloud provider snapshot quota hit; many Nomad jobs snapshotting large volumes concurrently.
Related errors
- snapshot %q already exists but is incompatible with volume I
- snapshot %q is already pending: %v
- snapshot %q could not be deleted because it is in use: %v
- snapshot %q has a pending operation: %v
- volume snapshot ID cannot be updated
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/9321cc42be4470fd.
Report an issue: GitHub.