[map-osd-to-disktype] added header, checked for bashism, should be posix compatible
This commit is contained in:
parent
2dfaedc858
commit
a78649c6ab
1 changed files with 10 additions and 2 deletions
|
@ -1,6 +1,15 @@
|
||||||
# Assumes, osd is up and
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This script will find the locally active osd-s and display their information with the help of Megacli tools.
|
||||||
|
# Assumes that you run it on a host which has at least 1 osd that matches hdd or ssd disk device class in ceph osd df tree output.
|
||||||
#
|
#
|
||||||
|
# An example for usage:
|
||||||
|
# for NUM in 14 2 3 4 6 ; do printf "server$NUM\n" >> /tmp/osd_infos; ssh root@server"$NUM".place6.ungleich.ch "/opt/ungleich-tools/map-osd-to-disktype" >> /tmp/osd_infos ; printf "\n \n" >> /tmp/osd_infos; done
|
||||||
|
#
|
||||||
|
# llnu's most hacky/advanced script at the time of writing (2020-05-27)
|
||||||
|
|
||||||
|
|
||||||
|
# Future functionality (arguments, and filtering):
|
||||||
#OSDTYPE=ssd
|
#OSDTYPE=ssd
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,6 +32,5 @@ for osd_num in $(cat /tmp/list_osd_mountpoint.out | awk '{print $2}' | cut -c 24
|
||||||
# Combine and display the outputs
|
# Combine and display the outputs
|
||||||
paste /tmp/local_osds.out /tmp/disk_types.out -d '|'
|
paste /tmp/local_osds.out /tmp/disk_types.out -d '|'
|
||||||
|
|
||||||
|
|
||||||
# Cleanup *.out files in the temp dir
|
# Cleanup *.out files in the temp dir
|
||||||
rm /tmp/*.out
|
rm /tmp/*.out
|
||||||
|
|
Loading…
Reference in a new issue