Enumerate physical drives behind RAID via smartctl megaraid passthrough

This commit is contained in:
2026-03-07 05:32:08 +00:00
parent 98e435674c
commit 1dd40a1181
5 changed files with 171 additions and 55 deletions

View File

@@ -132,6 +132,15 @@ async def get_overview():
all_healthy = False
elif hs == "warning":
warnings += 1
# Count physical drives behind RAID controllers
for pd in hd.get("physical_drives", []):
total_drives += 1
pd_hs = pd.get("health_status", "healthy")
if pd_hs == "error":
errors += 1
all_healthy = False
elif pd_hs == "warning":
warnings += 1
host_drives_out.append(HostDrive(**hd))
return Overview(