I have an SSD storage system that contains two nodes with 6 SSD's drives. Not ideal, and so some point I will introduce another node. Right now I'm wanting 3 way replication though.
Under a default rule, this won't happen because we only have two nodes. So I thought I'd attempt to modify the crushmap and set the ruleset for the SSD storage nodes to place data across the two nodes and the third set can be on another OSD on the same node.
Being a novice and not entirely understanding how the choose firstn
and chooseleaf firstn
statements work I'm unsure if it'll be do what I intend.
Here is what I have so far:
rule ssd-all {
ruleset 1
type replicated
min_size 1
max_size 5
step take ssd
step choose firstn 0 type host
step chooseleaf firstn 2 type osd
step emit
}
Where ssd is a root type containing some hosts and those hosts containing multiple (6) OSD's.
Would that work? Somehow, I don't think it's right. I'd like a better understanding when to use choose
and where to use chooseleaf
. And a better understanding of the number after firstn
. The documentation is lacking clear examples. Reading the CRUSH whitepaper made some sense, but psuedocode isn't that clear to me. Can someone help?