From 8d22809b454b4e50a72b8d560b5dda3c38a4acbf Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Sep 2020 00:07:24 +0200 Subject: [PATCH] update how to set the device class --- ceph-osd-create-start | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ceph-osd-create-start b/ceph-osd-create-start index f4d7bd0..a2c73f7 100755 --- a/ceph-osd-create-start +++ b/ceph-osd-create-start @@ -69,7 +69,9 @@ ln -s $dev_block "$mountpath/block" echo "$uuid_block" > "$mountpath/block_uuid" echo "$fsid" > "$mountpath/ceph_fsid" echo "$magic" > "$mountpath/magic" -echo "$CLASS" > "$mountpath/crush_device_class" + +# Not needed (anymore) - using ceph osd crush set-device-class below +#echo "$CLASS" > "$mountpath/crush_device_class" # Important, otherwise --mkfs later will try to create filestore echo bluestore > "$mountpath/type" @@ -92,6 +94,7 @@ else fi ceph osd crush add osd.${osd_id} ${WEIGHT} host=$(hostname) +ceph osd crush set-device-class $CLASS osd.${osd_id} echo "$metadata_dev /var/lib/ceph/osd/ceph-${osd_id} xfs noatime 0 0" >> /etc/fstab @@ -101,3 +104,5 @@ if [ -e /etc/monit ]; then else /etc/init.d/ceph start osd.${osd_id} fi + +#rm "$mountpath/crush_device_class"