From 02cb81de7249ccc2265d436eb4b9b9d4715b00c0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 1 Oct 2020 23:52:39 +0200 Subject: [PATCH] [ceph] remove old parts --- ceph-osd-create-start | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/ceph-osd-create-start b/ceph-osd-create-start index 917a530..106e363 100755 --- a/ceph-osd-create-start +++ b/ceph-osd-create-start @@ -29,7 +29,6 @@ fi export DEV=$1;shift export CLASS=$1; shift - uuid_metadata=$(uuidgen) uuid_block=$(uuidgen) @@ -65,14 +64,10 @@ mkdir -p "$mountpath" mount "$dev_metadata" "$mountpath" ln -s $dev_block "$mountpath/block" - echo "$uuid_block" > "$mountpath/block_uuid" echo "$fsid" > "$mountpath/ceph_fsid" echo "$magic" > "$mountpath/magic" -# 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" @@ -85,8 +80,8 @@ touch "$mountpath/sysvinit" ceph-osd --cluster ceph -i "${osd_id}" --mkfs chown -R ceph:ceph "$mountpath" -# Also allow access to the blockdevices - via symlink -chown ceph:ceph "${mountpath}/block" +# Also allow access to the blockdevice +chown ceph:ceph ${dev_block} if [ $# -eq 1 ]; then WEIGHT=$1; shift @@ -96,9 +91,10 @@ else WEIGHT=$(lsblk -l -b | awk "/^$nodev/ { print \$4/(1024^4) }") fi +# Move into the correct position ceph osd crush add osd.${osd_id} ${WEIGHT} host=$(hostname) -# Ensure previous assigned class is gone +# Ensure previous assigned class is gone - if the osd id was used before ceph osd crush rm-device-class osd.${osd_id} ceph osd crush set-device-class $CLASS osd.${osd_id} @@ -110,5 +106,3 @@ if [ -e /etc/monit ]; then else /etc/init.d/ceph start osd.${osd_id} fi - -#rm "$mountpath/crush_device_class"