1

I have a Persistent Volume in IBM Cloud Kubernetes service. My pod has a high load that I suspect is due to IO problems, so I want to move the data in a bronze storage class to a ibmc-file-retain-gold volume.

How can I delete the Persistent Volume and, given I created it "retain" create a new one with that data that according to docs is not lost when deleting the PV and as a ibmc-file-retain-gold?

icordoba
  • 1,834
  • 2
  • 33
  • 60

1 Answers1

0

There's no way to "upgrade" a bronze class persistent volume to a gold class persistent volume, since behind the covers bronze and gold provision different flavors of NFS. What you'll need to do is create a new pvc with the gold storage class and then transfer data to the new persistent volume.

There are several ways to accomplish this transfer. You could use kubectl cp to both copy the data locally and then upload the data to your new persistent volume (once the volume is mounted to a pod).

Or you could use the backup-restore image if you want to create a more automated process. Docs for using that image are here: https://console.bluemix.net/docs/services/RegistryImages/ibm-backup-restore/index.html#ibmbackup_restore_starter

bhpratt
  • 374
  • 1
  • 6
  • Also, since I've seen you ask several IBM Cloud Container Service questions, you might be interested in joining the ICCS Slack. Can be helpful for getting quick feedback on questions. Invite request here: https://bxcs-slack-invite.mybluemix.net/ – bhpratt Mar 07 '18 at 21:40
  • thanks. I will join that slack. I have copied from the old to the new gold PVC using a util linux container mounting both together. Anyway, what is the use of the retain type PVCs then if deleting the PVC does not mean the data can be retrieved back to other PVC? Thanks. – icordoba Mar 08 '18 at 22:38
  • The main purpose currently is to prevent accidentally wiping out data. Since the standard PVC is set to delete, it means that deleting a cluster also deletes all data. In some cases, users want to make sure that the data continues to exist outside of the cluster lifecycle. – bhpratt Mar 09 '18 at 15:53