Files
analyzeOSDs/ceph_osd_analyzer.py
Jared Vititoe 35a16a1793 Fix reallocated sector scoring - drives with bad sectors now rank correctly
**Problem**: osd.28 with 16 reallocated sectors only ranked #7 with score 40.8
This is a CRITICAL failing drive that should rank just below failed SMART reads.

**Changes**:
- Reallocated sectors now use tiered penalties:
  * 10+ sectors: -95 points (health = 5/100) - DRIVE FAILING
  * 5-9 sectors: -85 points (health = 15/100) - CRITICAL
  * 1-4 sectors: -70 points (health = 30/100) - SERIOUS
- Added critical_issues detection for sector problems
- Critical issues get +20 bonus (large) or +25 (small) in scoring
- Updated issue text to "DRIVE FAILING" for clarity

**Expected Result**:
- osd.28 will now score ~96/100 and rank #7 (right after 6 failed SMART)
- Any drive with reallocated/pending/uncorrectable sectors gets top priority
- Matches priority: Failed SMART > Critical sectors > Small failing > Rest

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 15:08:46 -05:00

25 KiB