Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use librbd for rbd management in ceph-integration #150

Open
shtripat opened this issue Mar 13, 2017 · 1 comment
Open

Use librbd for rbd management in ceph-integration #150

shtripat opened this issue Mar 13, 2017 · 1 comment
Assignees

Comments

@shtripat
Copy link
Member

Currently ceph-integration executes rbd CLI commands for performing rbd management works. We should rather use librbd module for more controlled and organized way to handle rbd management.

Refer: http://docs.ceph.com/docs/master/rbd/librbdpy/ for more details.

@GowthamShanmugam
Copy link

GowthamShanmugam commented Jun 9, 2017

@r0h4n @shtripat I have checked librbd, i have tested rbd creation it works fine, When is try to display rbd information using some built in function it gives info like

{'parent_name': '', 'parent_pool': 18446744073709551615L, 'num_objs': 256L, 'block_name_prefix': u'rbd_data.106d2ae8944a', 'obj_size': 4194304L, 'order': 22, 'size': 1073741824L}
it gives total size but it not give used size. I have trired with different functions but nothing is providing used information.

Current command is:
rbd du MyBlockDevice -p MyPool
NAME PROVISIONED USED
MyBlockDevice 1024M 0

here provisioning size is nothing but a total size of rbd, so librbd command gives szie 1073741824L it nothing but a 1gb. but no used size is present.

i filled some data with rbd then size become
[root@dhcp42-230 ~]# rbd du MyBlockDevice -p MyPool
NAME PROVISIONED USED
MyBlockDevice 1024M 4096k

but no change in rbd_inst.stat() output:
{'parent_name': '', 'parent_pool': 18446744073709551615L, 'num_objs': 256L, 'block_name_prefix': u'rbd_data.106d2ae8944a', 'obj_size': 4194304L, 'order': 22, 'size': 1073741824L}

And one more thing is, if cluster is in error state then rbd creation is hanging, no timeout for the create function so we have to timeout using some thread (import multiprocessing) https://codepaste.net/s4jczr.

GowthamShanmugam pushed a commit to GowthamShanmugam/ceph-integration that referenced this issue Jun 12, 2017
GowthamShanmugam pushed a commit to GowthamShanmugam/ceph-integration that referenced this issue Jun 12, 2017
GowthamShanmugam pushed a commit to GowthamShanmugam/ceph-integration that referenced this issue Jun 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants