diff --git a/driveAtlas.sh b/driveAtlas.sh index ed04310..41a378d 100644 --- a/driveAtlas.sh +++ b/driveAtlas.sh @@ -667,8 +667,9 @@ build_ceph_cache() { local current_osd="" local osd_count=0 while IFS= read -r line; do - # Match OSD header: "====== osd.5 =======" - if [[ "$line" =~ ======[[:space:]]+osd\.([0-9]+)[[:space:]]+======= ]]; then + # Match OSD header: "====== osd.5 =======" or "====== osd.19 ======" + # Number of trailing equals varies based on OSD number length + if [[ "$line" =~ ======[[:space:]]+osd\.([0-9]+)[[:space:]]+====== ]]; then current_osd="osd.${BASH_REMATCH[1]}" # Match "devices" line which has the actual physical device: " devices /dev/sda" # This is more reliable than "block device" which may show LVM paths