summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-07-01 07:26:00 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-07-01 07:26:00 +0000
commitbf4bf09c58b06d9c3354d92bf4b66852cb0fecc3 (patch)
treea976658d3c02b5e2dfd0bcd28f3b2ebe8a2894c1 /perl-install/diskdrake
parent705af468108916bba0dd4fabbe6a03d79bfbbc4a (diff)
downloaddrakx-backup-do-not-use-bf4bf09c58b06d9c3354d92bf4b66852cb0fecc3.tar
drakx-backup-do-not-use-bf4bf09c58b06d9c3354d92bf4b66852cb0fecc3.tar.gz
drakx-backup-do-not-use-bf4bf09c58b06d9c3354d92bf4b66852cb0fecc3.tar.bz2
drakx-backup-do-not-use-bf4bf09c58b06d9c3354d92bf4b66852cb0fecc3.tar.xz
drakx-backup-do-not-use-bf4bf09c58b06d9c3354d92bf4b66852cb0fecc3.zip
- correctly compute the max size on a VG (bugzilla #16189)
- don't verifyParts on lvm
Diffstat (limited to 'perl-install/diskdrake')
-rw-r--r--perl-install/diskdrake/interactive.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index a9f9a25c7..df957ae56 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -700,7 +700,7 @@ sub Mount_point_raw_hd {
sub Resize {
my ($in, $hd, $part) = @_;
my (%nice_resize);
- my ($min, $max) = (min_partition_size($hd), partition_table::next_start($hd, $part) - $part->{start});
+ my ($min, $max) = (min_partition_size($hd), max_partition_size($hd, $part));
if (maybeFormatted($part)) {
# here we may have a non-formatted or a formatted partition
@@ -813,7 +813,7 @@ filesystem checks will be run on your next boot into Windows(TM)"));
set_isFormatted($part, 1);
} else {
set_isFormatted($part, 0);
- partition_table::verifyParts($hd);
+ partition_table::verifyParts($hd) if !isLVM($hd);
$part->{mntpoint} = '' if isNonMountable($part); #- mainly for ntfs, which we can not format
}
@@ -1273,6 +1273,14 @@ sub format_raw_hd_info {
#- logical partition.
sub min_partition_size { $_[0]->cylinder_size + 2*$_[0]{geom}{sectors} }
+sub max_partition_size {
+ my ($hd, $part) = @_;
+ if (isLVM($hd)) {
+ $part->{size} + fs::get::vg_free_space($hd);
+ } else {
+ partition_table::next_start($hd, $part) - $part->{start};
+ }
+}
sub choose_encrypt_key {
my ($in, $options) = @_;