Advertisement
Shishire

CRUSH Rule Map

Jun 23rd, 2014
443
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. rule replicated_ruleset {
  2. ruleset 0
  3. type replicated
  4. min_size 1
  5. max_size 10
  6. step take default
  7. step choose firstn 0 type host
  8. step chooseleaf firstn -1 type osd
  9. step emit
  10. }
  11.  
  12.  
  13. 2 hosts
  14. 5 osds per host
  15. Total of 10 osds.
  16. Pool size 3
  17.  
  18. If I'm understanding this correctly, when trying to find a location for a pg, it should first select 3 hosts (of which it should reduce to 2 as there are only 2 hosts), then for each host, try and select 2 osds (of which, on the second host, it only selects 1 due to 3 replicas). This should have a net result of always placing two replicas on one host and 1 replica on the other host. The primary should also always have a second copy on the same host.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement