RAID 0 devices don't need to check for resync/recovery progress.
This commit is contained in:
parent
dff99ffcf5
commit
fae6cd4d61
|
@ -190,12 +190,14 @@ void SoftwareRAID::scanSoftwareRAID(QList<Device*>& devices)
|
||||||
if (scannedRaid.contains(d)) {
|
if (scannedRaid.contains(d)) {
|
||||||
d->setActive(status.toLower() == QStringLiteral("active"));
|
d->setActive(status.toLower() == QStringLiteral("active"));
|
||||||
|
|
||||||
QRegularExpression reMirrorStatus(QStringLiteral("\\[[=>.]+\\]\\s+(resync|recovery)"));
|
if (d->raidLevel() > 0) {
|
||||||
|
QRegularExpression reMirrorStatus(QStringLiteral("\\[[=>.]+\\]\\s+(resync|recovery)"));
|
||||||
|
|
||||||
QRegularExpressionMatch reMirrorStatusMatch = reMirrorStatus.match(scanRaid.output());
|
QRegularExpressionMatch reMirrorStatusMatch = reMirrorStatus.match(scanRaid.output());
|
||||||
|
|
||||||
if (reMirrorStatusMatch.hasMatch())
|
if (reMirrorStatusMatch.hasMatch())
|
||||||
d->setActive(false);
|
d->setActive(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
scannedRaid << d;
|
scannedRaid << d;
|
||||||
|
|
Loading…
Reference in New Issue