--- /dev/null
+
+ $ sudo modprobe -r rbd
+ $ sudo modprobe -r libceph
+ $ lsmod | grep libceph
+ [1]
+ $ rbd create --size 1 img
+ $ DEV=$(sudo rbd map img)
+ $ sudo grep -q ',key=' /sys/bus/rbd/devices/${DEV#/dev/rbd}/config_info
+ $ sudo rbd unmap $DEV
+ $ rbd rm --no-progress img
string buf;
int r;
- r = build_map_buf(ctx->cct, spec, options, &buf);
- if (r < 0)
- return r;
-
/*
* Modprobe rbd kernel module. If it supports single-major device
* number allocation scheme, make sure it's turned on.
+ *
+ * Do this before calling build_map_buf() - it wants "ceph" key type
+ * registered.
*/
if (access("/sys/bus/rbd", F_OK) != 0) {
const char *module_options = NULL;
}
}
+ r = build_map_buf(ctx->cct, spec, options, &buf);
+ if (r < 0)
+ return r;
+
return do_map(ctx->udev, spec, buf, pname);
}