openebs-archive / openebs-docs

OpenEBS Documentation
https://docs.openebs.io
Apache License 2.0
37 stars 137 forks source link

Not able to create cloned volume from snapshot #499

Closed ranjithwingrider closed 5 years ago

ranjithwingrider commented 5 years ago

This issue has been raised by @ksondere in the community channel

I setup an iscsi target on each of my nodes, installed openebs with helm and using other helm installs pvc's are working fine with jiva storage class. I then create a snapshot on a pvc and that works too. However my issue comes with creating a pvc from the snapshot. When I do that I get the following error.

Name:          xl-release-data-snapshot-claim
Namespace:    default
StorageClass:  openebs-snapshot-promoter
Status:        Pending
Volume:
Labels:        <none>
Annotations:  kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"v1","kind":"PersistentVolumeClaim","metadata":{"annotations":{"snapshot.alpha.kubernetes.io/shapshot":"xl-release-snapshot"},"name":"xl-...
              snapshot.alpha.kubernetes.io/shapshot=xl-release-snapshot
              volume.beta.kubernetes.io/storage-provisioner=volumesnapshot.external-storage.k8s.io/snapshot-promoter
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode:    Filesystem
Events:
 Type    Reason                Age                            From                                                                                                                                      Message
 ----    ------                ----                          ----                                                                                                                                      -------
 Normal  ExternalProvisioning  <invalid> (x4 over <invalid>)  persistentvolume-controller                                                                                                              waiting for a volume to be created, either by external provisioner "volumesnapshot.external-storage.k8s.io/snapshot-promoter" or manually created by system administrator
 Normal  Provisioning          <invalid> (x2 over <invalid>)  volumesnapshot.external-storage.k8s.io/snapshot-promoter_openebs-snapshot-operator-68c65b8767-6s6fz_e0f9e836-1370-11e9-af76-467fb97678b7  External provisioner is provisioning volume for claim "default/xl-release-data-snapshot-claim"
 Warning  ProvisioningFailed    <invalid> (x2 over <invalid>)  volumesnapshot.external-storage.k8s.io/snapshot-promoter_openebs-snapshot-operator-68c65b8767-6s6fz_e0f9e836-1370-11e9-af76-467fb97678b7  failed to provision volume with StorageClass "openebs-snapshot-promoter": snapshot annotation not found on PV

snapshot annotation not found on PV, not sure at the moment what I need to do

ranjithwingrider commented 5 years ago

From the logs shared in OpenEBS community channel, observed that this is due to the stale entries of snapshot and snapshot data. Once these stale entries are deleted, it can create a clone volume from the latest snapshot.

kubectl delete volumesnapshot <snapshotname>
kubectl delete volumesnapshotdata <snapshotdataname>

This note has been made in the documentation. https://docs.openebs.io/docs/next/operations.html#creating-a-cstor-snapshot