2013-08-20 00:27:10 +00:00
|
|
|
|
=============================
|
|
|
|
|
Storage Cluster Quick Start
|
|
|
|
|
=============================
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
|
|
|
|
If you haven't completed your `Preflight Checklist`_, do that first. This
|
2013-09-24 21:44:25 +00:00
|
|
|
|
**Quick Start** sets up a :term:`Ceph Storage Cluster` using ``ceph-deploy``
|
2014-10-13 15:09:38 +00:00
|
|
|
|
on your admin node. Create a three Ceph Node cluster so you can
|
|
|
|
|
explore Ceph functionality.
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2014-05-08 01:01:52 +00:00
|
|
|
|
.. include:: quick-common.rst
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
As a first exercise, create a Ceph Storage Cluster with one Ceph Monitor and two
|
2014-10-13 15:09:38 +00:00
|
|
|
|
Ceph OSD Daemons. Once the cluster reaches a ``active + clean`` state, expand it
|
2013-09-24 21:44:25 +00:00
|
|
|
|
by adding a third Ceph OSD Daemon, a Metadata Server and two more Ceph Monitors.
|
2014-05-29 20:22:52 +00:00
|
|
|
|
For best results, create a directory on your admin node node for maintaining the
|
|
|
|
|
configuration files and keys that ``ceph-deploy`` generates for your cluster. ::
|
|
|
|
|
|
|
|
|
|
mkdir my-cluster
|
|
|
|
|
cd my-cluster
|
|
|
|
|
|
|
|
|
|
The ``ceph-deploy`` utility will output files to the current directory. Ensure you
|
|
|
|
|
are in this directory when executing ``ceph-deploy``.
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
.. important:: Do not call ``ceph-deploy`` with ``sudo`` or run it as ``root``
|
|
|
|
|
if you are logged in as a different user, because it will not issue ``sudo``
|
2013-10-10 19:20:37 +00:00
|
|
|
|
commands needed on the remote host.
|
2014-10-13 15:09:38 +00:00
|
|
|
|
|
2014-05-12 18:33:57 +00:00
|
|
|
|
.. topic:: Disable ``requiretty``
|
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
On some distributions (e.g., CentOS), you may receive an error while trying
|
2014-05-12 18:33:57 +00:00
|
|
|
|
to execute ``ceph-deploy`` commands. If ``requiretty`` is set
|
2014-10-13 15:09:38 +00:00
|
|
|
|
by default, disable it by executing ``sudo visudo`` and locate the
|
2014-07-04 12:28:03 +00:00
|
|
|
|
``Defaults requiretty`` setting. Change it to ``Defaults:ceph !requiretty`` to
|
2014-10-13 15:09:38 +00:00
|
|
|
|
ensure that ``ceph-deploy`` can connect using the ``ceph`` user and execute
|
2014-05-12 18:33:57 +00:00
|
|
|
|
commands with ``sudo``.
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
Create a Cluster
|
|
|
|
|
================
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-09-24 21:44:25 +00:00
|
|
|
|
If at any point you run into trouble and you want to start over, execute
|
2014-10-13 15:09:38 +00:00
|
|
|
|
the following to purge the configuration::
|
|
|
|
|
|
2013-09-24 21:44:25 +00:00
|
|
|
|
ceph-deploy purgedata {ceph-node} [{ceph-node}]
|
|
|
|
|
ceph-deploy forgetkeys
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2014-01-17 00:51:17 +00:00
|
|
|
|
To purge the Ceph packages too, you may also execute::
|
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
ceph-deploy purge {ceph-node} [{ceph-node}]
|
2014-01-17 00:51:17 +00:00
|
|
|
|
|
|
|
|
|
If you execute ``purge``, you must re-install Ceph.
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2014-01-17 00:51:17 +00:00
|
|
|
|
On your admin node from the directory you created for holding your
|
2014-05-29 20:22:52 +00:00
|
|
|
|
configuration details, perform the following steps using ``ceph-deploy``.
|
2013-09-24 21:44:25 +00:00
|
|
|
|
|
2014-01-17 00:51:17 +00:00
|
|
|
|
#. Create the cluster. ::
|
2013-05-06 17:50:24 +00:00
|
|
|
|
|
2014-01-17 00:51:17 +00:00
|
|
|
|
ceph-deploy new {initial-monitor-node(s)}
|
|
|
|
|
|
|
|
|
|
For example::
|
|
|
|
|
|
|
|
|
|
ceph-deploy new node1
|
2013-05-06 17:50:24 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
Check the output of ``ceph-deploy`` with ``ls`` and ``cat`` in the current
|
2014-10-13 15:09:38 +00:00
|
|
|
|
directory. You should see a Ceph configuration file, a monitor secret
|
|
|
|
|
keyring, and a log file for the new cluster. See `ceph-deploy new -h`_
|
2014-01-17 00:51:17 +00:00
|
|
|
|
for additional details.
|
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
#. Change the default number of replicas in the Ceph configuration file from
|
|
|
|
|
``3`` to ``2`` so that Ceph can achieve an ``active + clean`` state with
|
2014-08-12 01:16:01 +00:00
|
|
|
|
just two Ceph OSDs. Add the following line under the ``[global]`` section::
|
2014-10-13 15:09:38 +00:00
|
|
|
|
|
2014-05-29 20:22:52 +00:00
|
|
|
|
osd pool default size = 2
|
2014-01-17 00:51:17 +00:00
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
#. If you have more than one network interface, add the ``public network``
|
|
|
|
|
setting under the ``[global]`` section of your Ceph configuration file.
|
2014-01-17 00:51:17 +00:00
|
|
|
|
See the `Network Configuration Reference`_ for details. ::
|
|
|
|
|
|
|
|
|
|
public network = {ip-address}/{netmask}
|
2013-05-06 17:50:24 +00:00
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
#. Install Ceph. ::
|
2013-05-06 17:50:24 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
ceph-deploy install {ceph-node}[{ceph-node} ...]
|
2013-06-11 21:46:12 +00:00
|
|
|
|
|
2014-01-17 00:51:17 +00:00
|
|
|
|
For example::
|
2013-05-06 17:50:24 +00:00
|
|
|
|
|
2014-05-19 22:03:35 +00:00
|
|
|
|
ceph-deploy install admin-node node1 node2 node3
|
2014-01-17 00:51:17 +00:00
|
|
|
|
|
|
|
|
|
The ``ceph-deploy`` utility will install Ceph on each node.
|
2014-10-13 15:09:38 +00:00
|
|
|
|
**NOTE**: If you use ``ceph-deploy purge``, you must re-execute this step
|
2014-01-17 00:51:17 +00:00
|
|
|
|
to re-install Ceph.
|
|
|
|
|
|
|
|
|
|
|
2015-03-20 21:10:54 +00:00
|
|
|
|
#. Add the initial monitor(s) and gather the keys::
|
2014-01-17 00:51:17 +00:00
|
|
|
|
|
2014-10-13 15:10:10 +00:00
|
|
|
|
ceph-deploy mon create-initial
|
2014-01-17 00:51:17 +00:00
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
Once you complete the process, your local directory should have the following
|
2013-10-10 19:20:37 +00:00
|
|
|
|
keyrings:
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
- ``{cluster-name}.client.admin.keyring``
|
|
|
|
|
- ``{cluster-name}.bootstrap-osd.keyring``
|
2014-10-13 15:09:38 +00:00
|
|
|
|
- ``{cluster-name}.bootstrap-mds.keyring``
|
2015-03-20 21:07:36 +00:00
|
|
|
|
- ``{cluster-name}.bootstrap-rgw.keyring``
|
|
|
|
|
|
|
|
|
|
.. note:: The bootstrap-rgw keyring is only created during installation of clusters
|
|
|
|
|
running Hammer or newer
|
2014-10-13 15:09:38 +00:00
|
|
|
|
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
#. Add two OSDs. For fast setup, this quick start uses a directory rather
|
2014-10-13 15:09:38 +00:00
|
|
|
|
than an entire disk per Ceph OSD Daemon. See `ceph-deploy osd`_ for
|
|
|
|
|
details on using separate disks/partitions for OSDs and journals.
|
|
|
|
|
Login to the Ceph Nodes and create a directory for
|
2013-09-17 21:02:51 +00:00
|
|
|
|
the Ceph OSD Daemon. ::
|
2014-10-13 15:09:38 +00:00
|
|
|
|
|
2014-01-17 00:51:17 +00:00
|
|
|
|
ssh node2
|
|
|
|
|
sudo mkdir /var/local/osd0
|
2013-09-17 21:02:51 +00:00
|
|
|
|
exit
|
2014-10-13 15:09:38 +00:00
|
|
|
|
|
2014-01-17 00:51:17 +00:00
|
|
|
|
ssh node3
|
|
|
|
|
sudo mkdir /var/local/osd1
|
2014-10-13 15:09:38 +00:00
|
|
|
|
exit
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-09-24 21:44:25 +00:00
|
|
|
|
Then, from your admin node, use ``ceph-deploy`` to prepare the OSDs. ::
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
ceph-deploy osd prepare {ceph-node}:/path/to/directory
|
2014-01-17 00:51:17 +00:00
|
|
|
|
|
|
|
|
|
For example::
|
|
|
|
|
|
|
|
|
|
ceph-deploy osd prepare node2:/var/local/osd0 node3:/var/local/osd1
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
Finally, activate the OSDs. ::
|
2013-05-09 19:48:14 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
ceph-deploy osd activate {ceph-node}:/path/to/directory
|
2014-01-17 00:51:17 +00:00
|
|
|
|
|
|
|
|
|
For example::
|
|
|
|
|
|
|
|
|
|
ceph-deploy osd activate node2:/var/local/osd0 node3:/var/local/osd1
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
|
|
|
|
|
2013-09-24 21:44:25 +00:00
|
|
|
|
#. Use ``ceph-deploy`` to copy the configuration file and admin key to
|
2014-10-13 15:09:38 +00:00
|
|
|
|
your admin node and your Ceph Nodes so that you can use the ``ceph``
|
|
|
|
|
CLI without having to specify the monitor address and
|
|
|
|
|
``ceph.client.admin.keyring`` each time you execute a command. ::
|
|
|
|
|
|
2014-05-19 22:03:35 +00:00
|
|
|
|
ceph-deploy admin {admin-node} {ceph-node}
|
2014-01-17 00:51:17 +00:00
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
For example::
|
2014-01-17 00:51:17 +00:00
|
|
|
|
|
2014-05-19 22:03:35 +00:00
|
|
|
|
ceph-deploy admin admin-node node1 node2 node3
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2014-05-29 20:22:52 +00:00
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
When ``ceph-deploy`` is talking to the local admin host (``admin-node``),
|
|
|
|
|
it must be reachable by its hostname. If necessary, modify ``/etc/hosts``
|
2014-05-29 20:22:52 +00:00
|
|
|
|
to add the name of the admin host.
|
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
#. Ensure that you have the correct permissions for the
|
2014-01-17 00:51:17 +00:00
|
|
|
|
``ceph.client.admin.keyring``. ::
|
|
|
|
|
|
|
|
|
|
sudo chmod +r /etc/ceph/ceph.client.admin.keyring
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
#. Check your cluster's health. ::
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
ceph health
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
Your cluster should return an ``active + clean`` state when it
|
2013-09-24 21:44:25 +00:00
|
|
|
|
has finished peering.
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
Operating Your Cluster
|
|
|
|
|
======================
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
Deploying a Ceph cluster with ``ceph-deploy`` automatically starts the cluster.
|
|
|
|
|
To operate the cluster daemons with Debian/Ubuntu distributions, see
|
2013-09-17 21:02:51 +00:00
|
|
|
|
`Running Ceph with Upstart`_. To operate the cluster daemons with CentOS,
|
|
|
|
|
Red Hat, Fedora, and SLES distributions, see `Running Ceph with sysvinit`_.
|
2013-05-09 19:48:14 +00:00
|
|
|
|
|
2013-09-24 21:44:25 +00:00
|
|
|
|
To learn more about peering and cluster health, see `Monitoring a Cluster`_.
|
2014-10-13 15:09:38 +00:00
|
|
|
|
To learn more about Ceph OSD Daemon and placement group health, see
|
|
|
|
|
`Monitoring OSDs and PGs`_. To learn more about managing users, see
|
2014-08-14 03:36:15 +00:00
|
|
|
|
`User Management`_.
|
2014-10-13 15:09:38 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
Once you deploy a Ceph cluster, you can try out some of the administration
|
|
|
|
|
functionality, the ``rados`` object store command line, and then proceed to
|
|
|
|
|
Quick Start guides for Ceph Block Device, Ceph Filesystem, and the Ceph Object
|
|
|
|
|
Gateway.
|
2013-05-09 19:48:14 +00:00
|
|
|
|
|
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
Expanding Your Cluster
|
|
|
|
|
======================
|
2013-05-09 19:48:14 +00:00
|
|
|
|
|
2013-09-24 21:44:25 +00:00
|
|
|
|
Once you have a basic cluster up and running, the next step is to expand
|
2014-01-17 00:51:17 +00:00
|
|
|
|
cluster. Add a Ceph OSD Daemon and a Ceph Metadata Server to ``node1``.
|
|
|
|
|
Then add a Ceph Monitor to ``node2`` and ``node3`` to establish a
|
2013-09-24 21:44:25 +00:00
|
|
|
|
quorum of Ceph Monitors.
|
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
.. ditaa::
|
2013-09-24 21:44:25 +00:00
|
|
|
|
/------------------\ /----------------\
|
2014-01-17 00:51:17 +00:00
|
|
|
|
| ceph–deploy | | node1 |
|
2013-09-24 21:44:25 +00:00
|
|
|
|
| Admin Node | | cCCC |
|
2014-01-17 00:51:17 +00:00
|
|
|
|
| +-------->+ mon.node1 |
|
2013-09-30 22:24:41 +00:00
|
|
|
|
| | | osd.2 |
|
2014-01-17 00:51:17 +00:00
|
|
|
|
| | | mds.node1 |
|
2013-09-24 21:44:25 +00:00
|
|
|
|
\---------+--------/ \----------------/
|
|
|
|
|
|
|
|
|
|
|
| /----------------\
|
2014-01-17 00:51:17 +00:00
|
|
|
|
| | node2 |
|
2013-09-24 21:44:25 +00:00
|
|
|
|
| | cCCC |
|
|
|
|
|
+----------------->+ |
|
2013-09-30 22:24:41 +00:00
|
|
|
|
| | osd.0 |
|
2014-01-17 00:51:17 +00:00
|
|
|
|
| | mon.node2 |
|
2013-09-24 21:44:25 +00:00
|
|
|
|
| \----------------/
|
|
|
|
|
|
|
|
|
|
|
| /----------------\
|
2014-01-17 00:51:17 +00:00
|
|
|
|
| | node3 |
|
2013-09-24 21:44:25 +00:00
|
|
|
|
| | cCCC |
|
|
|
|
|
+----------------->+ |
|
2013-09-30 22:24:41 +00:00
|
|
|
|
| osd.1 |
|
2014-01-17 00:51:17 +00:00
|
|
|
|
| mon.node3 |
|
2013-09-24 21:44:25 +00:00
|
|
|
|
\----------------/
|
2013-05-09 19:48:14 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
Adding an OSD
|
|
|
|
|
-------------
|
2013-05-09 19:48:14 +00:00
|
|
|
|
|
2013-10-10 19:20:37 +00:00
|
|
|
|
Since you are running a 3-node cluster for demonstration purposes, add the OSD
|
|
|
|
|
to the monitor node. ::
|
2013-06-11 21:46:12 +00:00
|
|
|
|
|
2014-01-17 00:51:17 +00:00
|
|
|
|
ssh node1
|
|
|
|
|
sudo mkdir /var/local/osd2
|
2013-09-17 21:02:51 +00:00
|
|
|
|
exit
|
2013-06-11 21:46:12 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
Then, from your ``ceph-deploy`` node, prepare the OSD. ::
|
2013-06-11 21:46:12 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
ceph-deploy osd prepare {ceph-node}:/path/to/directory
|
2014-01-17 00:51:17 +00:00
|
|
|
|
|
|
|
|
|
For example::
|
|
|
|
|
|
|
|
|
|
ceph-deploy osd prepare node1:/var/local/osd2
|
2013-06-11 21:46:12 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
Finally, activate the OSDs. ::
|
2013-06-11 21:46:12 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
ceph-deploy osd activate {ceph-node}:/path/to/directory
|
2014-01-17 00:51:17 +00:00
|
|
|
|
|
|
|
|
|
For example::
|
|
|
|
|
|
|
|
|
|
ceph-deploy osd activate node1:/var/local/osd2
|
2013-06-11 21:46:12 +00:00
|
|
|
|
|
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
Once you have added your new OSD, Ceph will begin rebalancing the cluster by
|
|
|
|
|
migrating placement groups to your new OSD. You can observe this process with
|
|
|
|
|
the ``ceph`` CLI. ::
|
2013-06-11 21:46:12 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
ceph -w
|
2013-06-11 21:46:12 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
You should see the placement group states change from ``active+clean`` to active
|
|
|
|
|
with some degraded objects, and finally ``active+clean`` when migration
|
|
|
|
|
completes. (Control-c to exit.)
|
2013-05-09 19:48:14 +00:00
|
|
|
|
|
|
|
|
|
|
2013-09-24 21:44:25 +00:00
|
|
|
|
Add a Metadata Server
|
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
|
|
To use CephFS, you need at least one metadata server. Execute the following to
|
|
|
|
|
create a metadata server::
|
|
|
|
|
|
|
|
|
|
ceph-deploy mds create {ceph-node}
|
2014-01-17 00:51:17 +00:00
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
For example::
|
2014-01-17 00:51:17 +00:00
|
|
|
|
|
|
|
|
|
ceph-deploy mds create node1
|
2013-09-24 21:44:25 +00:00
|
|
|
|
|
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
.. note:: Currently Ceph runs in production with one metadata server only. You
|
|
|
|
|
may use more, but there is currently no commercial support for a cluster
|
2013-09-24 21:44:25 +00:00
|
|
|
|
with multiple metadata servers.
|
|
|
|
|
|
|
|
|
|
|
2015-03-20 21:07:36 +00:00
|
|
|
|
Add an RGW Instance
|
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
|
|
To use the :term:`Ceph Object Gateway` component of Ceph, you must deploy an
|
|
|
|
|
instance of :term:`RGW`. Execute the following to create an new instance of
|
|
|
|
|
RGW::
|
|
|
|
|
|
|
|
|
|
ceph-deploy rgw create {gateway-node}
|
|
|
|
|
|
|
|
|
|
For example::
|
|
|
|
|
|
|
|
|
|
ceph-deploy rgw create node1
|
|
|
|
|
|
|
|
|
|
.. note:: This functionality is new with the **Hammer** release, and also with
|
|
|
|
|
``ceph-deploy`` v1.5.23.
|
|
|
|
|
|
|
|
|
|
By default, the :term:`RGW` instance will listen on port 7480. This can be
|
|
|
|
|
changed by editing ceph.conf on the node running the :term:`RGW` as follows:
|
|
|
|
|
|
|
|
|
|
.. code-block:: ini
|
|
|
|
|
|
|
|
|
|
[client]
|
|
|
|
|
rgw frontends = civetweb port=80
|
|
|
|
|
|
|
|
|
|
To use an IPv6 address, use:
|
|
|
|
|
|
|
|
|
|
.. code-block:: ini
|
|
|
|
|
|
|
|
|
|
[client]
|
|
|
|
|
rgw frontends = civetweb port=[::]:80
|
|
|
|
|
|
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
Adding Monitors
|
|
|
|
|
---------------
|
2013-05-09 19:48:14 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
A Ceph Storage Cluster requires at least one Ceph Monitor to run. For high
|
|
|
|
|
availability, Ceph Storage Clusters typically run multiple Ceph
|
|
|
|
|
Monitors so that the failure of a single Ceph Monitor will not bring down the
|
|
|
|
|
Ceph Storage Cluster. Ceph uses the Paxos algorithm, which requires a majority
|
|
|
|
|
of monitors (i.e., 1, 2:3, 3:4, 3:5, 4:6, etc.) to form a quorum.
|
2013-05-09 19:48:14 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
Add two Ceph Monitors to your cluster. ::
|
2013-05-09 19:48:14 +00:00
|
|
|
|
|
2015-06-18 13:24:43 +00:00
|
|
|
|
ceph-deploy mon add {ceph-node}
|
2014-01-17 00:51:17 +00:00
|
|
|
|
|
|
|
|
|
For example::
|
|
|
|
|
|
2015-06-18 13:24:43 +00:00
|
|
|
|
ceph-deploy mon add node2 node3
|
2013-05-09 19:48:14 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
Once you have added your new Ceph Monitors, Ceph will begin synchronizing
|
|
|
|
|
the monitors and form a quorum. You can check the quorum status by executing
|
2014-10-13 15:09:38 +00:00
|
|
|
|
the following::
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2014-01-17 00:51:17 +00:00
|
|
|
|
ceph quorum_status --format json-pretty
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
.. tip:: When you run Ceph with multiple monitors, you SHOULD install and
|
2014-06-11 00:45:18 +00:00
|
|
|
|
configure NTP on each monitor host. Ensure that the
|
|
|
|
|
monitors are NTP peers.
|
|
|
|
|
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
Storing/Retrieving Object Data
|
|
|
|
|
==============================
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2014-10-13 15:09:38 +00:00
|
|
|
|
To store object data in the Ceph Storage Cluster, a Ceph client must:
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
#. Set an object name
|
|
|
|
|
#. Specify a `pool`_
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
The Ceph Client retrieves the latest cluster map and the CRUSH algorithm
|
|
|
|
|
calculates how to map the object to a `placement group`_, and then calculates
|
|
|
|
|
how to assign the placement group to a Ceph OSD Daemon dynamically. To find the
|
|
|
|
|
object location, all you need is the object name and the pool name. For
|
2014-10-13 15:09:38 +00:00
|
|
|
|
example::
|
2013-06-06 17:58:47 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
ceph osd map {poolname} {object-name}
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
.. topic:: Exercise: Locate an Object
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-10-10 19:20:37 +00:00
|
|
|
|
As an exercise, lets create an object. Specify an object name, a path to
|
2014-10-13 15:09:38 +00:00
|
|
|
|
a test file containing some object data and a pool name using the
|
2013-09-17 21:02:51 +00:00
|
|
|
|
``rados put`` command on the command line. For example::
|
2014-10-13 15:09:38 +00:00
|
|
|
|
|
2014-05-19 22:03:35 +00:00
|
|
|
|
echo {Test-data} > testfile.txt
|
2014-10-13 15:09:38 +00:00
|
|
|
|
rados put {object-name} {file-path} --pool=data
|
2013-09-17 21:02:51 +00:00
|
|
|
|
rados put test-object-1 testfile.txt --pool=data
|
2014-10-13 15:09:38 +00:00
|
|
|
|
|
|
|
|
|
To verify that the Ceph Storage Cluster stored the object, execute
|
2013-10-10 19:20:37 +00:00
|
|
|
|
the following::
|
2014-10-13 15:09:38 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
rados -p data ls
|
2014-10-13 15:09:38 +00:00
|
|
|
|
|
|
|
|
|
Now, identify the object location::
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
ceph osd map {pool-name} {object-name}
|
|
|
|
|
ceph osd map data test-object-1
|
2014-10-13 15:09:38 +00:00
|
|
|
|
|
|
|
|
|
Ceph should output the object's location. For example::
|
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
osdmap e537 pool 'data' (0) object 'test-object-1' -> pg 0.d1743484 (0.4) -> up [1,0] acting [1,0]
|
2014-10-13 15:09:38 +00:00
|
|
|
|
|
|
|
|
|
To remove the test object, simply delete it using the ``rados rm``
|
|
|
|
|
command. For example::
|
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
rados rm test-object-1 --pool=data
|
2014-10-13 15:09:38 +00:00
|
|
|
|
|
2013-09-17 21:02:51 +00:00
|
|
|
|
As the cluster evolves, the object location may change dynamically. One benefit
|
|
|
|
|
of Ceph's dynamic rebalancing is that Ceph relieves you from having to perform
|
|
|
|
|
the migration manually.
|
2013-04-26 21:01:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _Preflight Checklist: ../quick-start-preflight
|
|
|
|
|
.. _Ceph Deploy: ../../rados/deployment
|
|
|
|
|
.. _ceph-deploy install -h: ../../rados/deployment/ceph-deploy-install
|
2013-06-06 17:58:47 +00:00
|
|
|
|
.. _ceph-deploy new -h: ../../rados/deployment/ceph-deploy-new
|
2013-09-17 21:02:51 +00:00
|
|
|
|
.. _ceph-deploy osd: ../../rados/deployment/ceph-deploy-osd
|
2013-06-11 21:46:12 +00:00
|
|
|
|
.. _Running Ceph with Upstart: ../../rados/operations/operating#running-ceph-with-upstart
|
2013-09-17 21:02:51 +00:00
|
|
|
|
.. _Running Ceph with sysvinit: ../../rados/operations/operating#running-ceph-with-sysvinit
|
|
|
|
|
.. _CRUSH Map: ../../rados/operations/crush-map
|
|
|
|
|
.. _pool: ../../rados/operations/pools
|
2013-09-24 21:44:25 +00:00
|
|
|
|
.. _placement group: ../../rados/operations/placement-groups
|
|
|
|
|
.. _Monitoring a Cluster: ../../rados/operations/monitoring
|
2014-01-17 00:51:17 +00:00
|
|
|
|
.. _Monitoring OSDs and PGs: ../../rados/operations/monitoring-osd-pg
|
2014-07-04 12:28:03 +00:00
|
|
|
|
.. _Network Configuration Reference: ../../rados/configuration/network-config-ref
|
2014-09-02 18:40:22 +00:00
|
|
|
|
.. _User Management: ../../rados/operations/user-management
|