view_startdesc=Click this button to re-activate this RAID device.
view_disks=Partitions in RAID
view_spares=Spare partitions
+view_addspare=Add $1
view_size=Usable size
view_resync=Percent of resync done
view_down=(Down)
local ($raid, $newdisk) = @_;
if ($raid_mode eq "mdadm") {
# Call mdadm command to add
- if ($newdisk =~ /^\d+$/) {
- $cmd = "mdadm --grow $raid->{'value'} -n + $newdisk 2>&1";
- }
- else {
- $cmd = "mdadm --grow $raid->{'value'} -n $newdisk 2>&1";
- }
+ $cmd = "mdadm --grow $raid->{'value'} -n $newdisk 2>&1";
local $out = &backquote_logged(
$cmd);
&error(&text('emdadmgrow', "<tt>'$cmd' -> $out</tt>")) if ($?);
push(@rdisks, [ $d->{'value'}, $name ]);
$sparescnt++;
$newdisks++;
- push(@spares, [ $newdisks, $sparescnt ]);
+ push(@spares, [ $newdisks,
+ &text('view_addspare', $sparescnt) ]);
}
}
if ($sp) {