2012-12-19 21:47:11 +00:00
|
|
|
==========================
|
|
|
|
Block Device Quick Start
|
|
|
|
==========================
|
2012-07-03 18:21:43 +00:00
|
|
|
|
2013-05-23 18:45:14 +00:00
|
|
|
To use this guide, you must have executed the procedures in the `Object Store
|
|
|
|
Quick Start`_ guide first. Ensure your :term:`Ceph Storage Cluster` is in an
|
|
|
|
``active + clean`` state before working with the :term:`Ceph Block Device`.
|
|
|
|
Execute this quick start on the admin node.
|
|
|
|
|
|
|
|
.. note:: The Ceph Block Device is also known as :term:`RBD` or :term:`RADOS`
|
|
|
|
Block Device.
|
2012-07-03 18:21:43 +00:00
|
|
|
|
2013-06-11 19:11:51 +00:00
|
|
|
#. Install ``ceph-common``. ::
|
|
|
|
|
|
|
|
sudo apt-get install ceph-common
|
|
|
|
|
2012-12-19 21:47:11 +00:00
|
|
|
#. Create a block device image. ::
|
2012-07-03 18:21:43 +00:00
|
|
|
|
2013-05-23 18:45:14 +00:00
|
|
|
rbd create foo --size 4096 [-m {mon-IP}] [-k /path/to/ceph.client.admin.keyring]
|
2012-07-03 18:21:43 +00:00
|
|
|
|
2012-10-08 17:48:27 +00:00
|
|
|
#. Load the ``rbd`` client module. ::
|
2012-07-03 18:21:43 +00:00
|
|
|
|
|
|
|
sudo modprobe rbd
|
|
|
|
|
2012-10-08 17:48:27 +00:00
|
|
|
#. Map the image to a block device. ::
|
2012-07-03 18:21:43 +00:00
|
|
|
|
2013-05-23 18:45:14 +00:00
|
|
|
sudo rbd map foo --pool rbd --name client.admin [-m {mon-IP}] [-k /path/to/ceph.client.admin.keyring]
|
2012-07-03 18:21:43 +00:00
|
|
|
|
2012-10-08 17:48:27 +00:00
|
|
|
#. Use the block device. In the following example, create a file system. ::
|
2012-07-03 18:21:43 +00:00
|
|
|
|
|
|
|
sudo mkfs.ext4 -m0 /dev/rbd/rbd/foo
|
|
|
|
|
2013-05-23 18:45:14 +00:00
|
|
|
This may take a few moments.
|
|
|
|
|
2012-10-08 17:48:27 +00:00
|
|
|
#. Mount the file system. ::
|
2012-07-03 18:21:43 +00:00
|
|
|
|
2013-05-23 18:45:14 +00:00
|
|
|
sudo mkdir /mnt/ceph-block-device
|
|
|
|
sudo mount /dev/rbd/rbd/foo /mnt/ceph-block-device
|
|
|
|
cd /mnt/ceph-block-device
|
2012-12-19 21:47:11 +00:00
|
|
|
|
2013-02-25 16:21:11 +00:00
|
|
|
.. note:: Mount the block device on the client machine,
|
|
|
|
not the server machine. See `FAQ`_ for details.
|
|
|
|
|
2012-12-19 21:47:11 +00:00
|
|
|
See `block devices`_ for additional details.
|
|
|
|
|
2013-05-23 18:45:14 +00:00
|
|
|
.. _Object Store Quick Start: ../quick-ceph-deploy
|
2013-02-25 16:21:11 +00:00
|
|
|
.. _block devices: ../../rbd/rbd
|
2013-05-23 18:45:14 +00:00
|
|
|
.. _FAQ: http://wiki.ceph.com/03FAQs/01General_FAQ#How_Can_I_Give_Ceph_a_Try.3F
|