Mapping a block device
Use the rbd command to map an image name to a kernel module. You must
specify the image name, the pool name and the user name. rbd will load the RBD
kernel module if it is not already loaded.
Prerequisites
-
A running IBM Storage Ceph cluster.
-
Root-level access to the node.
Procedure
- Return a list of the
images.Example
[root@rbd-client ~]# rbd list - Following are the two options to map the image:
-
Map an image name to a kernel module:
Syntax
rbd device map POOL_NAME/IMAGE_NAME --id USER_NAMEExample
[root@rbd-client ~]# rbd device map rbd/myimage --id admin -
Specify a secret when using
cephxauthentication by either the keyring or a file containing the secret:Syntax
[root@rbd-client ~]# rbd device map POOL_NAME/IMAGE_NAME --id USER_NAME --keyring PATH_TO_KEYRINGor
[root@rbd-client ~]# rbd device map POOL_NAME/IMAGE_NAME --id USER_NAME --keyfile PATH_TO_FILE
-