Migrating from the Flexvolume Driver to CSI
As of Longhorn v0.8.0, the Flexvolume driver is no longer supported. This guide will show you how to migrate from the Flexvolume driver to CSI. CSI is the newest out-of-tree Kubernetes storage interface.
Note that the volumes created and used through one driver won’t be recognized by Kubernetes using the other driver. So please don’t switch the driver (e.g. during an upgrade) if you have existing volumes created using the old driver.
Ensure your Longhorn App is up to date. Follow the relevant upgrade procedure 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 deleting unimportant workloads using the old driver to reduce effort.
- Back up existing volumes.
- On Rancher UI, navigate to the
Catalog Apps
screen, locate theLonghorn
app and click theUp to date
button. UnderKubernetes Driver
, selectflexvolume
. We recommend leavingFlexvolume Path
empty. ClickUpgrade
. - Restore each volume. This procedure is tailored to the StatefulSet workload, but the process is approximately the same for all workloads.