<p>I have a persistent volume claim created and a random persistent volume name is bound to the claim. Can the persistent volume name be modified, if so whats the process?</p>

<p>Tried the following:
Open the dashboard of k8, edit the pvc. but it throws the below error:
spec: Forbidden: is immutable after creation except resources.requests for bound claims </p>

<pre><code>kind: PersistentVolume
apiVersion: v1
metadata:
  name: task-pv-volume
  namespace: xxxxxxxx
  labels:
    type: local
spec:
  storageClassName: manual
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/data"
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: task-pv-claim
  namespace: xxxxx
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
  storageClassName: manual
  volumeMode: Filesystem

NAME               STATUS   VOLUME           CAPACITY   ACCESS MODES   STORAGECLASS     AGE
task-pv-claim      Bound    task-pv-volume   10Gi       RWX            manual           16m
</code></pre>

<p>Once the persistent volume is bound to pvc you cant change persistent volume name.
Delete the pvc and pv and recreate the pv with the required name.</p>

<p>Alternatively, you can pre-bind the pv with a specific pvc. Follow the below steps</p>

<ol>
<li>Create the pv and bind it with specific pvc</li>
<li>Create pvc from the name given in pv</li>
<li>The pv and pvc should be bound together</li>
</ol>
