in pkg/raid/raid.go [185:199]
func stopAllInactive() error {
statBytes, err := os.ReadFile(mdstatFile)
if err != nil {
return fmt.Errorf("Cannot open %s for stopping inactive: %w", mdstatFile, err)
}
inactive_devices := getInactiveDevices(string(statBytes))
for _, device := range inactive_devices {
klog.Infof("Stopping inactive device %s", device)
err := stopRaidDevice(device)
if err != nil {
klog.Warningf("Could not stop inactive device %s, continuing anyway: %v", device, err)
}
}
return nil
}