rbd cp vs. rbd clone + rbd flatten
Hi, I want 1) copy a snapshot to an image, 2) no need to copy snapshots, 3) no dependency after copy, 4) all same image format 2. In that case, is rbd cp the same as rbd clone + rbd flatten? I ran some tests, seems like it, but want to confirm, in case of missing anything. Also, seems cp is a bit faster and flatten, is that true? Thanks! Tony
On Wed, Mar 22, 2023 at 10:51 PM Tony Liu <tonyliu0592@hotmail.com> wrote:
Hi,
I want 1) copy a snapshot to an image, 2) no need to copy snapshots, 3) no dependency after copy, 4) all same image format 2. In that case, is rbd cp the same as rbd clone + rbd flatten? I ran some tests, seems like it, but want to confirm, in case of missing anything.
Hi Tony, Yes, at a high level it should be the same.
Also, seems cp is a bit faster and flatten, is that true?
I can't think of anything that would make "rbd cp" faster. I would actually expect it to be slower since "rbd cp" also attempts to sparsify the destination image (see --sparse-size option), making it more space efficient. Thanks, Ilya
Thank you Ilya! Tony ________________________________________ From: Ilya Dryomov <idryomov@gmail.com> Sent: March 27, 2023 10:28 AM To: Tony Liu Cc: ceph-users@ceph.io; dev@ceph.io Subject: Re: [ceph-users] rbd cp vs. rbd clone + rbd flatten On Wed, Mar 22, 2023 at 10:51 PM Tony Liu <tonyliu0592@hotmail.com> wrote:
Hi,
I want 1) copy a snapshot to an image, 2) no need to copy snapshots, 3) no dependency after copy, 4) all same image format 2. In that case, is rbd cp the same as rbd clone + rbd flatten? I ran some tests, seems like it, but want to confirm, in case of missing anything.
Hi Tony, Yes, at a high level it should be the same.
Also, seems cp is a bit faster and flatten, is that true?
I can't think of anything that would make "rbd cp" faster. I would actually expect it to be slower since "rbd cp" also attempts to sparsify the destination image (see --sparse-size option), making it more space efficient. Thanks, Ilya
participants (2)
-
Ilya Dryomov
-
Tony Liu