summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-07-01 08:00:58 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-07-01 08:00:58 +0000
commit1d92ae482c1537a946ef2f15edea636397b095f0 (patch)
tree508d7d2a6a23f04d369e335d50bf0431ba5d5f5e /perl-install/diskdrake
parent72d5805da9b30a8066d865b2a6ea9a0f6dd2500c (diff)
downloaddrakx-backup-do-not-use-1d92ae482c1537a946ef2f15edea636397b095f0.tar
drakx-backup-do-not-use-1d92ae482c1537a946ef2f15edea636397b095f0.tar.gz
drakx-backup-do-not-use-1d92ae482c1537a946ef2f15edea636397b095f0.tar.bz2
drakx-backup-do-not-use-1d92ae482c1537a946ef2f15edea636397b095f0.tar.xz
drakx-backup-do-not-use-1d92ae482c1537a946ef2f15edea636397b095f0.zip
handle pvmove
Diffstat (limited to 'perl-install/diskdrake')
-rw-r--r--perl-install/diskdrake/interactive.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index dcccc1c97..285b74d30 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -882,10 +882,17 @@ sub RemoveFromRAID {
raid::removeDisk($all_hds->{raids}, $part);
}
sub RemoveFromLVM {
- my ($_in, $_hd, $part, $all_hds) = @_;
+ my ($in, $_hd, $part, $all_hds) = @_;
isPartOfLVM($part) or die;
my ($lvm, $other_lvms) = partition { $_->{VG_name} eq $part->{lvm} } @{$all_hds->{lvms}};
if (@{$lvm->[0]{disks}} > 1) {
+ my ($used, $_total) = lvm::pv_physical_extents($part);
+ if ($used) {
+ $in->ask_yesorno('', N("Physical volume %s is still in use.
+Do you want to move used physical extents on this volume to other volumes?", $part->{device})) or return;
+ my $_w = $in->wait_message('', N("Moving physical extents"));
+ lvm::pv_move($part);
+ }
lvm::vg_reduce($lvm->[0], $part);
} else {
lvm::vg_destroy($lvm->[0]);