The previous email had mistakes in the rack a2 and a3 bucket definition. I missed the a2-2 and a3-2 hosts. It should be: rack a2 { id -8 alg straw hash 0 item a2-1 weight 3.0 item a2-2 weight 3.0 } rack a3 { id -9 alg straw hash 0 item a3-1 weight 3.0 item a3-2 weight 3.0 } Sorry about that! >On Sat, Aug 18, 2018 at 9:43 PM Cody <codeology.lab@xxxxxxxxx> wrote: > > Hi everyone, > > I am new to Ceph and trying to test out my understanding on the CRUSH > map. Attached is a hypothetical cluster diagram with 3 racks. On each > rack, the first host runs 3 SSD-based OSDs and the second 3 HDD-based. > > My goal is to create two rules that separate SSD and HDD performance > domains (by using device class) and both rules should use a*rack* > level failure domain. > > Here is my CRUSH map: > > # Devices > > device 0 osd.0 class ssd > device 1 osd.1 class ssd > device 2 osd.2 class ssd > device 3 osd.3 class hdd > device 4 osd.4 class hdd > device 5 osd.5 class hdd > device 6 osd.6 class ssd > device 7 osd.7 class ssd > device 8 osd.8 class ssd > device 9 osd.9 class hdd > device 10 osd.10 class hdd > device 11 osd.11 class hdd > device 12 osd.12 class ssd > device 13 osd.13 class ssd > device 14 osd.14 class ssd > device 15 osd.15 class hdd > device 16 osd.17 class hdd > device 17 osd.17 class hdd > > # Buckets > > host a1-1 { > id -1 > alg straw > hash 0 > item osd.0 weight 1.00 > item osd.1 weight 1.00 > item osd.2 weight 1.00 > } > > host a1-2 { > id -2 > alg straw > hash 0 > item osd.3 weight 1.00 > item osd.4 weight 1.00 > item osd.5 weight 1.00 > } > > host a2-1 { > id -3 > alg straw > hash 0 > item osd.6 weight 1.00 > item osd.7 weight 1.00 > item osd.8 weight 1.00 > } > > host a2-2 { > id -4 > alg straw > hash 0 > item osd.9 weight 1.00 > item osd.10 weight 1.00 > item osd.11 weight 1.00 > } > > host a3-1 { > id -5 > alg straw > hash 0 > item osd.12 weight 1.00 > item osd.13 weight 1.00 > item osd.14 weight 1.00 > } > > host a3-2 { > id -6 > alg straw > hash 0 > item osd.15 weight 1.00 > item osd.16 weight 1.00 > item osd.17 weight 1.00 > } > > rack a1 { > id -7 > alg straw > hash 0 > item a1-1 weight 3.0 > item a1-2 weight 3.0 > } > > rack a2 { > id -8 > alg straw > hash 0 > item a2-1 weight 3.0 > } > > rack a3 { > id -9 > alg straw > hash 0 > item a3-1 weight 3.0 > } > > row a { > id -10 > alg straw > hash 0 > item a1 6.0 > item a2 6.0 > item a3 6.0 > } > > # Rules > > rule ssd { > id 1 > type replicated > min_size 2 > max_size 11 > step take a class ssd > step chooseleaf firstn 0 type row > step emit > } > > rule hdd { > id 2 > type replicated > min_size 2 > max_size 11 > step take a class ssd > step chooseleaf firstn 0 type row > step emit > } > > > Q1: Is the above CRUSH map correct for my goal? > > Q2: What does the "step choose" and "step chooseleaf" mean? I read its > definitions in the documentation several times, but still cannot get > it. > > Any helps would be greatly appreciated! > > Regards, > Cody _______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com