Enforce that full cooling arrives no later than the disk alarm

DISK_RAMP_HIGH_OFFSET below DISK_ALARM_OFFSET means the alarm fires
while there is still cooling left unused. iz-pve0 was tuned that way by
hand (full at limit-2, alarm at limit-5), which would have mailed 3c
before the fans were actually flat out, for every drive class.

check_ramp_ordering() now clamps at startup and logs it, rather than
exiting - a fan controller that refuses to start leaves the fans
wherever they were.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Zeb Hering
2026-08-28 21:49:50 -07:00
parent 02cd1a4004
commit 86f3b0c323
3 changed files with 45 additions and 0 deletions

View File

@@ -57,6 +57,24 @@ preheated exhaust air. A shared threshold would peg the fans for drives that are
and ignore the ones that are not. Measuring each drive against its own envelope makes
the curve independent of both drive technology and bay position.
A drive with a lower tolerance drives the fans even while a hotter drive does not.
With `iz-pve0`'s settings (floor 28%, ramp `limit-8` to `limit-5`):
| Drive | Limit | Ramp | Asks at 45c | at 50c | at 55c |
|---|---|---|---|---|---|
| Samsung 860 EVO | 70c | 62-65c | 28% | 28% | 28% |
| Toshiba / Seagate HDD | 60c | 52-55c | 28% | 28% | **50%** |
| a 55c-rated drive | 55c | 47-50c | 28% | **50%** | **50%** |
At 55c the SSD contributes nothing while the spinner asks for full speed, which is the
whole point: the same temperature means different things to different drives.
**Full cooling must arrive no later than the alarm.** `DISK_RAMP_HIGH_OFFSET` must be
`>=` `DISK_ALARM_OFFSET`, or the alarm mails you while there is still cooling left unused.
`check_ramp_ordering()` clamps this at startup and logs when it does — it clamps rather
than exits, because a fan controller that refuses to start leaves the fans wherever they
happened to be.
**Reported limits are clamped by class.** They are not uniformly trustworthy — Samsung
and Kioxia report a real operating maximum (70), Toshiba and Seagate report 60, and WD
Reds report **85**, which is the SCT critical limit and not somewhere you want a drive