1 ==========================
2 Block Device Quick Start
3 ==========================
5 To use this guide, you must have executed the procedures in the `Storage
6 Cluster Quick Start`_ guide first. Ensure your :term:`Ceph Storage Cluster` is
7 in an ``active + clean`` state before working with the :term:`Ceph Block
10 .. note:: The Ceph Block Device is also known as :term:`RBD` or :term:`RADOS`
15 /------------------\ /----------------\
16 | Admin Node | | ceph-client |
18 | ceph-deploy | | ceph |
19 \------------------/ \----------------/
22 You may use a virtual machine for your ``ceph-client`` node, but do not
23 execute the following procedures on the same physical node as your Ceph
24 Storage Cluster nodes (unless you use a VM). See `FAQ`_ for details.
26 Create a Block Device Pool
27 ==========================
29 #. On the admin node, use the ``ceph`` tool to `create a pool`_
30 (we recommend the name 'rbd').
32 #. On the admin node, use the ``rbd`` tool to initialize the pool for use by RBD::
34 rbd pool init <pool-name>
36 Configure a Block Device
37 ========================
39 #. On the ``ceph-client`` node, create a block device image. ::
41 rbd create foo --size 4096 --image-feature layering [-m {mon-IP}] [-k /path/to/ceph.client.admin.keyring] [-p {pool-name}]
43 #. On the ``ceph-client`` node, map the image to a block device. ::
45 sudo rbd map foo --name client.admin [-m {mon-IP}] [-k /path/to/ceph.client.admin.keyring] [-p {pool-name}]
47 #. Use the block device by creating a file system on the ``ceph-client``
50 sudo mkfs.ext4 -m0 /dev/rbd/{pool-name}/foo
52 This may take a few moments.
54 #. Mount the file system on the ``ceph-client`` node. ::
56 sudo mkdir /mnt/ceph-block-device
57 sudo mount /dev/rbd/{pool-name}/foo /mnt/ceph-block-device
58 cd /mnt/ceph-block-device
60 #. Optionally configure the block device to be automatically mapped and mounted
61 at boot (and unmounted/unmapped at shutdown) - see the `rbdmap manpage`_.
64 See `block devices`_ for additional details.
66 .. _Storage Cluster Quick Start: ../quick-ceph-deploy
67 .. _create a pool: ../../rados/operations/pools/#create-a-pool
68 .. _block devices: ../../rbd
69 .. _FAQ: http://wiki.ceph.com/How_Can_I_Give_Ceph_a_Try
70 .. _OS Recommendations: ../os-recommendations
71 .. _rbdmap manpage: ../../man/8/rbdmap