Feature #2305

Moving rbd images between pools

Added by Stefan Kleijkers almost 12 years ago. Updated about 7 years ago.

Target version:
% Done:


Affected Versions:
Pull request ID:


It would be nice to have an option to move rbd's between pools with a syntax like:
rbd mv <first poolname>/<image name> <second poolname>/<image name>
At the moment rbd claims the name is already in use (if the image name is the same) and just renames in the same pool if the image name is different. So it ignores the poolname.

Related issues

Related to Ceph - Bug #2370: rbd doesn't support mv/rename across pools; tool should detect Resolved 05/01/2012


#1 Updated by Greg Farnum almost 12 years ago

  • Status changed from New to Rejected

We discovered it does work if you keep the image names the same and vary the pool names. :)

#2 Updated by Dan Mick almost 12 years ago

  • Status changed from Rejected to 12

Not quite; copy works, but slowly (because of course it's duplicating all the data). I don't know if mv/rename could be implemented more efficient by updating pointers, but I assume it could. In any case, it should either be implemented or the error-handling and documentation fixed to say that it doesn't work across pools.

#3 Updated by Sage Weil almost 12 years ago

  • translation missing: en.field_position set to 10

#4 Updated by Sage Weil almost 12 years ago

  • translation missing: en.field_position deleted (34)
  • translation missing: en.field_position set to 32

#5 Updated by Sage Weil almost 12 years ago

  • Category set to librbd
  • Status changed from 12 to Resolved
  • Assignee set to Dan Mick
  • Target version set to v0.47

#6 Updated by Jonas Keidel over 8 years ago

I have to reopen this topic: why is it not possible to move a rbd image to another pool?

The reason why I reopen this topic is that I have two racks of servers and I want to define one pool for each rack, but one cluster over all racks. And for migration I want to move one image from one pool to another.

#7 Updated by Марк Коренберг about 7 years ago

I move images using this command:

qemu-img convert -f raw -O raw -t unsafe -T unsafe -p rbd:prod/bck-red-konkurs3 rbd:backups/bck-red-konkurs3

It seems, this is the most effective solution for now.

Also available in: Atom PDF