Skip to contentSkip to conversation

rename whilst in use

DISCUSSION Wolfgang Hennerbichler 2 participants 4 messages Feb 27, 2013 – Feb 28, 2013

lore
Share & tools
lore
#0 lore raw

hi,

I've accidently renamed a rbd object that has been in use within a kvm-domain.

After detaching the rbd object I could rename it, but the source seems still to be around in space:

# rbd ls -l rd | grep mysql3
mysql3.new  12000M          2
# rbd create rd/test --size 1
# rbd rename rd/test rd/mysql3
rbd: rename error: 2013-02-27 13:53:29.817863 7f3424ba8780 -1 librbd:
rbd image mysql3 already exists
(17) File exists

unfortunately my scrollback buffer isn't long enough to find out about the actual error I got during the first rename, but it should be easy to reproduce.
I assume this is a bug, that's why I posted it to ceph-devel directly.

Wolfgang

Signature · 15 lines
DI (FH) Wolfgang Hennerbichler
Software Development
Unit Advanced Computing Technologies
RISC Software GmbH
A company of the Johannes Kepler University Linz

IT-Center
Softwarepark 35
4232 Hagenberg
Austria

Phone: +43 7236 3343 245
Fax: +43 7236 3343 250
[email protected]
http://www.risc-software.at
#1 lore raw
Quoted 8 lines · Wolfgang Hennerbichler

hi,

I've accidently renamed a rbd object that has been in use within a kvm-domain.

After detaching the rbd object I could rename it, but the source seems still to be around in space:

Quoted 8 lines
# rbd ls -l rd | grep mysql3
mysql3.new  12000M          2
# rbd create rd/test --size 1
# rbd rename rd/test rd/mysql3
rbd: rename error: 2013-02-27 13:53:29.817863 7f3424ba8780 -1 librbd:
rbd image mysql3 already exists
(17) File exists

Since it doesn't appear in rbd ls, this suggests that the old rbd_id.mysql3 object still exists.

Quoted 3 lines

unfortunately my scrollback buffer isn't long enough to find out about the actual error I got during the first rename, but it should be easy to reproduce.

I can't reproduce it (at least not with format 2 images). Can you? I'd expect this problem with format 1 images, since they don't separate the header object from the name of the image.

Quoted 1 line

I assume this is a bug, that's why I posted it to ceph-devel directly.

Thanks, it certainly seems like a bug.

Josh

#2 lore raw
Quoted 2 lines · Josh Durgin

Since it doesn't appear in rbd ls, this suggests that the old rbd_id.mysql3 object still exists.

Yes. Is there a way I can safely delete it?

rados ls -p rd | grep mysql | less
mysql3.rbd
rbd_id.mysql3.new

=> here it is (and yes, it's format==1). can I just say rados rm ... without having to fear that everything breaks down?

Quoted 5 lines
Quoted 3 lines

unfortunately my scrollback buffer isn't long enough to find out about the actual error I got during the first rename, but it should be easy to reproduce.

I can't reproduce it (at least not with format 2 images). Can you?

I currently only have this production system to play, so I can't really try. but you're right, it's a format 1 image. (that was the use case, I tried to "convert" a format 1 image to a format 2 image by creating the .new and copying stuff over)

Quoted 2 lines

I'd expect this problem with format 1 images, since they don't separate the header object from the name of the image.

so true. :)

Quoted 1 line

Thanks, it certainly seems like a bug.

as it's a format==1 bug, maybe it's of less importance. so: is rados rm mysql3.rbd a good idea? :)

Quoted 1 line

Josh

Wolfgang

PS: I didn't receive mails (even not your reply) on the mailing-list for about 12 hours, did your mailserver break? Is your mailserver backed by ceph-fs? :)

#3 lore raw
Quoted 5 lines · Wolfgang Hennerbichler
Quoted 2 lines · Josh Durgin

Since it doesn't appear in rbd ls, this suggests that the old rbd_id.mysql3 object still exists.

Quoted 8 lines

Yes. Is there a way I can safely delete it?

rados ls -p rd | grep mysql | less
mysql3.rbd
rbd_id.mysql3.new

=> here it is (and yes, it's format==1). can I just say rados rm ... without having to fear that everything breaks down?

If you've just had this problem with a format 1 image, you can safely rados rm the old header (oldname.rbd). It's the only thing that wouldn't be cleaned up by a rename while it's in use.

Quoted 14 lines
Quoted 5 lines
Quoted 3 lines

unfortunately my scrollback buffer isn't long enough to find out about the actual error I got during the first rename, but it should be easy to reproduce.

I can't reproduce it (at least not with format 2 images). Can you?

I currently only have this production system to play, so I can't really try. but you're right, it's a format 1 image. (that was the use case, I tried to "convert" a format 1 image to a format 2 image by creating the .new and copying stuff over)

Quoted 2 lines

I'd expect this problem with format 1 images, since they don't separate the header object from the name of the image.

Quoted 6 lines

so true. :)

Quoted 1 line

Thanks, it certainly seems like a bug.

as it's a format==1 bug, maybe it's of less importance. so: is rados rm mysql3.rbd a good idea? :)

If mysql3 is the old name of the image that was renamed while in use, yes.

Quoted 7 lines
Quoted 1 line

Josh

Wolfgang

PS: I didn't receive mails (even not your reply) on the mailing-list for about 12 hours, did your mailserver break? Is your mailserver backed by ceph-fs? :)

Not yet :) I'm not sure why that happened, I didn't notice any issues with vger or my other emails today.