-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reviewed-by: Greg Farnum <[email protected]>
- Loading branch information
Showing
12 changed files
with
429 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
$ crushtool -i "$TESTDIR/simple.template" --add-item 0 1.0 device0 --loc host host0 --loc cluster cluster0 -o one > /dev/null | ||
$ crushtool -i one --add-item 1 1.0 device1 --loc host host0 --loc cluster cluster0 -o two > /dev/null | ||
$ crushtool -d two -o final | ||
$ cmp final "$TESTDIR/simple.template.out" | ||
$ cmp final "$TESTDIR/simple.template.two" | ||
$ crushtool -i two --add-item 1 1.0 device1 --loc host host0 --loc cluster cluster0 -o three 2>/dev/null >/dev/null || echo FAIL | ||
FAIL | ||
$ crushtool -i two --remove-item device1 -o four > /dev/null | ||
$ crushtool -d four -o final | ||
$ cmp final "$TESTDIR/simple.template.four" | ||
$ crushtool -i two --update-item 1 2.0 osd1 --loc host host1 --loc cluster cluster0 -o five > /dev/null | ||
$ crushtool -d five -o final | ||
$ cmp final "$TESTDIR/simple.template.five" | ||
$ crushtool -i five --update-item 1 2.0 osd1 --loc host host1 --loc cluster cluster0 -o six > /dev/null | ||
$ crushtool -d six -o final | ||
$ cmp final "$TESTDIR/simple.template.five" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# begin crush map | ||
|
||
# devices | ||
device 0 device0 | ||
device 1 osd1 | ||
|
||
# types | ||
type 0 device | ||
type 1 host | ||
type 2 cluster | ||
|
||
# buckets | ||
host host0 { | ||
id -2 # do not change unnecessarily | ||
# weight 1.000 | ||
alg straw | ||
hash 0 # rjenkins1 | ||
item device0 weight 1.000 | ||
} | ||
host host1 { | ||
id -3 # do not change unnecessarily | ||
# weight 2.000 | ||
alg straw | ||
hash 0 # rjenkins1 | ||
item osd1 weight 2.000 | ||
} | ||
cluster cluster0 { | ||
id -1 # do not change unnecessarily | ||
# weight 3.000 | ||
alg straw | ||
hash 0 # rjenkins1 | ||
item host0 weight 1.000 | ||
item host1 weight 2.000 | ||
} | ||
|
||
# rules | ||
rule data { | ||
ruleset 0 | ||
type replicated | ||
min_size 1 | ||
max_size 10 | ||
step take cluster0 | ||
step chooseleaf firstn 0 type host | ||
step emit | ||
} | ||
rule metadata { | ||
ruleset 1 | ||
type replicated | ||
min_size 1 | ||
max_size 10 | ||
step take cluster0 | ||
step chooseleaf firstn 0 type host | ||
step emit | ||
} | ||
rule rbd { | ||
ruleset 2 | ||
type replicated | ||
min_size 1 | ||
max_size 10 | ||
step take cluster0 | ||
step chooseleaf firstn 0 type host | ||
step emit | ||
} | ||
|
||
# end crush map |
Oops, something went wrong.