<p>I have run some standard Azure IaaS kubernetes clusters for 3 years in production (~ 40 nodes). Because of recent corporate security changes and kubernetes design improvements, in particular the management of CSINodes, I decided to move back from Azure file storages to Longhorn. This scenario has been validated on other clusters.</p>
<p>In production, I would like to move persistent volume from an initial storage class to another one. Let's say storage_class_1 to storage_class_2.</p>
<p>storage_class_1 inherits from Azure File whereas storage_class_2 inherits from longhorn. Persistent volumes are dynamically generated using RabbitMQ operator.</p>
<p>When modifying the  CRD definition, no new PV is created and old ones are still bound.</p>
<pre><code>persistence:
  storageClassName: storage_class_2
  storage: 10Gi
</code></pre>
<p>I am looking for a way to update the PV without losing any data nor stopping the service. Any idea?</p>
<p>Some technical information:
Kubernetes : 1.19.8
Docker : 20.10.2
RabbitMQ Cluster Operator : 1.5.0</p>

<p>I have finally found the right sequence:</p>
<ol>
<li>Delete one PVC because of the nature of replica sets, volumes are persistent</li>
<li>Remove the corresponding instance</li>
<li>Create a new PVC which refers to the new storage class</li>
<li>The Replicaset will automaticall bind the new instance to this new PVC</li>
<li>Do it for other replicas</li>
</ol>
