mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
f0b2ea6a6d
During resync operation the local image will get deleted and a new image is recreated by the rbd mirroring. The new image will have a new imageID. Once resync is completed update the imageID in the OMAP to get the image removed from the trash during DeleteVolume. Before resyncing ``` sh-4.4# rbd info replicapool/csi-vol-0c25bdd3-485f-11ec-bd30-0242ac110004 rbd image 'csi-vol-0c25bdd3-485f-11ec-bd30-0242ac110004': size 1 GiB in 256 objects order 22 (4 MiB objects) snapshot_count: 1 id: 1efcc6b7a769 block_name_prefix: rbd_data.1efcc6b7a769 format: 2 features: layering op_features: flags: create_timestamp: Thu Nov 18 11:02:40 2021 access_timestamp: Thu Nov 18 11:02:40 2021 modify_timestamp: Thu Nov 18 11:02:40 2021 mirroring state: enabled mirroring mode: snapshot mirroring global id: 9c4c236d-8a47-4779-b4f6-94e05da70dbd mirroring primary: true ``` ``` sh-4.4# rados listomapvals csi.volume.0c25bdd3-485f-11ec-bd30-0242ac110004 --pool=replicapool csi.imageid value (12 bytes) : 00000000 31 65 66 63 63 36 62 37 61 37 36 39 |1efcc6b7a769| 0000000c csi.imagename value (44 bytes) : 00000000 63 73 69 2d 76 6f 6c 2d 30 63 32 35 62 64 64 33 |csi-vol-0c25bdd3| 00000010 2d 34 38 35 66 2d 31 31 65 63 2d 62 64 33 30 2d |-485f-11ec-bd30-| 00000020 30 32 34 32 61 63 31 31 30 30 30 34 |0242ac110004| 0000002c csi.volname value (40 bytes) : 00000000 70 76 63 2d 32 36 38 39 33 66 30 38 2d 66 66 32 |pvc-26893f08-ff2| 00000010 62 2d 34 61 30 66 2d 61 35 63 33 2d 38 38 34 62 |b-4a0f-a5c3-884b| 00000020 37 32 30 66 66 62 32 63 |720ffb2c| 00000028 csi.volume.owner value (7 bytes) : 00000000 64 65 66 61 75 6c 74 |default| 00000007 ``` After Resyncing ``` sh-4.4# rbd info replicapool/csi-vol-0c25bdd3-485f-11ec-bd30-0242ac110004 rbd image 'csi-vol-0c25bdd3-485f-11ec-bd30-0242ac110004': size 1 GiB in 256 objects order 22 (4 MiB objects) snapshot_count: 1 id: 10b183a48a97 block_name_prefix: rbd_data.10b183a48a97 format: 2 features: layering, non-primary op_features: flags: create_timestamp: Thu Nov 18 11:09:39 2021 access_timestamp: Thu Nov 18 11:09:39 2021 modify_timestamp: Thu Nov 18 11:09:39 2021 mirroring state: enabled mirroring mode: snapshot mirroring global id: 9c4c236d-8a47-4779-b4f6-94e05da70dbd mirroring primary: false sh-4.4# rados listomapvals csi.volume.0c25bdd3-485f-11ec-bd30-0242ac110004 --pool=replicapool csi.imageid value (12 bytes) : 00000000 31 30 62 31 38 33 61 34 38 61 39 37 |10b183a48a97| 0000000c csi.imagename value (44 bytes) : 00000000 63 73 69 2d 76 6f 6c 2d 30 63 32 35 62 64 64 33 |csi-vol-0c25bdd3| 00000010 2d 34 38 35 66 2d 31 31 65 63 2d 62 64 33 30 2d |-485f-11ec-bd30-| 00000020 30 32 34 32 61 63 31 31 30 30 30 34 |0242ac110004| 0000002c csi.volname value (40 bytes) : 00000000 70 76 63 2d 32 36 38 39 33 66 30 38 2d 66 66 32 |pvc-26893f08-ff2| 00000010 62 2d 34 61 30 66 2d 61 35 63 33 2d 38 38 34 62 |b-4a0f-a5c3-884b| 00000020 37 32 30 66 66 62 32 63 |720ffb2c| 00000028 csi.volume.owner value (7 bytes) : 00000000 64 65 66 61 75 6c 74 |default| 00000007 ``` Signed-off-by: Madhu Rajanna <madhupr007@gmail.com> |
||
---|---|---|
.. | ||
clone.go | ||
controllerserver_test.go | ||
controllerserver.go | ||
driver.go | ||
encryption.go | ||
errors.go | ||
identityserver.go | ||
migration_test.go | ||
migration.go | ||
mirror.go | ||
nodeserver_test.go | ||
nodeserver.go | ||
rbd_attach_test.go | ||
rbd_attach.go | ||
rbd_healer.go | ||
rbd_journal.go | ||
rbd_util_test.go | ||
rbd_util.go | ||
replicationcontrollerserver_test.go | ||
replicationcontrollerserver.go | ||
snapshot.go |