Files
driveAtlas/driveAtlas.sh
Jared Vititoe 9d39332df3 Improve Ceph OSD parsing reliability with caching
Replace fragile per-device ceph-volume parsing (grep -B 20) with a
single upfront query that builds lookup tables.

New build_ceph_cache function:
- Parses ceph-volume lvm list output using proper block detection
- Extracts OSD IDs by matching "====== osd.X =======" headers
- Maps block devices to their corresponding OSDs
- Queries ceph osd tree once for all status info
- Creates CEPH_DEVICE_TO_OSD, CEPH_OSD_STATUS, CEPH_OSD_IN arrays

This is both more reliable and more efficient.

Fixes: #9

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 11:29:04 -05:00

28 KiB