mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-30 03:47:05 -05:00
Add thermal protection options: temp_limit and temp_sleep
Introduce two new configuration directives to protect disks from overheating: - temp_limit <TEMPERATURE_CELSIUS> Sets the maximum allowed disk temperature. When any disk exceeds this limit, SnapRAID stops all operations and spins down the disks. - temp_sleep <TIME_IN_MINUTES> Specifies how long disks remain in standby after a temperature event. Defaults to 15 minutes. These options allow SnapRAID to automatically pause activity and cool down disks when a temperature threshold is reached, improving data safety and hardware longevity.
This commit is contained in:
parent
b5bbece95e
commit
906d215bf5
23 changed files with 1144 additions and 81 deletions
|
|
@ -1549,9 +1549,16 @@ const char* windows_stat_desc(struct stat* st)
|
|||
return st->st_desc;
|
||||
}
|
||||
|
||||
void windows_sleep(unsigned seconds)
|
||||
unsigned windows_sleep(unsigned seconds)
|
||||
{
|
||||
Sleep(seconds * 1000);
|
||||
while (seconds) {
|
||||
if (global_interrupt) /* SIGINT should stop the sleep */
|
||||
break;
|
||||
Sleep(1000);
|
||||
--seconds;
|
||||
}
|
||||
|
||||
return seconds;
|
||||
}
|
||||
|
||||
void windows_usleep(uint64_t useconds)
|
||||
|
|
@ -3029,5 +3036,10 @@ int windows_join(thread_id_t thread, void** retval)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int ambient_temperature(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue