]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: document new 'osd crush move ...' command
authorSage Weil <sage@inktank.com>
Fri, 29 Jun 2012 21:22:14 +0000 (14:22 -0700)
committerSage Weil <sage@inktank.com>
Fri, 29 Jun 2012 21:22:14 +0000 (14:22 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
doc/control.rst
doc/ops/manage/crush.rst

index ec1c75dd65aa8684341d1cf0259fa6a636bdfe66..26a11b175ce15682cdba65733514da28c727b0d1 100644 (file)
@@ -120,15 +120,19 @@ Dump the osd map. Valid formats for -f are "plain" and "json". If no
 Dump the osd map as a tree with one line per osd containing weight
 and state. ::
 
-       $ ceph osd crush add <id> <name> <weight> [<loc1> [<loc2> ...]]
+       $ ceph osd crush set <id> <name> <weight> [<loc1> [<loc2> ...]]
 
-Add a new item with the given id/name/weight at the specified
+Add or move a new item (osd) with the given id/name/weight at the specified
 location. ::
 
        $ ceph osd crush remove <id>
 
 Remove an existing item from the crush map. ::
 
+        $ ceph osd crush move <id> <loc1> [<loc2> ...]
+
+Move an existing bucket from one position in the hierarchy to another.  ::
+
        $ ceph osd crush reweight <name> <weight>
 
 Set the weight of the item given by ``<name>`` to ``<weight>``. ::
index ef0066a74b06176759ef5d01bf7d6c41567672e0..e29353ee92e9638a1e622254bdcf9a9b99da2f1e 100644 (file)
@@ -17,7 +17,10 @@ it, and then recompile.
 Adding a new device (OSD) to the map
 ====================================
 
-Adding new devices can be done via the monitor.  The general form is::
+.. _adjusting-crush-set:
+
+Adding new devices or moving existing devices to new positions in the
+CRUSH hierarchy can be done via the monitor.  The general form is::
 
   $ ceph osd crush set <id> <name> <weight> [<loc> [<lo2> ...]]
 
@@ -40,15 +43,15 @@ where
     location is always sufficient, and also safe in that existing
     branches (and devices) won't be moved around.
 
-For example, if the new OSD id is ``123``, we want a weight of ``1.0``
-and the new device is on host ``hostfoo`` and rack ``rackbar``::
+For example, if the OSD id is ``123``, we want a weight of ``1.0`` and
+the device is on host ``hostfoo`` and rack ``rackbar``::
 
    $ ceph osd crush set 123 osd.123 1.0 pool=default rack=rackbar host=hostfoo
 
-will add it to the hierarchy.  The rack ``rackbar`` and host
-``hostfoo`` will be added as needed, as long as the pool ``default``
-exists (as it does in the default Ceph CRUSH map generated during
-cluster creation).
+will add it to the hierarchy, or move it from its previous position.
+The rack ``rackbar`` and host ``hostfoo`` will be added as needed, as
+long as the pool ``default`` exists (as it does in the default Ceph
+CRUSH map generated during cluster creation).
 
 Note that if I later add another device in the same host but specify a
 different pool or rack::
@@ -59,6 +62,23 @@ the device will still be placed in host ``hostfoo`` at its current
 location (rack ``rackbar`` and pool ``default``).
 
 
+Moving a bucket to a different position in the hierarchy
+========================================================
+
+To move an existing bucket to a different position in the hierarchy,
+identify the bucket to move by name and specify the new location in
+the same fashion as with ``osd crush set ...``::
+
+  $ ceph osd crush move <bucket name> [<loc> [<loc2> ...]]
+
+where
+
+  * ``name`` is the name of the bucket to move.  (To move a device,
+    see :ref:`adjusting-crush-set`.)
+  * ``loc`` is a list of ``what=where`` pairs indicating where the bucket should
+    be moved.  See :ref:`adjusting-crush-set`.
+
+
 Adjusting the CRUSH weight
 ==========================