diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-07-07 23:44:37 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-07-07 23:44:37 +0000 |
commit | 31ce8897b9eb107f6710dd7757744cbb7f917043 (patch) | |
tree | 827f3c87aa2bd27f40b6998ca5d0784ead68f087 | |
parent | 3ae2005f5cfb0cc034f3c5f1f85a100f22fe15ab (diff) | |
download | drakx-backup-do-not-use-31ce8897b9eb107f6710dd7757744cbb7f917043.tar drakx-backup-do-not-use-31ce8897b9eb107f6710dd7757744cbb7f917043.tar.gz drakx-backup-do-not-use-31ce8897b9eb107f6710dd7757744cbb7f917043.tar.bz2 drakx-backup-do-not-use-31ce8897b9eb107f6710dd7757744cbb7f917043.tar.xz drakx-backup-do-not-use-31ce8897b9eb107f6710dd7757744cbb7f917043.zip |
smarter raidAutoStartRaidtab
-rw-r--r-- | perl-install/detect_devices.pm | 11 |
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); } } |