From 6ecea763f9300dfb63e9b6824f14065f1308073b Mon Sep 17 00:00:00 2001 From: llnu Date: Wed, 27 May 2020 12:52:02 +0200 Subject: [PATCH] map-osd-to-disktype v0.1, it works but haven't been tested extensively --- map-osd-to-disktype | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/map-osd-to-disktype b/map-osd-to-disktype index 51f850e..66e0f28 100755 --- a/map-osd-to-disktype +++ b/map-osd-to-disktype @@ -15,3 +15,13 @@ for MOUNT in $(cat /tmp/list_osd_mountpoint.out | awk '{print $2}' | sed 's/[0-9 # Gets the hardware types for the Megacli mappings for megacli_mappings in $(cat /tmp/megacli-mappings.out); do awk '/Disk info/,0' /tmp/megaclisas-status.out | grep $megacli_mappings | cut -d '|' -f 3 >> /tmp/disk_types.out; done + +# Formatting, to get the local $OSDTYPE osd-s +cat /tmp/list_osd_mountpoint.out | awk '{print $1}' > /tmp/local_osds + +# Combine and display the outputs +paste /tmp/local_osds /tmp/disk_types.out + + +# Cleanup *.out files in the temp dir +rm /tmp/*.out