2012-12-19 21:47:11 +00:00
|
|
|
==========================
|
|
|
|
Block Device Quick Start
|
|
|
|
==========================
|
2012-07-03 18:21:43 +00:00
|
|
|
|
2013-09-17 21:04:29 +00:00
|
|
|
To use this guide, you must have executed the procedures in the `Storage
|
|
|
|
Cluster Quick Start`_ guide first. Ensure your :term:`Ceph Storage Cluster` is
|
|
|
|
in an ``active + clean`` state before working with the :term:`Ceph Block
|
2013-09-30 22:01:39 +00:00
|
|
|
Device`.
|
2013-05-23 18:45:14 +00:00
|
|
|
|
|
|
|
.. 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
|
|
|
|
2013-09-30 22:01:39 +00:00
|
|
|
.. ditaa::
|
|
|
|
/------------------\ /----------------\
|
2016-05-06 09:20:40 +00:00
|
|
|
| Admin Node | | ceph-client |
|
2013-09-30 22:01:39 +00:00
|
|
|
| +-------->+ cCCC |
|
2016-05-06 09:20:40 +00:00
|
|
|
| ceph-deploy | | ceph |
|
2013-09-30 22:01:39 +00:00
|
|
|
\------------------/ \----------------/
|
2013-06-11 19:11:51 +00:00
|
|
|
|
2012-07-03 18:21:43 +00:00
|
|
|
|
2013-09-30 22:01:39 +00:00
|
|
|
You may use a virtual machine for your ``ceph-client`` node, but do not
|
|
|
|
execute the following procedures on the same physical node as your Ceph
|
|
|
|
Storage Cluster nodes (unless you use a VM). See `FAQ`_ for details.
|
2012-07-03 18:21:43 +00:00
|
|
|
|
2013-09-30 22:01:39 +00:00
|
|
|
|
|
|
|
Install Ceph
|
|
|
|
============
|
|
|
|
|
2013-10-22 20:24:11 +00:00
|
|
|
#. Verify that you have an appropriate version of the Linux kernel.
|
|
|
|
See `OS Recommendations`_ for details. ::
|
|
|
|
|
|
|
|
lsb_release -a
|
|
|
|
uname -r
|
|
|
|
|
2013-09-30 22:01:39 +00:00
|
|
|
#. On the admin node, use ``ceph-deploy`` to install Ceph on your
|
|
|
|
``ceph-client`` node. ::
|
|
|
|
|
|
|
|
ceph-deploy install ceph-client
|
|
|
|
|
2013-09-30 22:25:28 +00:00
|
|
|
#. On the admin node, use ``ceph-deploy`` to copy the Ceph configuration file
|
|
|
|
and the ``ceph.client.admin.keyring`` to the ``ceph-client``. ::
|
2013-09-30 22:01:39 +00:00
|
|
|
|
|
|
|
ceph-deploy admin ceph-client
|
|
|
|
|
2014-07-10 15:05:42 +00:00
|
|
|
The ``ceph-deploy`` utility copies the keyring to the ``/etc/ceph``
|
|
|
|
directory. Ensure that the keyring file has appropriate read permissions
|
2015-01-22 12:58:54 +00:00
|
|
|
(e.g., ``sudo chmod +r /etc/ceph/ceph.client.admin.keyring``).
|
2014-07-10 15:05:42 +00:00
|
|
|
|
2013-09-30 22:01:39 +00:00
|
|
|
|
|
|
|
Configure a Block Device
|
|
|
|
========================
|
|
|
|
|
|
|
|
#. On the ``ceph-client`` node, create a block device image. ::
|
|
|
|
|
|
|
|
rbd create foo --size 4096 [-m {mon-IP}] [-k /path/to/ceph.client.admin.keyring]
|
|
|
|
|
|
|
|
#. On the ``ceph-client`` node, map the image to a block device. ::
|
2012-07-03 18:21:43 +00:00
|
|
|
|
2015-07-17 09:41:29 +00:00
|
|
|
sudo rbd map foo --name client.admin [-m {mon-IP}] [-k /path/to/ceph.client.admin.keyring]
|
2012-07-03 18:21:43 +00:00
|
|
|
|
2013-09-30 22:01:39 +00:00
|
|
|
#. Use the block device by creating a file system on the ``ceph-client``
|
|
|
|
node. ::
|
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.
|
|
|
|
|
2013-09-30 22:01:39 +00:00
|
|
|
#. Mount the file system on the ``ceph-client`` node. ::
|
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
|
|
|
|
2012-12-19 21:47:11 +00:00
|
|
|
See `block devices`_ for additional details.
|
|
|
|
|
2013-09-17 21:04:29 +00:00
|
|
|
.. _Storage Cluster Quick Start: ../quick-ceph-deploy
|
2013-02-25 16:21:11 +00:00
|
|
|
.. _block devices: ../../rbd/rbd
|
2016-07-01 07:29:13 +00:00
|
|
|
.. _FAQ: http://wiki.ceph.com/How_Can_I_Give_Ceph_a_Try
|
2013-10-22 20:24:11 +00:00
|
|
|
.. _OS Recommendations: ../os-recommendations
|