Manage Ceph RBD Device without rbd

There are lots of examples of using rbd(8) command to manage a RBD device, while there is less publicity that we can do the same by dealing with sysfs.

Some instructions can be found here. More detailed explanation of these parameters come from rbd kernel documentation. Our hero Sebastian bravely showed his usage. I also ventured to validate it on my Fedora 21 using my local Ceph container and a pool called kube, which contains an image called foo:

# echo "127.0.0.1 name=admin,secret=AQCw/W1VCOQFCRAAbRxkhg3TuCXRS42ols3hqQ== kube foo" > /sys/bus/rbd/add
# ls /dev/rbd/kube/foo -l
lrwxrwxrwx 1 root root 10 Jun 5 13:31 /dev/rbd/kube/foo -> ../../rbd2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s