Re: failed to open snapshot after 'rados cppool '

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[ Returning list to thread. ]

On Wed, Jan 22, 2014 at 11:37 PM, Dmitry Lysenko <tavx@xxxxxxxxxx> wrote:
> 22.01.2014 13:01, Gregory Farnum пишет:
>
>
>> On Wed, Jan 22, 2014 at 3:23 AM, Dmitry Lysenko <tavx@xxxxxxxxxx> wrote:
>> > Good day.
>> >
>> > Some time ago i change pg_num like this http://www.sebastien-han.fr/blog/2013/03/12/ceph-change-pg-number-on-the-fly/:
>> >
>> > ceph osd pool create one-new 500
>> > rados cppool one one-new
>>
>> Unfortunately, this command is not copying snapshots, which are
>> required for rbd images. Modern RBD also maintains a small amount of
>> extra metadata which I think will be broken by doing this, too. I'm
>> afraid you've permanently removed data which you need. :(
>>
>> For future reference, you should just be incrementing the pg_num like
>> he says when you visit the page now.
>> -Greg
>> Software Engineer #42 @ http://inktank.com | http://ceph.com
>>
>> > ceph osd pool delete one
>> > ceph osd pool rename one-new one
>> >
>> > Before changes:
>> > ceph osd lspools
>> > 0 data,1 metadata,2 rbd,5 one,
>> >
>> > After changes:
>> > 0 data,1 metadata,2 rbd,6 one,
>> >
>> > But after that i got an error:
>> > rbd --pool one ls -l
>> > 2014-01-22 15:03:49.965040 7f022a7cb760 -1 librbd: error looking up name for pool id 5: (2) No such file or directory
>> > 2014-01-22 15:03:49.965100 7f022a7cb760 -1 librbd: error opening parent snapshot: (2) No such file or directory
>> > 2014-01-22 15:03:49.982534 7f022a7cb760 -1 librbd: error looking up name for pool id 5: (2) No such file or directory
>> > 2014-01-22 15:03:49.982557 7f022a7cb760 -1 librbd: error opening parent snapshot: (2) No such file or directory
>> > NAME           SIZE PARENT FMT PROT LOCK
>> > one-104      20480M          2
>> > one-41       11264M          2
>> > one-86        8192M          2
>> > one-93       10000M          2
>> > one-93@130-0 10000M          2 yes
>> > one-95       10000M          2
>> > one-95@142-0 10000M          2 yes
>> > one-95-150-0 10000M          2
>> > one-96       10000M          2
>> >
>> > rbd --pool one cp one-93-130-0 one-93-130+
>> > 2014-01-22 15:12:41.111368 7fd95d892760 -1 librbd: error looking up name for pool id 5: (2) No such file or directory
>> > 2014-01-22 15:12:41.111404 7fd95d892760 -1 librbd: error opening parent snapshot: (2) No such file or directory
>> > rbd: error opening image one-93-130-0: (2) No such file or directory
>> >
>> > and so on...
>> >
>> > May be snapshots referenced to old pool with id=5?
>> > How to fix this?
>> >
>> > Thank you.
>
> Good day.
>
> Data of cloned images are exist (headers and data present).
> May i get data from pool by "rados get rbd_data..."
> and after concatenate that to working image?

Cloned images are stored as:
1) A reference to a snapshot which serves as the golden image.
2) The data blocks which differ from that golden image.

You've broken the reference (because it's not in pool id 5 any more),
and you've also deleted the snapshots (because they are not copied by
the rados cppool command).
If you elsewhere have a copy of the golden image, you could
reconstruct the clone by manually extracting the different blocks and
overlaying them, sure.

> p.s. I want to remove second clone of snapshot:
> rbd --pool one snap rm one-95@142-0
> but all mons goes to fault (see log and 'objdump -rdS ceph-mon' of one
> monitor in attach)

Interesting, looks like the monitor isn't error-checking the input
enough or something. I created a bug:
http://tracker.ceph.com/issues/7210
-Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com





[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux