This commit is contained in:
Jamie Cameron
2015-11-28 20:56:40 -08:00
parent ed46708b99
commit 6fec095bca
3 changed files with 5 additions and 2 deletions

View File

@@ -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.

View File

@@ -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*(.*)/) {

View File

@@ -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?