README: add Quick run block, demo GIF, rationale and gallery; add terminal renderer script
Lint / Python (flake8) (push) Failing after 53s
Security / Python Security (bandit) (push) Failing after 37s

This commit is contained in:
2026-10-03 01:25:46 -04:00
parent 0110ded15f
commit f7fdb4c052
4 changed files with 134 additions and 0 deletions
+30
View File
@@ -5,6 +5,36 @@
Advanced analysis tool for identifying optimal Ceph OSD replacement candidates based on multiple health, capacity, resilience, and performance factors.
![analyzeOSDs ranking Ceph OSD replacement candidates](docs/img/demo.gif)
## ⚡ Quick run
Run on any Ceph node as root (read-only: it only queries `ceph`, `smartctl` and `lsblk`, locally and over SSH).
```bash
# Most common: HDD OSDs, with debug output
sudo python3 -c "import urllib.request; exec(urllib.request.urlopen('https://code.lotusguild.org/LotusGuild/analyzeOSDs/raw/branch/main/ceph_osd_analyzer.py').read().decode())" --debug --class hdd
# All OSDs
sudo python3 -c "import urllib.request; exec(urllib.request.urlopen('https://code.lotusguild.org/LotusGuild/analyzeOSDs/raw/branch/main/ceph_osd_analyzer.py').read().decode())"
# Only NVMe, or only drives of at least 8 TB
sudo python3 -c "import urllib.request; exec(urllib.request.urlopen('https://code.lotusguild.org/LotusGuild/analyzeOSDs/raw/branch/main/ceph_osd_analyzer.py').read().decode())" --class nvme
sudo python3 -c "import urllib.request; exec(urllib.request.urlopen('https://code.lotusguild.org/LotusGuild/analyzeOSDs/raw/branch/main/ceph_osd_analyzer.py').read().decode())" --min-size 8
```
## Why this exists
With 30+ OSDs of mixed ages and sizes, "which drive do I replace next?" is a judgement call that involves SMART health, drive age, how full the OSD is, how much capacity the swap would add, and how balanced the hosts are. This tool gathers all of it from the live cluster and turns it into a **ranked list with the reasons spelled out**, so the next purchase and the next maintenance window are chosen on evidence.
## Gallery
Ranked HDD replacement candidates on the live cluster. Each candidate shows a replacement score, health score and issues, and the capacity and balance effect of replacing it, followed by a per-host summary. (Here osd.2 ranks first because no SMART data could be read for it.)
![analyzeOSDs --class hdd](docs/img/hdd-candidates.png)
<sub>Rendered from real command output with `scripts/render_terminal.py`.</sub>
## Overview
This script provides comprehensive analysis of your Ceph cluster to identify which OSDs should be replaced first. It combines SMART health data, capacity optimization potential, cluster resilience impact, and performance metrics to generate a prioritized replacement list.