summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-07-01 06:05:43 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-07-01 06:05:43 +0000
commitf04cae4ca3dea07ce237410905c2b2f731686f5e (patch)
tree3572e365fcd1f579685266568699003dfc63ffa7 /perl-install/diskdrake
parent85ee1c68b47036934f2651ac87e3fc49b5293dad (diff)
downloaddrakx-f04cae4ca3dea07ce237410905c2b2f731686f5e.tar
drakx-f04cae4ca3dea07ce237410905c2b2f731686f5e.tar.gz
drakx-f04cae4ca3dea07ce237410905c2b2f731686f5e.tar.bz2
drakx-f04cae4ca3dea07ce237410905c2b2f731686f5e.tar.xz
drakx-f04cae4ca3dea07ce237410905c2b2f731686f5e.zip
handle vgreduce
Diffstat (limited to 'perl-install/diskdrake')
-rw-r--r--perl-install/diskdrake/interactive.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index dfb5c59fb..c98331449 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -885,8 +885,12 @@ sub RemoveFromLVM {
my ($_in, $_hd, $part, $all_hds) = @_;
isPartOfLVM($part) or die;
my ($lvm, $other_lvms) = partition { $_->{VG_name} eq $part->{lvm} } @{$all_hds->{lvms}};
- lvm::vg_destroy($lvm->[0]);
- $all_hds->{lvms} = $other_lvms;
+ if (@{$lvm->[0]{disks}} > 1) {
+ lvm::vg_reduce($lvm->[0], $part);
+ } else {
+ lvm::vg_destroy($lvm->[0]);
+ $all_hds->{lvms} = $other_lvms;
+ }
}
sub ModifyRAID {
my ($in, $_hd, $part, $all_hds) = @_;