[Fai-commit] r6570 - branches/experimental/patches

Michael Tautschnig mt at alioth.debian.org
Sun Jun 5 19:06:48 UTC 2011


Author: mt
Date: 2011-06-05 19:06:48 +0000 (Sun, 05 Jun 2011)
New Revision: 6570

Added:
   branches/experimental/patches/setup-storage_softraid-assemble-error
Modified:
   branches/experimental/patches/series
Log:
setup-storage: added mdadm --stop --scan before re-assembling existing arrays


Modified: branches/experimental/patches/series
===================================================================
--- branches/experimental/patches/series	2011-06-05 18:24:10 UTC (rev 6569)
+++ branches/experimental/patches/series	2011-06-05 19:06:48 UTC (rev 6570)
@@ -18,3 +18,4 @@
 setup-storage_first-part-at-1M
 setup-storage_loopback-support
 setup-storage_syntax-check-mode
+setup-storage_softraid-assemble-error

Added: branches/experimental/patches/setup-storage_softraid-assemble-error
===================================================================
--- branches/experimental/patches/setup-storage_softraid-assemble-error	                        (rev 0)
+++ branches/experimental/patches/setup-storage_softraid-assemble-error	2011-06-05 19:06:48 UTC (rev 6570)
@@ -0,0 +1,23 @@
+2011-06-05  Michael Tautschnig  <mt at debian.org>
+
+	* setup-storage/Commands.pm: stop RAID arrays before re-assembling. Thanks
+		David Dreezer for testing.
+Index: trunk/lib/setup-storage/Commands.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Commands.pm
++++ trunk/lib/setup-storage/Commands.pm
+@@ -292,8 +292,12 @@
+ sub build_raid_commands {
+ 
+   # check RAID arrays if there are pre-existing ones
+-  &FAI::push_command("mdadm --assemble --scan --config=$FAI::DATADIR/mdadm-from-examine.conf",
+-    "", "mdadm_startall_examined") if (scalar(keys %FAI::current_raid_config));
++  if (scalar(keys %FAI::current_raid_config))
++  {
++    &FAI::push_command("mdadm --stop --scan", "", "stop_for_assemble"); 
++    &FAI::push_command("mdadm --assemble --scan --config=$FAI::DATADIR/mdadm-from-examine.conf",
++      "stop_for_assemble", "mdadm_startall_examined");
++  }
+   foreach my $id (keys %FAI::current_raid_config) {
+     my $md = "/dev/md$id";
+     my $pre_deps_cl = "mdadm_startall_examined";




More information about the Fai-commit mailing list