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 " 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

Leave a Reply