summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-08 07:10:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-08 07:10:15 +0000
commit3c6fbfb082361277877a5dd82f7014eff0afaa92 (patch)
tree08abbcab50b6eecbf5f1f4821ccbbf5865f041df /perl-install/detect_devices.pm
parent98a4be8ec81d7865a4655fc322b52e866e1c64a2 (diff)
downloaddrakx-3c6fbfb082361277877a5dd82f7014eff0afaa92.tar
drakx-3c6fbfb082361277877a5dd82f7014eff0afaa92.tar.gz
drakx-3c6fbfb082361277877a5dd82f7014eff0afaa92.tar.bz2
drakx-3c6fbfb082361277877a5dd82f7014eff0afaa92.tar.xz
drakx-3c6fbfb082361277877a5dd82f7014eff0afaa92.zip
- switch to mdadm (instead of raidtools)
- create mdadm.conf instead of raidtab - internal {raids} is no more indexed by X for mdX, and so don't have holes anymore - internal {chunk-size} is now a number in KiB - internal {raid} is the raid device name, not the number - various cleanup for raid detection
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm43
1 files changed, 0 insertions, 43 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index a22af1115..7af813337 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -803,49 +803,6 @@ sub hasMousePS2 {
my $t; sysread(tryOpen($_[0]) || return, $t, 256) != 1 || $t ne "\xFE";
}
-sub raidAutoStartIoctl() {
- sysopen(my $F, devices::make("md0"), 2) or return;
- ioctl $F, 0x914, 0; #- RAID_AUTORUN
-}
-
-sub raidAutoStartRaidtab {
- my (@parts) = @_;
- $::isInstall or return;
- require raid;
- #- faking a raidtab, it seems to be working :-)))
- #- (choosing any inactive md)
- raid::inactivate_all();
- my $detect_one = sub {
- my ($device) = @_;
- my $free_md = devices::make(find { !raid::is_active($_) } map { "md$_" } 0 .. raid::max_nb());
- output("/tmp/raidtab", "raiddev $free_md\n device " . devices::make($device) . "\n");
- log::l("raidAutoStartRaidtab: trying $device");
- run_program::run('raidstart', '-c', "/tmp/raidtab", $free_md);
- };
- $detect_one->($_->{device}) foreach @parts;
-
- #- try again to detect RAID 10
- $detect_one->($_) foreach raid::active_mds();
-
- unlink "/tmp/raidtab";
-}
-
-sub raidAutoStart {
- my (@parts) = @_;
-
- log::l("raidAutoStart");
- eval { modules::load('md') };
- my %personalities = ('1' => 'linear', '2' => 'raid0', '3' => 'raid1', '4' => 'raid5');
- raidAutoStartIoctl() or raidAutoStartRaidtab(@parts);
- foreach (1..2) { #- try twice for RAID 10
- my @needed_perso = map {
- if_(/^kmod: failed.*md-personality-(.)/ ||
- /^md: personality (.) is not loaded/, $personalities{$1}) } syslog() or last;
- eval { modules::load(@needed_perso) };
- raidAutoStartIoctl() or raidAutoStartRaidtab(@parts);
- }
-}
-
sub usb_description2removable {
local ($_) = @_;
return 'camera' if /\bcamera\b/i;