hashicorp/nomad · error
volume update failed: %s: %v
Error message
volume update failed: %s: %v
What it means
After applying a claim to the in-memory *structs.CSIVolume, the state store re-inserts the row via txn.Insert(TableCSIVolumes, volume). If the memdb insert fails, the store returns this error wrapping the volume ID and underlying cause, and the whole claim transaction is aborted. It indicates a low-level state store write failure rather than a domain-rule rejection.
Source
Thrown at nomad/state/state_store.go:2933
}
}
volume.ModifyIndex = index
volume.ModifyTime = now
// Allocations are copy on write, so we want to keep the Allocation ID
// but we need to clear the pointer so that we don't store it when we
// write the volume to the state store. We'll get it from the db in
// denormalize.
for allocID := range volume.ReadAllocs {
volume.ReadAllocs[allocID] = nil
}
for allocID := range volume.WriteAllocs {
volume.WriteAllocs[allocID] = nil
}
if err = txn.Insert(TableCSIVolumes, volume); err != nil {
return fmt.Errorf("volume update failed: %s: %v", id, err)
}
if err = txn.Insert("index", &IndexEntry{TableCSIVolumes, index}); err != nil {
return fmt.Errorf("index update failed: %v", err)
}
return txn.Commit()
}
// CSIVolumeDeregister removes the volume from the server
func (s *StateStore) CSIVolumeDeregister(index uint64, namespace string, ids []string, force bool) error {
txn := s.db.WriteTxnMsgT(structs.CSIVolumeDeregisterRequestType, index)
defer txn.Abort()
for _, id := range ids {
existing, err := txn.First(TableCSIVolumes, "id", namespace, id)
if err != nil {
return fmt.Errorf("volume lookup failed: %s: %v", id, err)View on GitHub (pinned to 482b49bf1a)
Solutions
- Check server logs for the wrapped '%v' underlying error to identify the storage cause
- Free disk space on the server data_dir and restart the server if BoltDB is reporting I/O errors
- Restore the server from a known-good raft snapshot if the state store is corrupt
- Retry the claim RPC once storage is healthy
Defensive patterns
Strategy: retry
Validate before calling
// No caller-side validation applies; ensure server storage is healthy // before issuing writes: check node disk pressure via Nomad/consul metrics
Try / catch
if err := claimVolume(volID, allocID); err != nil && strings.Contains(err.Error(), "volume update failed") {
// transient storage issue: backoff and retry a bounded number of times
} Prevention
- Monitor data_dir disk usage on Nomad servers
- Enable alerting on BoltDB write errors
- Use clean shutdowns to avoid state corruption
- Keep recent raft snapshots for recovery
When it happens
Trigger: CSIVolumeClaim commit path failing at txn.Insert for the volume row — typically memdb/BoltDB write errors: disk full, corrupted database file, or an internal transaction state problem.
Common situations: Nomad server data_dir disk exhaustion; BoltDB file corruption after unclean shutdown; I/O errors on the host.
Related errors
- volume row conversion error
- structs.ErrUnknownAllocationPrefix
- volume row conversion error: %s
- volume delete failed: %s: %v
- error parsing: root should be an object
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/3a09f226a9d58a49.
Report an issue: GitHub.