]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: document the class qualifier
authorLoic Dachary <ldachary@redhat.com>
Mon, 27 Feb 2017 11:27:36 +0000 (12:27 +0100)
committerLoic Dachary <ldachary@redhat.com>
Wed, 1 Mar 2017 16:24:09 +0000 (17:24 +0100)
The class qualifier is documented for devices and step take
only. Although it shows in the buckets and could be set by the user, it
would be very error prone to do so.

Refs: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
doc/rados/operations/crush-map.rst

index 6691b5798dcfe7cbf3259d7f42ca8ebea968d081..d6ef95faa4667eebd78dc04f707dbd3c9035a881 100644 (file)
@@ -235,17 +235,19 @@ To map placement groups to OSDs, a CRUSH map requires a list of OSD devices
 of devices appears first in the CRUSH map. To declare a device in the CRUSH map,
 create a new line under your list of devices, enter ``device`` followed by a
 unique numeric ID, followed by the corresponding ``ceph-osd`` daemon instance.
+The device class can optionaly be added to group devices so they can be
+conveniently targetted by a crush rule.
 
 ::
 
        #devices
-       device {num} {osd.name}
+       device {num} {osd.name} [class {class}]
 
 For example:: 
 
        #devices
-       device 0 osd.0
-       device 1 osd.1
+       device 0 osd.0 class ssd
+       device 1 osd.1 class hdd
        device 2 osd.2
        device 3 osd.3
        
@@ -503,7 +505,7 @@ A rule takes the following form::
                type [ replicated | erasure ]
                min_size <min-size>
                max_size <max-size>
-               step take <bucket-name>
+               step take <bucket-name> [class <device-class>]
                step [choose|chooseleaf] [firstn|indep] <N> <bucket-type>
                step emit
        }
@@ -554,9 +556,12 @@ A rule takes the following form::
 :Default: 10
 
 
-``step take <bucket-name>``
+``step take <bucket-name> [class <device-class>]``
 
 :Description: Takes a bucket name, and begins iterating down the tree.
+              If the ``device-class`` is specified, it must match
+              a class previously used when defining a device. All
+              devices that do not belong to the class are excluded.
 :Purpose: A component of the rule.
 :Required: Yes
 :Example: ``step take data``