Hi,

We are trying to introduce SSD/NvME OSD’s and to prevent data moving from 
current (hdd based) OSD’s while also having erasure coded pools we could not 
just simply change the erasure coding profile or create a new one and just 
apply it to the pool.

Reading this list and other posts on forums it was suggested to use the 
crushtool reclassify to insert device classes into the current crush rules and 
load that crush map manually.
Not having edited the crush map in this or any other fashion earlier I would 
appreciate very much if I someone could verify if I have done the reclassify 
correctly.
Thank you,

[root@cephyr-mon1 crushtest]# crushtool -i crush_comp.c --reclassify 
--reclassify-root default hdd -o crush_comp_corr.c
classify_root default (-1) as hdd
  renumbering bucket -1 -> -29
  renumbering bucket -27 -> -30
  renumbering bucket -25 -> -31
  renumbering bucket -23 -> -32
  renumbering bucket -21 -> -33
  renumbering bucket -19 -> -34
  renumbering bucket -17 -> -35
  renumbering bucket -15 -> -36
  renumbering bucket -13 -> -37
  renumbering bucket -11 -> -38
  renumbering bucket -9 -> -39
  renumbering bucket -7 -> -40
  renumbering bucket -5 -> -41
  renumbering bucket -3 -> -42

[root@cephyr-mon1 crushtest]# crushtool -i crush_comp.c --compare 
crush_comp_corr.c
rule 0 had 0/10240 mismatched mappings (0)
rule 6 had 0/10240 mismatched mappings (0)
rule 7 had 0/4096 mismatched mappings (0)
rule 8 had 0/4096 mismatched mappings (0)
rule 9 had 0/4096 mismatched mappings (0)
rule 10 had 0/4096 mismatched mappings (0)
rule 11 had 0/4096 mismatched mappings (0)
rule 12 had 0/4096 mismatched mappings (0)
rule 13 had 0/4096 mismatched mappings (0)
maps appear equivalent

Regards,
Mathias Lindberg

Tel: +46 (0)31 7723059
Mob: +46 (0)723 526107
Mathias Lindberg
math...@chalmers.se


{\rtf1\ansi\ansicpg1252\cocoartf2513
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0

\f0\fs24 \cf0 [root@cephyr-mon1 crushtest]# diff -u crush_comp crush_comp_corr\
--- crush_comp	2020-09-25 10:53:14.530711603 +0200\
+++ crush_comp_corr	2020-09-25 11:05:38.072707747 +0200\
@@ -253,9 +253,9 @@\
\
 # buckets\
 host cephyr-osd02 \{\
-	id -3		# do not change unnecessarily\
-	id -4 class hdd		# do not change unnecessarily\
-	# weight 109.852\
+	id -42		# do not change unnecessarily\
+	id -3 class hdd		# do not change unnecessarily\
+	# weight 109.848\
 	alg straw2\
 	hash 0	# rjenkins1\
 	item osd.1 weight 9.154\
@@ -272,9 +272,9 @@\
 	item osd.81 weight 9.154\
 \}\
 host cephyr-osd05 \{\
-	id -5		# do not change unnecessarily\
-	id -6 class hdd		# do not change unnecessarily\
-	# weight 109.852\
+	id -41		# do not change unnecessarily\
+	id -5 class hdd		# do not change unnecessarily\
+	# weight 109.848\
 	alg straw2\
 	hash 0	# rjenkins1\
 	item osd.2 weight 9.154\
@@ -291,9 +291,9 @@\
 	item osd.83 weight 9.154\
 \}\
 host cephyr-osd06 \{\
-	id -7		# do not change unnecessarily\
-	id -8 class hdd		# do not change unnecessarily\
-	# weight 109.852\
+	id -40		# do not change unnecessarily\
+	id -7 class hdd		# do not change unnecessarily\
+	# weight 109.848\
 	alg straw2\
 	hash 0	# rjenkins1\
 	item osd.5 weight 9.154\
@@ -310,9 +310,9 @@\
 	item osd.80 weight 9.154\
 \}\
 host cephyr-osd04 \{\
-	id -9		# do not change unnecessarily\
-	id -10 class hdd		# do not change unnecessarily\
-	# weight 109.852\
+	id -39		# do not change unnecessarily\
+	id -9 class hdd		# do not change unnecessarily\
+	# weight 109.848\
 	alg straw2\
 	hash 0	# rjenkins1\
 	item osd.9 weight 9.154\
@@ -329,9 +329,9 @@\
 	item osd.78 weight 9.154\
 \}\
 host cephyr-osd03 \{\
-	id -11		# do not change unnecessarily\
-	id -12 class hdd		# do not change unnecessarily\
-	# weight 109.852\
+	id -38		# do not change unnecessarily\
+	id -11 class hdd		# do not change unnecessarily\
+	# weight 109.848\
 	alg straw2\
 	hash 0	# rjenkins1\
 	item osd.3 weight 9.154\
@@ -348,9 +348,9 @@\
 	item osd.79 weight 9.154\
 \}\
 host cephyr-osd07 \{\
-	id -13		# do not change unnecessarily\
-	id -14 class hdd		# do not change unnecessarily\
-	# weight 109.852\
+	id -37		# do not change unnecessarily\
+	id -13 class hdd		# do not change unnecessarily\
+	# weight 109.848\
 	alg straw2\
 	hash 0	# rjenkins1\
 	item osd.74 weight 9.154\
@@ -367,9 +367,9 @@\
 	item osd.82 weight 9.154\
 \}\
 host cephyr-osd01 \{\
-	id -15		# do not change unnecessarily\
-	id -16 class hdd		# do not change unnecessarily\
-	# weight 109.852\
+	id -36		# do not change unnecessarily\
+	id -15 class hdd		# do not change unnecessarily\
+	# weight 109.848\
 	alg straw2\
 	hash 0	# rjenkins1\
 	item osd.0 weight 9.154\
@@ -386,9 +386,9 @@\
 	item osd.44 weight 9.154\
 \}\
 host cephyr-osd10 \{\
-	id -17		# do not change unnecessarily\
-	id -18 class hdd		# do not change unnecessarily\
-	# weight 219.703\
+	id -35		# do not change unnecessarily\
+	id -17 class hdd		# do not change unnecessarily\
+	# weight 219.696\
 	alg straw2\
 	hash 0	# rjenkins1\
 	item osd.86 weight 9.154\
@@ -417,9 +417,9 @@\
 	item osd.224 weight 9.154\
 \}\
 host cephyr-osd11 \{\
-	id -19		# do not change unnecessarily\
-	id -20 class hdd		# do not change unnecessarily\
-	# weight 219.703\
+	id -34		# do not change unnecessarily\
+	id -19 class hdd		# do not change unnecessarily\
+	# weight 219.696\
 	alg straw2\
 	hash 0	# rjenkins1\
 	item osd.87 weight 9.154\
@@ -448,9 +448,9 @@\
 	item osd.225 weight 9.154\
 \}\
 host cephyr-osd08 \{\
-	id -21		# do not change unnecessarily\
-	id -22 class hdd		# do not change unnecessarily\
-	# weight 219.703\
+	id -33		# do not change unnecessarily\
+	id -21 class hdd		# do not change unnecessarily\
+	# weight 219.696\
 	alg straw2\
 	hash 0	# rjenkins1\
 	item osd.85 weight 9.154\
@@ -479,9 +479,9 @@\
 	item osd.223 weight 9.154\
 \}\
 host cephyr-osd09 \{\
-	id -23		# do not change unnecessarily\
-	id -24 class hdd		# do not change unnecessarily\
-	# weight 219.703\
+	id -32		# do not change unnecessarily\
+	id -23 class hdd		# do not change unnecessarily\
+	# weight 219.696\
 	alg straw2\
 	hash 0	# rjenkins1\
 	item osd.84 weight 9.154\
@@ -510,9 +510,9 @@\
 	item osd.222 weight 9.154\
 \}\
 host cephyr-osd13 \{\
-	id -25		# do not change unnecessarily\
-	id -26 class hdd		# do not change unnecessarily\
-	# weight 219.703\
+	id -31		# do not change unnecessarily\
+	id -25 class hdd		# do not change unnecessarily\
+	# weight 219.696\
 	alg straw2\
 	hash 0	# rjenkins1\
 	item osd.89 weight 9.154\
@@ -541,9 +541,9 @@\
 	item osd.226 weight 9.154\
 \}\
 host cephyr-osd12 \{\
-	id -27		# do not change unnecessarily\
-	id -28 class hdd		# do not change unnecessarily\
-	# weight 219.703\
+	id -30		# do not change unnecessarily\
+	id -27 class hdd		# do not change unnecessarily\
+	# weight 219.696\
 	alg straw2\
 	hash 0	# rjenkins1\
 	item osd.88 weight 9.154\
@@ -572,9 +572,9 @@\
 	item osd.227 weight 9.154\
 \}\
 root default \{\
-	id -1		# do not change unnecessarily\
-	id -2 class hdd		# do not change unnecessarily\
-	# weight 2087.180\
+	id -29		# do not change unnecessarily\
+	id -1 class hdd		# do not change unnecessarily\
+	# weight 2087.182\
 	alg straw2\
 	hash 0	# rjenkins1\
 	item cephyr-osd02 weight 109.852\
@@ -598,7 +598,7 @@\
 	type replicated\
 	min_size 1\
 	max_size 10\
-	step take default\
+	step take default class hdd\
 	step chooseleaf firstn 0 type host\
 	step emit\
 \}\
@@ -609,7 +609,7 @@\
 	max_size 12\
 	step set_chooseleaf_tries 5\
 	step set_choose_tries 100\
-	step take default\
+	step take default class hdd\
 	step chooseleaf indep 0 type host\
 	step emit\
 \}\
@@ -620,7 +620,7 @@\
 	max_size 6\
 	step set_chooseleaf_tries 5\
 	step set_choose_tries 100\
-	step take default\
+	step take default class hdd\
 	step chooseleaf indep 0 type host\
 	step emit\
 \}\
@@ -631,7 +631,7 @@\
 	max_size 6\
 	step set_chooseleaf_tries 5\
 	step set_choose_tries 100\
-	step take default\
+	step take default class hdd\
 	step chooseleaf indep 0 type host\
 	step emit\
 \}\
@@ -642,7 +642,7 @@\
 	max_size 6\
 	step set_chooseleaf_tries 5\
 	step set_choose_tries 100\
-	step take default\
+	step take default class hdd\
 	step chooseleaf indep 0 type host\
 	step emit\
 \}\
@@ -653,7 +653,7 @@\
 	max_size 6\
 	step set_chooseleaf_tries 5\
 	step set_choose_tries 100\
-	step take default\
+	step take default class hdd\
 	step chooseleaf indep 0 type host\
 	step emit\
 \}\
@@ -664,7 +664,7 @@\
 	max_size 6\
 	step set_chooseleaf_tries 5\
 	step set_choose_tries 100\
-	step take default\
+	step take default class hdd\
 	step chooseleaf indep 0 type host\
 	step emit\
 \}\
@@ -675,7 +675,7 @@\
 	max_size 6\
 	step set_chooseleaf_tries 5\
 	step set_choose_tries 100\
-	step take default\
+	step take default class hdd\
 	step chooseleaf indep 0 type host\
 	step emit\
 \}\
@@ -686,7 +686,7 @@\
 	max_size 6\
 	step set_chooseleaf_tries 5\
 	step set_choose_tries 100\
-	step take default\
+	step take default class hdd\
 	step chooseleaf indep 0 type host\
 	step emit\
 \}}

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io

Reply via email to