storage-debug
Skill0 starsChanged 41 days agoMITView on GitHub
Use when debugging Kubernetes storage issues — PVC stuck Pending, volume attach/mount failures, Multi-Attach errors, volume expansion stuck, StatefulSet storage problems, or backend issues in Longhorn, Rook-Ceph, NFS, or local-path setups. Mention "pvc pending", "failedattachvolume", "failedmount", "multi-attach error", "volume expansion", "longhorn", "rook", "ceph" as triggers.
In this repository45 other files it gives its agents.
- admission-policy-reviewSkill
- alert-rule-reviewSkill
- architecture-reviewSkill
- argocd-applicationsetSkill
- argocd-debugSkill
- argocdSkill
- cert-manager-debugSkill
- cicd-reviewSkill
- cilium-debugSkill
- ciliumSkill
- cluster-backupSkill
- dast-reviewSkill
- dockerfile-reviewSkill
- english-technical-messageSkill
- git-messageSkill
- gitops-reviewSkill
- go-bugfixSkill
- go-code-reviewSkill
- go-testing-reviewSkill
- grafana-dashboardsSkill
- helm-reviewSkill
- homelab-change-planSkill
- incident-analysisSkill
- ingressSkill
- interview-system-designSkill
- istio-debugSkill
- istioSkill
- kubernetes-autoscalingSkill
- kubernetes-debugSkill
- kubernetes-securitySkill
- kubernetes-yaml-reviewSkill
- migration-planSkill
- observability-reviewSkill
- observability-stackSkill
- production-readinessSkill
- pr-reviewSkill
- root-cause-analysisSkill
- runbook-writerSkill
- runtime-security-reviewSkill
- secrets-managementSkill
- supply-chain-securitySkill
- terraform-reviewSkill
- upgrade-readinessSkill
- vaultSkill
- vulnerability-triageSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Use read-only kubectl describe pvc, describe pod, get sc, and get volumeattachment.
- Distinctive: line 22
Do not delete an attachment until node failure and writer safety are established.
- Distinctive: line 26
Follow the Workflow, Safety rules, and Quality checklist below.
- Very specific: line 36
Use when persistent storage misbehaves in a Kubernetes cluster: a PVC stuck Pending, pods stuck ContainerCreating on volume attach/mount, …
- Very specific: line 86
Read-only first, always: kubectl get/describe pvc,pv,sc,volumeattachment, CSI pod logs, longhornctl/Longhorn UI state, ceph status (via …
- Very specific: line 94
Never edit reclaimPolicy, filesystem, or backend replica counts as a quick fix.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Storage Debug
TL;DR checklist
- Read PVC and pod events before choosing a storage layer.
- Trace claim/class → provisioner → attach → mount → backend.
- Treat a failed-node Multi-Attach case as a data-safety decision.
Key read-only checks
- Use read-only
kubectl describe pvc,describe pod,get sc, andget volumeattachment.
Common pitfalls
- Do not delete an attachment until node failure and writer safety are established.
Agent procedure
Follow the Workflow, Safety rules, and Quality checklist below.
Quick references
- references/playbooks.md
Last verified: unverified
When to use
Use when persistent storage misbehaves in a Kubernetes cluster: a PVC stuck Pending, pods
stuck ContainerCreating on volume attach/mount, Multi-Attach errors after a node failure,
volume expansion that never completes, StatefulSet storage quirks, or backend-level trouble in
Longhorn, Rook-Ceph, NFS, or local-path storage. For the workload failing for non-storage
reasons, start with kubernetes-debug; for designing backup of the data, see cluster-backup.
Goal
Pinpoint which layer is failing — claim/class, provisioner, attach, mount, filesystem, or the storage backend itself — backed by the event/log evidence of that layer, and propose a fix without deleting claims, volumes, or data.
Workflow
- Read the events first —
kubectl describe pvc <name>andkubectl describe pod <name>: the event text (ProvisioningFailed,FailedAttachVolume,FailedMount,Multi-Attach error) names the failing layer directly. Route intoreferences/playbooks.mdby that text. - Locate the layer — the storage path is a chain; find the deepest healthy link:
- Claim/class: does the PVC's StorageClass exist? Is there a default at all
(
kubectl get sc)?WaitForFirstConsumermeans Pending-until-pod-schedules is normal. - Provisioner: CSI controller pods running? Their logs hold the create-volume error (quota, credentials, backend full).
- Attach:
kubectl get volumeattachment— is the volume attached to the right node? - Mount: CSI node plugin (DaemonSet) logs on that node; kubelet events for fsck/fsType/ permission errors.
- Backend: Longhorn volume/replica state,
ceph status, NFS server reachability.
- Claim/class: does the PVC's StorageClass exist? Is there a default at all
(
- Node-failure special case —
Multi-Attach errorfor an RWO volume after a node died is the expected protection, not the bug: the old attachment must be released (node recovers, or its Node object/pods are deleted) before the new node can attach. Understand which state the old node is in before touching anything. - Expansion path — expansion has two stages (backend resize, then filesystem resize);
FileSystemResizePendingon the PVC means stage two is waiting — often for a pod restart on older stacks. Never treat a stuck expansion as "recreate the volume." - StatefulSet specifics — one PVC per replica from
volumeClaimTemplates(immutable); scaling down does not delete PVCs (a returning replica reattaches its old data); a "reset" that deletes PVCs is a data-loss decision, never a debug step. - Backend deep-dive — for Longhorn/Rook-Ceph symptoms, use the backend sections in the playbooks: replica health and disk pressure for Longhorn; mon quorum, OSD state, and full-ratios for Ceph.
- Correlate and conclude — tie the event text to the specific layer and cause; propose the minimal fix and how to verify the volume is healthy end-to-end afterwards.
References
references/playbooks.md — event-text → cause → fix tables per layer (provisioning, attach,
mount, expansion), the node-failure/Multi-Attach walkthrough, and backend sections for
Longhorn, Rook-Ceph, NFS, and local-path. Route there as soon as an event names the failure.
Safety rules
- Read-only first, always:
kubectl get/describe pvc,pv,sc,volumeattachment, CSI pod logs,longhornctl/Longhorn UI state,ceph status(via toolbox). None of these mutate state. - Never delete a PVC, PV, or VolumeSnapshot as a diagnostic — depending on
reclaimPolicythat is irreversible data deletion. Any delete is proposed explicitly with its data impact stated, and the user confirms. - Force-detach measures (deleting a Node object, force-deleting pods, removing finalizers) break the Multi-Attach protection — only propose them when the old node is confirmed dead, and say what happens if it isn't (split-brain writes, filesystem corruption).
- Never edit
reclaimPolicy, filesystem, or backend replica counts as a quick fix; changes to data-bearing settings are framed as reviewed changes with rollback. - Backend repair commands (Longhorn salvage,
ceph osdmutations) require explicit confirmation — they act on the data plane itself.
Output format
## Observations
<claim/class/provisioner/attach/mount/backend state, from which command>
## Evidence
<the event text / log line that names the failing layer, quoted>
## Root cause
## Fix
<manifest or action, with data impact stated, marked as requiring user confirmation>
## Verification
<end-to-end check: pod mounts, writes succeed, backend reports healthy>Quality checklist
- The failing layer was located by event/log evidence, not guessed
WaitForFirstConsumersemantics were checked before calling a Pending PVC broken- For Multi-Attach/node-failure: the old node's true state was established before any force-detach was proposed
- No PVC/PV/snapshot deletion was proposed as a diagnostic; every mutating step states its data impact and requires confirmation
- The fix includes an end-to-end verification (mount + write + backend health)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

