Advertisement
rlr219

Crushmap revision

Jan 16th, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.48 KB | None | 0 0
  1. My replication level is 3. I have 3 enclosures of servers. I am trying to make it so that I have one replication per enclosure.
  2.  
  3. # begin OLD crush map
  4.  
  5. # devices
  6. device 0 osd.0
  7. device 1 osd.1
  8. device 2 osd.2
  9. device 3 osd.3
  10. device 4 osd.4
  11. device 5 osd.5
  12. device 6 osd.6
  13. device 7 osd.7
  14. device 8 osd.8
  15. device 9 osd.9
  16. device 10 osd.10
  17. device 11 osd.11
  18. device 12 osd.12
  19. device 13 osd.13
  20. device 14 osd.14
  21. device 15 osd.15
  22. device 16 osd.16
  23. device 17 osd.17
  24. device 18 osd.18
  25. device 19 osd.19
  26.  
  27. # types
  28. type 0 osd
  29. type 1 host
  30. type 2 rack
  31. type 3 row
  32. type 4 room
  33. type 5 datacenter
  34. type 6 root
  35.  
  36. # buckets
  37. host ss140 {
  38. id -2 # do not change unnecessarily
  39. # weight 6.000
  40. alg straw
  41. hash 0 # rjenkins1
  42. item osd.0 weight 3.000
  43. item osd.1 weight 3.000
  44. }
  45. host ss145 {
  46. id -4 # do not change unnecessarily
  47. # weight 6.000
  48. alg straw
  49. hash 0 # rjenkins1
  50. item osd.10 weight 3.000
  51. item osd.11 weight 3.000
  52. }
  53. host ss146 {
  54. id -5 # do not change unnecessarily
  55. # weight 6.000
  56. alg straw
  57. hash 0 # rjenkins1
  58. item osd.12 weight 3.000
  59. item osd.13 weight 3.000
  60. }
  61. host ss147 {
  62. id -6 # do not change unnecessarily
  63. # weight 6.000
  64. alg straw
  65. hash 0 # rjenkins1
  66. item osd.14 weight 3.000
  67. item osd.15 weight 3.000
  68. }
  69. host ss153 {
  70. id -7 # do not change unnecessarily
  71. # weight 6.000
  72. alg straw
  73. hash 0 # rjenkins1
  74. item osd.16 weight 3.000
  75. item osd.17 weight 3.000
  76. }
  77. host ss154 {
  78. id -8 # do not change unnecessarily
  79. # weight 6.000
  80. alg straw
  81. hash 0 # rjenkins1
  82. item osd.18 weight 3.000
  83. item osd.19 weight 3.000
  84. }
  85. host ss141 {
  86. id -9 # do not change unnecessarily
  87. # weight 6.000
  88. alg straw
  89. hash 0 # rjenkins1
  90. item osd.2 weight 3.000
  91. item osd.3 weight 3.000
  92. }
  93. host ss142 {
  94. id -10 # do not change unnecessarily
  95. # weight 6.000
  96. alg straw
  97. hash 0 # rjenkins1
  98. item osd.4 weight 3.000
  99. item osd.5 weight 3.000
  100. }
  101. host ss143 {
  102. id -11 # do not change unnecessarily
  103. # weight 6.000
  104. alg straw
  105. hash 0 # rjenkins1
  106. item osd.6 weight 3.000
  107. item osd.7 weight 3.000
  108. }
  109. host ss144 {
  110. id -12 # do not change unnecessarily
  111. # weight 6.000
  112. alg straw
  113. hash 0 # rjenkins1
  114. item osd.8 weight 3.000
  115. item osd.9 weight 3.000
  116. }
  117. rack unknownrack {
  118. id -3 # do not change unnecessarily
  119. # weight 60.000
  120. alg straw
  121. hash 0 # rjenkins1
  122. item ss140 weight 6.000
  123. item ss145 weight 6.000
  124. item ss146 weight 6.000
  125. item ss147 weight 6.000
  126. item ss153 weight 6.000
  127. item ss154 weight 6.000
  128. item ss141 weight 6.000
  129. item ss142 weight 6.000
  130. item ss143 weight 6.000
  131. item ss144 weight 6.000
  132. }
  133. root default {
  134. id -1 # do not change unnecessarily
  135. # weight 60.000
  136. alg straw
  137. hash 0 # rjenkins1
  138. item unknownrack weight 60.000
  139. }
  140.  
  141. # rules
  142. rule data {
  143. ruleset 0
  144. type replicated
  145. min_size 1
  146. max_size 10
  147. step take default
  148. step chooseleaf firstn 0 type host
  149. step emit
  150. }
  151. rule metadata {
  152. ruleset 1
  153. type replicated
  154. min_size 1
  155. max_size 10
  156. step take default
  157. step chooseleaf firstn 0 type host
  158. step emit
  159. }
  160. rule rbd {
  161. ruleset 2
  162. type replicated
  163. min_size 1
  164. max_size 10
  165. step take default
  166. step chooseleaf firstn 0 type host
  167. step emit
  168. }
  169.  
  170. # end crush map
  171.  
  172.  
  173.  
  174. # begin NEW crush map
  175.  
  176. # devices
  177. device 0 osd.0
  178. device 1 osd.1
  179. device 2 osd.2
  180. device 3 osd.3
  181. device 4 osd.4
  182. device 5 osd.5
  183. device 6 osd.6
  184. device 7 osd.7
  185. device 8 osd.8
  186. device 9 osd.9
  187. device 10 osd.10
  188. device 11 osd.11
  189. device 12 osd.12
  190. device 13 osd.13
  191. device 14 osd.14
  192. device 15 osd.15
  193. device 16 osd.16
  194. device 17 osd.17
  195. device 18 osd.18
  196. device 19 osd.19
  197.  
  198. # types
  199. type 0 osd
  200. type 1 host
  201. type 2 enclosure
  202. type 3 rack
  203. type 4 room
  204. type 5 datacenter
  205. type 6 root
  206.  
  207. # buckets
  208. host ss140 {
  209. id -2 # do not change unnecessarily
  210. # weight 6.000
  211. alg straw
  212. hash 0 # rjenkins1
  213. item osd.0 weight 3.000
  214. item osd.1 weight 3.000
  215. }
  216. host ss145 {
  217. id -4 # do not change unnecessarily
  218. # weight 6.000
  219. alg straw
  220. hash 0 # rjenkins1
  221. item osd.10 weight 3.000
  222. item osd.11 weight 3.000
  223. }
  224. host ss146 {
  225. id -5 # do not change unnecessarily
  226. # weight 6.000
  227. alg straw
  228. hash 0 # rjenkins1
  229. item osd.12 weight 3.000
  230. item osd.13 weight 3.000
  231. }
  232. host ss147 {
  233. id -6 # do not change unnecessarily
  234. # weight 6.000
  235. alg straw
  236. hash 0 # rjenkins1
  237. item osd.14 weight 3.000
  238. item osd.15 weight 3.000
  239. }
  240. host ss153 {
  241. id -7 # do not change unnecessarily
  242. # weight 6.000
  243. alg straw
  244. hash 0 # rjenkins1
  245. item osd.16 weight 3.000
  246. item osd.17 weight 3.000
  247. }
  248. host ss154 {
  249. id -8 # do not change unnecessarily
  250. # weight 6.000
  251. alg straw
  252. hash 0 # rjenkins1
  253. item osd.18 weight 3.000
  254. item osd.19 weight 3.000
  255. }
  256. host ss141 {
  257. id -9 # do not change unnecessarily
  258. # weight 6.000
  259. alg straw
  260. hash 0 # rjenkins1
  261. item osd.2 weight 3.000
  262. item osd.3 weight 3.000
  263. }
  264. host ss142 {
  265. id -10 # do not change unnecessarily
  266. # weight 6.000
  267. alg straw
  268. hash 0 # rjenkins1
  269. item osd.4 weight 3.000
  270. item osd.5 weight 3.000
  271. }
  272. host ss143 {
  273. id -11 # do not change unnecessarily
  274. # weight 6.000
  275. alg straw
  276. hash 0 # rjenkins1
  277. item osd.6 weight 3.000
  278. item osd.7 weight 3.000
  279. }
  280. host ss144 {
  281. id -12 # do not change unnecessarily
  282. # weight 6.000
  283. alg straw
  284. hash 0 # rjenkins1
  285. item osd.8 weight 3.000
  286. item osd.9 weight 3.000
  287. }
  288.  
  289. enclosure case1 {
  290. id -13 # do not change unnecessarily
  291. # weight 24.000
  292. alg straw
  293. hash 0 # rjenkins1
  294. item ss140 weight 6.000
  295. item ss141 weight 6.000
  296. item ss142 weight 6.000
  297. item ss143 weight 6.000
  298. }
  299. enclosure case2 {
  300. id -14 # do not change unnecessarily
  301. # weight 24.000
  302. alg straw
  303. hash 0 # rjenkins1
  304. item ss144 weight 6.000
  305. item ss145 weight 6.000
  306. item ss146 weight 6.000
  307. item ss147 weight 6.000
  308. }
  309. enclosure case3 {
  310. id -15 # do not change unnecessarily
  311. # weight 6.000
  312. alg straw
  313. hash 0 # rjenkins1
  314. item ss153 weight 6.000
  315. item ss154 weight 6.000
  316. }
  317. rack cab102 {
  318. id -3 # do not change unnecessarily
  319. # weight 48.000
  320. alg straw
  321. hash 0 # rjenkins1
  322. item case1 weight 24.00
  323. item case2 weight 24.00
  324. }
  325. rack cab206 {
  326. id -16 # do not change unnecessarily
  327. # weight 12.000
  328. alg straw
  329. hash 0 # rjenkins1
  330. item case3 weight 12.00
  331. }
  332. room cage8110 {
  333. id -17 # do not change unnecessarily
  334. # weight 60.000
  335. alg straw
  336. hash 0 # rjenkins1
  337. item cab102 weight 48.000
  338. item cab206 weight 12.000
  339. }
  340. root ny4 {
  341. id -18 # do not change unnecessarily
  342. # weight 60.000
  343. alg straw
  344. item cage8110 weight 60.000
  345. }
  346. # rules
  347. rule data {
  348. ruleset 0
  349. type replicated
  350. min_size 1
  351. max_size 10
  352. step take ny4
  353. step chooseleaf firstn 0 type enclosure
  354. step emit
  355. }
  356. rule metadata {
  357. ruleset 1
  358. type replicated
  359. min_size 1
  360. max_size 10
  361. step take ny4
  362. step chooseleaf firstn 0 type enclosure
  363. step emit
  364. }
  365. rule rbd {
  366. ruleset 2
  367. type replicated
  368. min_size 1
  369. max_size 10
  370. step take ny4
  371. step chooseleaf firstn 0 type enclosure
  372. step emit
  373. }
  374.  
  375. # end crush map
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement