summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-09-16 15:22:36 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-09-16 15:22:36 +0000
commite7e246812e4426f71985770abb50356dfdd7ac0a (patch)
tree67725014e2b4605711df35b483b204bb299f0153 /perl-install/fsedit.pm
parenta82b2e32ac2f198f7176c33ac14383192c5ab37a (diff)
downloaddrakx-backup-do-not-use-e7e246812e4426f71985770abb50356dfdd7ac0a.tar
drakx-backup-do-not-use-e7e246812e4426f71985770abb50356dfdd7ac0a.tar.gz
drakx-backup-do-not-use-e7e246812e4426f71985770abb50356dfdd7ac0a.tar.bz2
drakx-backup-do-not-use-e7e246812e4426f71985770abb50356dfdd7ac0a.tar.xz
drakx-backup-do-not-use-e7e246812e4426f71985770abb50356dfdd7ac0a.zip
enhance lvm handling (mostly standalone)
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r--perl-install/fsedit.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 2ad84821b..d715262c9 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -47,6 +47,7 @@ my @suggestions_mntpoints = (
);
my @partitions_signatures = (
+ [ 0x8e, 0, "HM\1\0" ],
[ 0x83, 0x438, "\x53\xEF" ],
[ 0x183, 0x10034, "ReIsErFs" ],
[ 0x183, 0x10034, "ReIsEr2Fs" ],
@@ -89,6 +90,7 @@ sub raids {
my @parts = get_fstab(@$hds);
(grep { isRawRAID($_) } @parts) && detect_devices::raidAutoStart() or return [];
+ fs::get_major_minor(@parts);
my %devname2part = map { $_->{dev} => { %$_, device => $_->{dev} } } read_partitions();
my @raids;
@@ -157,15 +159,18 @@ sub hds {
}
push @hds, $hd;
}
+ #- detect raids before LVM allowing LVM on raid
+ my $raids = raids(\@hds);
+ my $all_hds = { %{ empty_all_hds() }, hds => \@hds, lvms => [], raids => $raids };
my @lvms;
- if (my @pvs = grep { isRawLVM($_) } map { partition_table::get_normal_parts($_) } @hds) {
+ if (my @pvs = grep { isRawLVM($_) } get_all_fstab($all_hds)) {
#- otherwise vgscan won't find them
devices::make($_->{device}) foreach @pvs;
require lvm;
foreach (@pvs) {
my $name = lvm::get_vg($_) or next;
- my ($lvm) = grep { $_->{LVMname} eq $name } (@hds, @lvms);
+ my ($lvm) = grep { $_->{LVMname} eq $name } @lvms;
if (!$lvm) {
$lvm = bless { disks => [], LVMname => $name }, 'lvm';
lvm::update_size($lvm);
@@ -176,11 +181,7 @@ sub hds {
push @{$lvm->{disks}}, $_;
}
}
-
- my $all_hds = { %{ empty_all_hds() }, hds => \@hds, lvms => \@lvms, raids => [] };
- fs::get_major_minor(get_all_fstab($all_hds));
-
- $all_hds->{raids} = raids(\@hds);
+ $all_hds->{lvms} = \@lvms;
$all_hds;
}