Ceph OSD Parsing Fragility #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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