Ceph OSD Parsing Fragility #9

Closed
opened 2026-02-02 15:00:34 -05:00 by jared · 0 comments
Owner

Line ~249-252

osd_id=$(ceph-volume lvm list 2>/dev/null | grep -B 20 "/dev/$device" | grep "osd id" | awk '{print "osd."$3}' | head -1)

Issue:

-B 20 (20 lines before) is arbitrary and may not capture the OSD ID

Fails if device path format changes

Doesn't handle multiple OSDs on same device

# Line ~249-252 osd_id=$(ceph-volume lvm list 2>/dev/null | grep -B 20 "/dev/$device" | grep "osd id" | awk '{print "osd."$3}' | head -1) Issue: -B 20 (20 lines before) is arbitrary and may not capture the OSD ID Fails if device path format changes Doesn't handle multiple OSDs on same device
jared closed this issue 2026-02-05 12:20:45 -05:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/driveAtlas#9