Fix mdstat for devices in delayed resync state
In some raid configurations resync will be delayed for devices allocated on the same physiclal units. Fixes #170.
This commit is contained in:
parent
f261b788d2
commit
00e1db52bb
4 changed files with 12 additions and 1 deletions
|
|
@ -162,7 +162,7 @@ func parseMdstat(mdStatusFilePath string) ([]mdStatus, error) {
|
|||
|
||||
// If device is syncing at the moment, get the number of currently synced bytes,
|
||||
// otherwise that number equals the size of the device.
|
||||
if strings.Contains(lines[j], "recovery") || strings.Contains(lines[j], "resync") {
|
||||
if strings.Contains(lines[j], "recovery") || strings.Contains(lines[j], "resync") && ! strings.Contains(lines[j], "resync=DELAYED") {
|
||||
syncedBlocks, err = evalBuildline(lines[j])
|
||||
if err != nil {
|
||||
return mdStates, fmt.Errorf("error parsing mdstat: %s", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue