Add script to set device class

This commit is contained in:
Nico Schottelius 2018-07-31 18:59:34 +02:00
parent 9fe9d573af
commit 3db3a4c3d0
2 changed files with 12 additions and 9 deletions

View file

@ -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 "$@"

12
ceph-osd-class-set Executable file
View file

@ -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"