Chapter 5. CRUSH Map Bucket Types
The second list in the CRUSH map defines bucket types. Buckets facilitate a hierarchy of nodes and leaves. Node (or non-leaf) buckets typically represent physical locations in a hierarchy. Nodes aggregate other nodes or leaves. Leaf buckets represent ceph-osd
daemons and their corresponding storage media.
The term bucket used in the context of CRUSH means a node in the hierarchy, i.e. a location or a piece of physical hardware. It is a different concept from the term bucket when used in the context of the Ceph Object Gateway’s S3 and Swift APIs.
Adding, modifying or removing a bucket type involves editing a CRUSH Map. To add a bucket type to the CRUSH map, create a new line under your list of bucket types. Enter type
followed by a unique numeric ID and a bucket name. By convention, there is one leaf bucket and it is type 0
; however, you may give it any name you like (e.g., osd
, disk
, drive
, storage
, etc.).
#types type {num} {bucket-name}
For example:
# types type 0 osd type 1 host type 2 chassis type 3 rack type 4 row type 5 pdu type 6 pod type 7 room type 8 datacenter type 9 region type 10 root
If you intend to change the default bucket types, we recommend you do this BEFORE you create your CRUSH hierarchies; otherwise, you must review your CRUSH hierarchy to ensure your changes are properly reflected in the CRUSH map.