> ## Documentation Index
> Fetch the complete documentation index at: https://autopilot.docs.xano.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Storage & PVC Management

> See every PersistentVolumeClaim's live usage and days-to-full projection, expand any volume on demand, and set per-PVC growth ceilings and auto-expand — no exception required.

Autopilot gives you a cluster-wide view of storage and direct control over every
PersistentVolumeClaim — visibility, a one-click expand, and per-PVC policy — sitting on top of
the same machinery that powers [Storage Exceptions](/operations/exceptions).

## The Storage page

A top-level **Storage** page lists every PVC with:

* **Live usage** from kubelet volume stats, as a bar.
* **Days-to-full projection** — a trend fit over recent usage (suppressed when a volume isn't meaningfully filling or is more than \~90 days out).
* The **mounting workload**, the StorageClass and whether it's expandable, any active exception, and per-PVC override chips.
* A row-expand **usage history chart** (used vs capacity over time).

Each namespace's detail page also has a promoted Storage (PVCs) section.

## Direct expand

You don't have to wait for a volume to cross a threshold. `POST /api/v1/pvcs/{ns}/{name}/expand`
(or the dashboard button) expands any healthy PVC directly. It runs the same safety chain as the
exception-driven expand — a confirm gate, a live re-check that the StorageClass allows expansion,
the target must exceed the current size and stay within any ceiling — plus a **2× growth cap** as
a fat-finger guard on an irreversible operation (bypassed only when a per-PVC ceiling explicitly
covers the target).

Every direct expand is audited three ways: a `ManualExpand` StorageException record (so it's
visible in the exception history), an operator note, and a Kubernetes Event on the PVC.

## Per-PVC overrides

Set annotations on the PVC to tune its behavior without touching the global policy:

| Annotation                      | Effect                                                                                                                               |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `ops-ai.io/max-storage`         | Per-PVC expansion ceiling (overrides the global `maxStorageSize`; must be ≥ current size)                                            |
| `ops-ai.io/storage-threshold`   | Per-PVC detection threshold (50–99; malformed falls back to global)                                                                  |
| `ops-ai.io/storage-auto-expand` | `enabled`/`disabled` — overrides the global auto-expand flag in both directions (enabling still needs a ceiling to bound the growth) |

Set them from the dashboard (`PATCH /api/v1/pvcs/{ns}/{name}/override`) or directly. Removing an
override reverts the PVC to the global policy.

<Note>
  The expand action is deliberately **not** modeled as an override — an irreversible mutation isn't
  a declarative constraint. Overrides shape *future* behavior (ceilings, thresholds, auto-expand);
  the expand button does the one-time growth.
</Note>

## Shrink protection

A separate mutating webhook (`pvcWebhook.enabled`) prevents a Helm redeploy from shrinking a PVC
below its current size after Autopilot (or you) expanded it — a common cause of failed
redeploys. It clamps the requested size upward on PVC update.
