feat: Tier2 backup pauses when destination drive is inactive (Inaktív)

Deactivated drives (Schedulable=false) now treated like disconnected for
Tier2 backups. New IsStoragePathSchedulable() checks active+connected+not
decommissioned. UI shows yellow "Cél meghajtó inaktív" badge, scheduler
skips silently with WARN log.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 10:59:56 +01:00
parent 4fd907a09e
commit 9b13c0e21c
6 changed files with 55 additions and 10 deletions
+14
View File
@@ -707,6 +707,20 @@ func (s *Settings) IsStoragePathKnown(path string) bool {
return false
}
// IsStoragePathSchedulable returns whether a path belongs to a registered,
// schedulable (active) storage path. Returns false if the path is unknown,
// disconnected, decommissioned, or inactive.
func (s *Settings) IsStoragePathSchedulable(path string) bool {
s.mu.RLock()
defer s.mu.RUnlock()
for _, sp := range s.StoragePaths {
if path == sp.Path || strings.HasPrefix(path, sp.Path+"/") {
return sp.Schedulable && !sp.Disconnected && !sp.Decommissioned
}
}
return false
}
// GetStoppedStacks returns the list of stacks that were auto-stopped for a storage path.
func (s *Settings) GetStoppedStacks(path string) []string {
s.mu.RLock()