From 1b30ab71b626e5cd4446227ef7f5b91f81705c32 Mon Sep 17 00:00:00 2001 From: llnu Date: Wed, 27 May 2020 12:36:20 +0200 Subject: [PATCH] Fixing bugs in map disk types to osd script. Combining the outputs is needed, then it's complete --- map-osd-to-disktype | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/map-osd-to-disktype b/map-osd-to-disktype index 0a77dae..51f850e 100755 --- a/map-osd-to-disktype +++ b/map-osd-to-disktype @@ -8,7 +8,7 @@ OSDTYPE=ssd /opt/ungleich-tools/megaclisas-status > /tmp/megaclisas-status.out # Gets osd numbers of a particular device class, and gets their mountpoints on the host, and puts them into a tempfile -for osd in $(ceph osd tree | grep $OSDTYPE | grep -v down | cut -b 1-3); do findmnt -t xfs -n -o TARGET,SOURCE | grep $osd | cut -c 24- >> /tmp/list_osd_mountpoint.out; done +for osd in $(ceph osd tree | grep $OSDTYPE | grep -v down | cut -b 1-3); do findmnt -t xfs -n -o TARGET,SOURCE | grep "ceph-$osd " | cut -c 24- >> /tmp/list_osd_mountpoint.out; done # Gets the Megacli mappings for the mountpoints for MOUNT in $(cat /tmp/list_osd_mountpoint.out | awk '{print $2}' | sed 's/[0-9]*//g') ; do cat /tmp/megaclisas-status.out | grep $MOUNT | awk '{print $1}' >> /tmp/megacli-mappings.out; done