mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
Show raid rebuild speed and time left
This commit is contained in:
@@ -32,3 +32,4 @@ Added a button to remove a detached partition, thanks to Caspar Smit.
|
||||
Added support for creating EXT4 filesystems.
|
||||
---- Changes since 1.510 ----
|
||||
Conversion from RAID 5 to 6 and vice versa is now possible, thanks to Caspar Smit.
|
||||
When a RAID array is being rebuilt, show the speed and time remaining, thanks to Farid Benamrouche.
|
||||
|
||||
@@ -168,6 +168,16 @@ else {
|
||||
}
|
||||
}
|
||||
close(MDSTAT);
|
||||
open(MDSTAT, $config{'mdstat'});
|
||||
while(<MDSTAT>){
|
||||
if (/^.*finish=(\S+)min/){
|
||||
$md->{'remain'} = $1;
|
||||
}
|
||||
if (/^.*speed=(\S+)K/){
|
||||
$md->{'speed'} = $1;
|
||||
}
|
||||
}
|
||||
close(MDSTAT);
|
||||
push(@get_raidtab_cache, $md);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,9 @@ if ($raid->{'state'}) {
|
||||
|
||||
# Rebuild percent
|
||||
if ($raid->{'rebuild'}) {
|
||||
print &ui_table_row($text{'view_rebuild'}, $raid->{'rebuild'}." \%");
|
||||
print &ui_table_row($text{'view_rebuild'},
|
||||
$raid->{'rebuild'}." \% (".$raid->{'remain'}." min, ".
|
||||
$raid->{'speed'}." KBytes/s)");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user