diff --git a/ceph-osd-class-remove b/ceph-osd-class-remove deleted file mode 100755 index fb2759d..0000000 --- a/ceph-osd-class-remove +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -if [ $# -lt 1 ]; then - echo "$0: osd-name osd-name ..." >&2 - echo "Removes associated device classes" - exit 1 -fi - -ceph osd crush rm-device-class "$@" diff --git a/ceph-osd-class-set b/ceph-osd-class-set new file mode 100755 index 0000000..5f2e69b --- /dev/null +++ b/ceph-osd-class-set @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ $# -ne 2 ]; then + echo "$0: class-name osd-name" >&2 + echo "Set device class for OSD (needs to be classless before)" + exit 1 +fi + +osd=$1; shift +class=$1; shift + +ceph osd crush set-device-class "$class" "$osd"