mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-30 20:06:22 -05:00
Surface coarse SMART health for USB-bridge drives (#498)
* Surface coarse SMART health for USB-bridge drives USB enclosures that reject ATA pass-through (e.g. Seagate Expansion) are invisible to pySMART/DeviceList, so the drive shows no SMART at all on the Controller page. Fall back to smartctl over the SCSI transport, which many such bridges still answer, to report a coarse PASS/FAIL health plus drive identity (model/serial/capacity). The health (-d scsi -H) and identity (-d scsi -i) reads are issued as separate calls: combining them makes smartctl suppress the health line when the identity read reports "SMART support is: Unavailable" (which these bridges do). The entry is marked smart_limited (labelled "(limited)" in both UIs) so a green PASS is not mistaken for full monitoring — these drives expose no attributes or temperature, and some bridges report "OK" statically. * Harden SCSI health fallback (Greptile review) - _scsi_health: treat any unrecognised status (e.g. "UNKNOWN", "N/A") as unreadable (None) instead of a false FAIL. Only "OK" -> PASS and "FAIL*" -> FAIL; anything else omits the drive rather than showing a red FAIL that contradicts the smart_limited disclaimer. - get_all_smart_status: isolate the SCSI supplement loop in its own try/except so an error there cannot discard the pySMART results already collected. --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9f0e3fa0aa
commit
dac849f9f6
4 changed files with 298 additions and 14 deletions
|
|
@ -1786,7 +1786,8 @@
|
|||
|
||||
for (const drive of drives) {
|
||||
const assessmentClass = getHealthClass(drive.health || drive.assessment);
|
||||
const assessmentText = drive.health || drive.assessment || 'Unknown';
|
||||
const assessmentText = (drive.health || drive.assessment || 'Unknown')
|
||||
+ (drive.smart_limited ? ' (limited)' : '');
|
||||
const tempText = drive.temperature !== null ? `${drive.temperature}°C` : '--';
|
||||
|
||||
html += `
|
||||
|
|
@ -1859,7 +1860,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td style="color: #888;">Assessment</td>
|
||||
<td class="${assessmentClass}">${drive.assessment || 'Unknown'}</td>
|
||||
<td class="${assessmentClass}">${drive.assessment || drive.health || 'Unknown'}${drive.smart_limited ? ' (limited — USB enclosure reports health only)' : ''}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color: #888;">Temperature</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue