[Fai-commit] r5002 - trunk/lib/setup-storage
mt at alioth.debian.org
mt at alioth.debian.org
Mon Jul 28 21:27:10 UTC 2008
Author: mt
Date: 2008-07-28 21:27:09 +0000 (Mon, 28 Jul 2008)
New Revision: 5002
Modified:
trunk/lib/setup-storage/Commands.pm
Log:
bugfix in RAID volume handling in case of devices marked missing: mdadm command
requires device names to be replaced by "missing"
Modified: trunk/lib/setup-storage/Commands.pm
===================================================================
--- trunk/lib/setup-storage/Commands.pm 2008-06-29 12:23:42 UTC (rev 5001)
+++ trunk/lib/setup-storage/Commands.pm 2008-07-28 21:27:09 UTC (rev 5002)
@@ -196,13 +196,21 @@
# set proper partition types for RAID
foreach my $d (@devs) {
- if ($vol->{devices}->{$d}->{spare}) {
- push @spares, $d;
+ if ($vol->{devices}{$d}{missing}) {
+ if ($vol->{devices}->{$d}->{spare}) {
+ push @spares, "missing";
+ } else {
+ push @eff_devs, "missing";
+ }
+ # skip devices marked missing
+ next if $vol->{devices}{$d}{missing};
} else {
- push @eff_devs, $d;
+ if ($vol->{devices}->{$d}->{spare}) {
+ push @spares, $d;
+ } else {
+ push @eff_devs, $d;
+ }
}
- # skip devices marked missing
- next if $vol->{devices}{$d}{missing};
&FAI::set_partition_type_on_phys_dev($d, "raid");
if ((&FAI::phys_dev($d))[0]) {
$pre_req .= ",type_raid_$d";
More information about the Fai-commit
mailing list