summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index cabc7807c..893161f08 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -559,11 +559,14 @@ sub raidAutoStartIoctl {
sub raidAutoStartRaidtab {
my (@parts) = @_;
+ require raid;
#- faking a raidtab, it seems to be working :-)))
- #- (choosing md0, but it works for the others!)
+ #- (choosing any inactive md)
+ raid::inactivate_all();
foreach (@parts) {
- output("/etc/raidtab", "raiddev /dev/md0\n device " . devices::make($_->{device}) . "\n");
- run_program::run('raidstart', devices::make("md0"));
+ my ($nb) = grep { !raid::is_active("md$_") } 0..7;
+ output("/etc/raidtab", "raiddev /dev/md$nb\n device " . devices::make($_->{device}) . "\n");
+ run_program::run('raidstart', devices::make("md$nb"));
}
}
@@ -577,7 +580,7 @@ sub raidAutoStart {
if (my @needed_perso = map {
if_(/^kmod: failed.*md-personality-(.)/ ||
/^md: personality (.) is not loaded/, $personalities{$1}) } syslog()) {
- log::l("RAID: autostart needs personality from $_"), eval { modules::load(@needed_perso) };
+ eval { modules::load(@needed_perso) };
raidAutoStartIoctl() or raidAutoStartRaidtab(@parts);
}
}