Mounting an existing volume to LKE
I have a previous docker setup where I keep persistent data in some mounted network volumes using the linode docker volume driver, and I was wanting to move to K8s but I don't want to lose this data, so I was wondering if there was a way to re-mount these volumes using the Linode CSI?
I kind of already asked in the github issues section but I'm guessing something like this would work?:
apiVersion: v1 kind: PersistentVolume metadata: name: my-persistentvolume annotations: pv.kubernetes.io/provisioned-by: linodebs.csi.linode.com spec: storageClassName: linode-block-storage-retain capacity: storage: 10Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain claimRef: namespace: default name: my-persistentvolumeclaim csi: driver: linodebs.csi.linode.com volumeHandle: <linode_volume_label> readOnly: false fsType: ext4 --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: my-persistentvolumeclaim spec: accessModes: - ReadWriteOnce resources: requests: storage: 10Gi storageClassName: linode-block-storage-retain volumeName: my-persistentvolume
but it seems like this isn't working. does the CSI driver have support for re-mounting existing volumes? Or do I have to manually move all this data into the new volumes created through the CSI driver?
@JonathanKurumi the Linode CSI driver doesn't currently support remounting existing disk. At this time, you'll need to move your data over onto the new volumes. I understand how inconvenient this is, and I've made sure our developers are aware of this feature request. I'm also going to create a ticket in our internal tracker to record this feature request.