diff --git a/map-osd-to-disktype b/map-osd-to-disktype index 43a7a29..7bafb75 100755 --- a/map-osd-to-disktype +++ b/map-osd-to-disktype @@ -18,11 +18,11 @@ for MOUNT in $(cat /tmp/list_osd_mountpoint.out | awk '{print $1}' | sed 's/[0-9 for megacli_mappings in $(cat /tmp/megacli-mappings.out); do awk '/Disk info/,0' /tmp/megaclisas-status.out | grep -w "$megacli_mappings"p0 | cut -d '|' -f 2-6,8 >> /tmp/disk_types.out; done # Formatting, to get the local $OSDTYPE osd-s -for osd_num in $(cat /tmp/list_osd_mountpoint.out | awk '{print $2}' | cut -c 24- ); do echo osd-$osd_num >> /tmp/local_osds.out; done +for osd_num in $(cat /tmp/list_osd_mountpoint.out | awk '{print $2}' | cut -c 24- ); do printf "%-7s%s\n" "osd-$osd_num" >> /tmp/local_osds.out; done # Combine and display the outputs -paste /tmp/local_osds.out /tmp/disk_types.out +paste /tmp/local_osds.out /tmp/disk_types.out -d '|' # Cleanup *.out files in the temp dir -rm /tmp/*.out +#rm /tmp/*.out