Migrating Between Flexvolume and CSI Driver

Ensure your Longhorn App is up to date. Follow the relevant upgrade procedure above before proceeding.

The migration path between drivers requires backing up and restoring each volume and will incur both API and workload downtime. This can be a tedious process; consider what benefit switching drivers will bring before proceeding. Consider deleting unimportant workloads using the old driver to reduce effort.

Flexvolume to CSI

CSI is the newest out-of-tree Kubernetes storage interface.

  1. Backup existing volumes.
  2. On Rancher UI, navigate to the Catalog Apps screen, locate the Longhorn app and click the Up to date button. Under Kubernetes Driver, select flexvolume. We recommend leaving Flexvolume Path empty. Click Upgrade.
  3. Restore each volume by following the CSI restore procedure. This procedure is tailored to the StatefulSet workload, but the process is approximately the same for all workloads.

CSI to Flexvolume

If you would like to migrate from CSI to Flexvolume driver, we are interested to hear from you. CSI is the newest out-of-tree storage interface and we expect it to replace Flexvolume’s exec-based model.

  1. Backup existing volumes.
  2. On Rancher UI, navigate to the Catalog Apps screen, locate the Longhorn app and click the Up to date button. Under Kubernetes Driver, select flexvolume. We recommend leaving Flexvolume Path empty. Click Upgrade.
  3. Restore each volume by following the Flexvolume restore procedure. This procedure is tailored to the StatefulSet workload, but the process is approximately the same for all workloads.