Ok now the copy is done to the right pool but the data isn't there.
I mapped both the original and the copy to try and compare :
root@client2:~# rbd showmapped
id pool image snap device
1  sp   p1b16 -    /dev/rbd1
2  sp   p2b16 -    /dev/rbd2
And try to mount :
root@client2:~# mount /dev/rbd1 /mnt/
root@client2:~# umount /mnt/
root@client2:~# mount /dev/rbd2 /mnt/
mount: you must specify the filesystem type

What strikes me is the copy is superfast and I'm in a pool in format 1 which, as far as I understand, is not supposed to support copy-on-write.

I tried listing the pool (with rados tool) and it show the p2b16.rbd file is there but no rb.0.X.Y.offset is present for p2b16 (name can be found from p2b16.rbd), while there is for p1b16.

Did I not understand the copy mechanism ?

Thanks!

Le 14/05/2013 11:52, Wolfgang Hennerbichler a écrit :
Hi,

I believe this went into the pool named 'rbd'.

if you rbd copy it's maybe easier to do it with explicit destination
pool name:

rbd cp sp/p1b16 sp/p2b16

hth
wolfgang

On 05/14/2013 11:47 AM, Greg wrote:
Hello,

I found some oddity when attempting to copy an rbd image in my pool
(using bobtail 0.56.4), please see this :

I have a built working RBD image name p1b16 :
root@nas16:~# rbd -p sp ls
p1b16
Copying image :
root@nas16:~# rbd -p sp cp p1b16 p2b16
Image copy: 100% complete...done.
Great, seems to go fine, it went superfast (a few seconds), let's check :
root@nas16:~# rbd -p sp ls
p1b16
Uh ? let's try again :
root@nas16:~# rbd -p sp cp p1b16 p2b16
2013-05-14 09:30:42.369917 400b8000 -1 Image copy: 0%
complete...failed.librbd: rbd image p2b16 already exists
rbd: copy failed:
(17) File exists
2013-05-14 09:30:42.369969 400b8000 -1 librbd: header creation failed
Doh! Really ?
root@nas16:~# rbd -p sp ls
p1b16
Hmmm, something hidden? let's try to restart :
root@nas16:~# rbd -p sp rm p2b16
2013-05-14 09:30:19.445336 400c7000 -1 librbd::ImageCtx: error finding
header: (2) No such file or directory
2013-05-14 09:30:19.644381 400c7000 -1 Removing image: librbd: error
removing img from new-style directory: (2) No such file or directory0%
complete...failed.

rbd: delete error: (2) No such file or directory
Damned, let's see at rados level :
root@nas16:~# rados -p sp ls | grep -v "rb\\."
p1b16.rbd
rbd_directory
I downloaded rbd_directory file and took a look inside, I see p1b16
(along with binary data) but no trace of p2b16

I must have missed something somewhere...

Cheers,
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com


_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to