There IS an 'rbd mv', and also 'rbd cp' does the exact copy. Or am I missing something in the question? ср, 17 февр. 2021 г. в 18:55, Marc <Marc@f1-outsourcing.eu>:
-----Original Message----- From: Marc <Marc@f1-outsourcing.eu> Sent: 17 February 2021 15:51 To: 'ceph-users@ceph.io' <ceph-users@ceph.io> Subject: [ceph-users] Re: rbd move between pools
What is the best way to move an rbd image to a different pool. I want to move some 'old' images (some have snapshots) to backup pool. For some there is also a difference in device class.
This is what I found on the mailing list, but it is from 2018. So
maybe
this is outdated?
rbd export --export-format 2 vms/vm-102-disk-2 - | rbd import -- export- format 2 - vdisks/vm-102-disk-2
why this and not eg 'rbd cp'
I guess I will have to use the 'rbd deep cp'. It would be nice to have 'rbd mv' so you are sure dest and source are the same, otherwise the command would fail.
sha256sum /dev/rbd/rbd/test-copy 49084eb0c282f378b5eac865d71582d46d84b818ce003b7f3abfa6afc397a919 /dev/rbd/rbd/test-copy
rbd snap create test-copy@snap1
head -c 3G </dev/urandom > /dev/rbd/rbd/test-copy sha256sum /dev/rbd/rbd/test-copy e16059ccfe2e5bea6e0c1c47b1755457acad1be6ad7162e370f28bb3084dc76d /dev/rbd/rbd/test-copy
e16059ccfe2e5bea6e0c1c47b1755457acad1be6ad7162e370f28bb3084dc76d /dev/rbd/rbd.backup/test-copy
rbd deep cp rbd/test-copy rbd.backup/test-copy
rbd snap protect rbd/test-copy@snap1 rbd clone rbd/test-copy@snap1 rbd/test-copy-clone
rbd snap protect rbd.backup/test-copy@snap1 rbd clone rbd.backup/test-copy@snap1 rbd.backup/test-copy-clone
rbd map rbd/test-copy-clone sha256sum /dev/rbd/rbd/test-copy-clone
sha256sum /dev/rbd/rbd/test-copy-clone 49084eb0c282f378b5eac865d71582d46d84b818ce003b7f3abfa6afc397a919 /dev/rbd/rbd/test-copy-clone sha256sum /dev/rbd/rbd.backup/test-copy-clone 49084eb0c282f378b5eac865d71582d46d84b818ce003b7f3abfa6afc397a919 /dev/rbd/rbd.backup/test-copy-clone _______________________________________________ ceph-users mailing list -- ceph-users@ceph.io To unsubscribe send an email to ceph-users-leave@ceph.io