1 ==========================
2 Kernel Module Operations
3 ==========================
5 .. index:: Ceph Block Device; kernel module
7 .. important:: To use kernel module operations, you must have a running Ceph cluster.
12 To mount a block device image, first return a list of the images. ::
19 Use ``rbd`` to map an image name to a kernel module. You must specify the
20 image name, the pool name, and the user name. ``rbd`` will load RBD kernel
21 module on your behalf if it's not already loaded. ::
23 sudo rbd device map {pool-name}/{image-name} --id {user-name}
27 sudo rbd device map rbd/myimage --id admin
29 If you use `cephx`_ authentication, you must also specify a secret. It may come
30 from a keyring or a file containing the secret. ::
32 sudo rbd device map rbd/myimage --id admin --keyring /path/to/keyring
33 sudo rbd device map rbd/myimage --id admin --keyfile /path/to/file
36 Show Mapped Block Devices
37 =========================
39 To show block device images mapped to kernel modules with the ``rbd``,
40 specify ``device list`` arguments. ::
45 Unmapping a Block Device
46 ========================
48 To unmap a block device image with the ``rbd`` command, specify the
49 ``device unmap`` arguments and the device name (i.e., by convention the
50 same as the block device image name). ::
52 sudo rbd device unmap /dev/rbd/{poolname}/{imagename}
56 sudo rbd device unmap /dev/rbd/rbd/foo
59 .. _cephx: ../../rados/operations/user-management/