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

# Mount persistent storage for workloads

> Reference the bound PVC in the workload YAML and confirm that the container can access persistent data through the specified directory.

After a dynamic or static persistent volume is provisioned, workloads use persistent storage through PVCs. The PVC and the workload must be in the same namespace, and the PVC status must be `Bound`.

## Reference a PVC in a Workload

Complete the following configuration in the workload's Pod template:

* Reference the PVC through `persistentVolumeClaim.claimName` in `spec.volumes`.
* Set the volume name and mount directory in the container's `volumeMounts`.

The following Pod mounts the PVC named `training-data-pvc` to the container's `/data` directory.

```yaml theme={null}
apiVersion: v1
kind: Pod
metadata:
  name: training-task
  namespace: default
spec:
  containers:
    - name: training
      image: nginx:1.14.2
      volumeMounts:
        - name: training-data
          mountPath: /data
  volumes:
    - name: training-data
      persistentVolumeClaim:
        claimName: training-data-pvc
```

Replace `namespace`, `image`, `mountPath`, and `claimName` with actual values. Workloads such as Deployments, StatefulSets, and Jobs can also use the same `volumes` and `volumeMounts` configuration in their Pod templates.

## Submit and confirm the mount result

1. Log in to the [GPU Cloud console](https://console.scitix.ai/gpu-cloud/home) and go to the **Clusters** page.

2. Click the name of the target cluster to go to the cluster workspace.

3. In the left navigation pane, go to the **Workloads** page, select the appropriate workload type, and submit the YAML.

4. Verify that the workload is running properly and that the container can read and write data through the target mount directory.

   If a Pod remains in `Pending` for an extended period or a container cannot start, check whether the PVC is `Bound`, whether the PVC and workload are in the same namespace, and whether `claimName` is correct.

## Unmount PVC

Before deleting a PVC, remove all workload references to the PVC:

* For workloads managed by controllers such as Deployment, StatefulSet, and Job, update the Pod template and remove the corresponding `volumeMounts` and `volumes` configurations.
* For directly created Pods, stop and delete the Pod, or recreate it using a configuration that no longer references the PVC.

After confirming that no running Pods are using the PVC, handle the PVC and PV based on how the storage volume was created or bound.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.