{"record":{"id":"9321cc42be4470fd","repo":"hashicorp/nomad","slug":"storage-provider-does-not-have-enough-space-for-th","errorCode":null,"errorMessage":"storage provider does not have enough space for this snapshot: %v","messagePattern":"storage provider does not have enough space for this snapshot: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/csi/client.go","lineNumber":654,"sourceCode":"\tcreq := req.ToCSIRepresentation()\n\tresp, err := c.controllerClient.CreateSnapshot(ctx, creq, opts...)\n\n\t// these standard gRPC error codes are overloaded with CSI-specific\n\t// meanings, so translate them into user-understandable terms\n\t// https://github.com/container-storage-interface/spec/blob/master/spec.md#createsnapshot-errors\n\tif err != nil {\n\t\tcode := status.Code(err)\n\t\tswitch code {\n\t\tcase codes.AlreadyExists:\n\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\"snapshot %q already exists but is incompatible with volume ID %q: %v\",\n\t\t\t\treq.Name, req.VolumeID, err)\n\t\tcase codes.Aborted:\n\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\"snapshot %q is already pending: %v\",\n\t\t\t\treq.Name, err)\n\t\tcase codes.ResourceExhausted:\n\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\"storage provider does not have enough space for this snapshot: %v\", err)\n\t\tcase codes.Internal:\n\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\"controller plugin returned an internal error, check the plugin allocation logs for more information: %v\", err)\n\t\t}\n\t\treturn nil, err\n\t}\n\n\tsnap := resp.GetSnapshot()\n\treturn &ControllerCreateSnapshotResponse{\n\t\tSnapshot: &Snapshot{\n\t\t\tID:             snap.GetSnapshotId(),\n\t\t\tSourceVolumeID: snap.GetSourceVolumeId(),\n\t\t\tSizeBytes:      snap.GetSizeBytes(),\n\t\t\tCreateTime:     snap.GetCreationTime().GetSeconds(),\n\t\t\tIsReady:        snap.GetReadyToUse(),\n\t\t},\n\t}, nil","sourceCodeStart":636,"sourceCodeEnd":672,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/plugins/csi/client.go#L636-L672","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":"// before: create fails when quota full\nerr := createSnapshot(vol)\n// after: prune expired snapshots first\nif err := pruneExpiredSnapshots(ctx, vol); err != nil { return err }\nerr := createSnapshot(vol)","handlingStrategy":"fallback","validationCode":"func snapshotQuotaHeadroom(ctx context.Context, c *client, keep int) error {\n  resp, err := c.ControllerListSnapshots(ctx, &ControllerListSnapshotsRequest{})\n  if err != nil { return err }\n  if len(resp.Snapshots) >= quotaLimit-keep {\n    return fmt.Errorf(\"snapshot quota nearly exhausted: %d/%d\", len(resp.Snapshots), quotaLimit)\n  }\n  return nil\n}","typeGuard":null,"tryCatchPattern":"_, err := c.ControllerCreateSnapshot(ctx, req)\nif err != nil && strings.Contains(err.Error(), \"not have enough space\") {\n  if perr := pruneOldestSnapshots(ctx, c, 1); perr != nil { return perr }\n  _, err = c.ControllerCreateSnapshot(ctx, req)\n}","preventionTips":["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."],"tags":["csi","snapshot","capacity","grpc","nomad"],"backgroundTag":"storage-quota-exceeded","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"}