summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-03 21:32:25 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-03 21:32:25 +0000
commit167fc711a1c9190ba6deb54dd1d7d9fdf84122c3 (patch)
treed327fea0e08a9dd2408c5f3b558157d32863913c /perl-install/fsedit.pm
parentedbb716165d7a2aacd508b0f44cf775ef606d033 (diff)
downloaddrakx-167fc711a1c9190ba6deb54dd1d7d9fdf84122c3.tar
drakx-167fc711a1c9190ba6deb54dd1d7d9fdf84122c3.tar.gz
drakx-167fc711a1c9190ba6deb54dd1d7d9fdf84122c3.tar.bz2
drakx-167fc711a1c9190ba6deb54dd1d7d9fdf84122c3.tar.xz
drakx-167fc711a1c9190ba6deb54dd1d7d9fdf84122c3.zip
small fixes for LVM
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r--perl-install/fsedit.pm33
1 files changed, 16 insertions, 17 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 99db9f20f..03328f9e7 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -84,25 +84,24 @@ sub hds {
my $type = typeOfPart($_->{device});
$_->{type} = $type if $type > 0x100;
}
-
- if (my @lvms = grep { isLVM($_) } partition_table::get_normal_parts($hd)) {
- require lvm;
- foreach (@lvms) {
- my $name = lvm::get_vg($_) or next;
- my ($lvm) = grep { $_->{LVMname} eq $name } @hds;
- if (!$lvm) {
- $lvm = bless { disks => [], LVMname => $name, level => 'linear' }, 'lvm';
- lvm::update_size($lvm);
- lvm::get_lvs($lvm);
- push @lvms, $lvm;
- }
- $_->{lvm} = $name;
- push @{$lvm->{disks}}, $_;
+ push @hds, $hd;
+ }
+ if (my @pvs = grep { isLVM($_) } map { partition_table::get_normal_parts($_) } @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;
+ if (!$lvm) {
+ $lvm = bless { disks => [], LVMname => $name, level => 'linear' }, 'lvm';
+ lvm::update_size($lvm);
+ lvm::get_lvs($lvm);
+ push @lvms, $lvm;
}
+ $_->{lvm} = $name;
+ push @{$lvm->{disks}}, $_;
}
-
-
- push @hds, $hd;
}
\@hds, \@lvms;
}