mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Detect when RAID resync is delayed https://github.com/webmin/webmin/issues/269
This commit is contained in:
@@ -90,6 +90,7 @@ view_disks=Partitions in RAID
|
||||
view_spares=Spare partitions
|
||||
view_size=Usable size
|
||||
view_resync=Percent of resync done
|
||||
view_delayed=Waiting on another device
|
||||
view_down=(Down)
|
||||
view_cannot=This RAID device cannot be modified as it is currently mounted.
|
||||
view_cannot2=This RAID device cannot be mounted, de-activated, deleted or re-formatted as it is currently active.
|
||||
|
||||
@@ -37,7 +37,7 @@ local %mdstat;
|
||||
local $lastdev;
|
||||
open(MDSTAT, $config{'mdstat'});
|
||||
while(<MDSTAT>) {
|
||||
if (/^(md\d+)\s*:\s+(\S+)\s+(\S+)\s+(.*)\s+(\d+)\s+blocks\s*(.*)resync=([0-9\.]+)/) {
|
||||
if (/^(md\d+)\s*:\s+(\S+)\s+(\S+)\s+(.*)\s+(\d+)\s+blocks\s*(.*)resync=([0-9\.]+|delayed)/) {
|
||||
$mdstat{$lastdev = "/dev/$1"} = [ $2, $3, $4, $5, $7, $6 ];
|
||||
}
|
||||
elsif (/^(md\d+)\s*:\s+(\S+)\s+(\S+)\s+(.*)\s+(\d+)\s+blocks\s*(.*)/) {
|
||||
|
||||
@@ -45,7 +45,9 @@ if ($raid->{'size'}) {
|
||||
"(".&nice_size($raid->{'size'}*1024).")");
|
||||
}
|
||||
if ($raid->{'resync'}) {
|
||||
print &ui_table_row($text{'view_resync'}, "$raid->{'resync'} \%");
|
||||
print &ui_table_row($text{'view_resync'},
|
||||
$raid->{'resync'} eq 'delayed' ? $text{'view_delayed'}
|
||||
: "$raid->{'resync'} \%");
|
||||
}
|
||||
|
||||
# Superblock?
|
||||
|
||||
Reference in New Issue
Block a user