summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake/interactive.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-03-18 14:10:36 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-03-18 17:15:53 +0100
commit2f15a5ce1550c9388b157db2a6ded12590e6aa6e (patch)
tree9c3b12628f4a9c5807de7eff7a1a78cdba3e3eed /perl-install/diskdrake/interactive.pm
parentf954b3ee3754cafc4ef0d0d8d55eb181e6b66aaa (diff)
downloaddrakx-2f15a5ce1550c9388b157db2a6ded12590e6aa6e.tar
drakx-2f15a5ce1550c9388b157db2a6ded12590e6aa6e.tar.gz
drakx-2f15a5ce1550c9388b157db2a6ded12590e6aa6e.tar.bz2
drakx-2f15a5ce1550c9388b157db2a6ded12590e6aa6e.tar.xz
drakx-2f15a5ce1550c9388b157db2a6ded12590e6aa6e.zip
enable to resize XFS even if not on LVM
Diffstat (limited to 'perl-install/diskdrake/interactive.pm')
-rw-r--r--perl-install/diskdrake/interactive.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index 8cc82d099..1131ba95f 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -826,14 +826,14 @@ sub Resize {
} else {
_set_min_size_from_avail_space($part, \$min);
}
- } elsif ($part->{fs_type} eq 'xfs' && isLVM($hd) && $::isStandalone && $part->{isMounted}) {
+ } elsif ($part->{fs_type} eq 'xfs') {
$min = $part->{size}; #- ensure the user can only increase
- $nice_resize{xfs} = 1;
+ $online_resize = $part->{fs_type};
} elsif (member($part->{fs_type}, qw(btrfs nilfs2))) {
$online_resize = $part->{fs_type};
}
- # Btrf & nilfs only support online resizing
+ # Btrf, nilfs2 && XFS only support online resizing
# (Ext3/4 too but we can resize it offline so we don't care - though growing online is interesting)
if ($online_resize) {
write_partitions($in, $hd) or return;
@@ -914,9 +914,6 @@ filesystem checks will be run on your next boot into Microsoft Windows®"));
} elsif ($nice_resize{reiserfs}) {
log::l("reiser resize to $part->{size} sectors");
run_program::run_or_die('resize_reiserfs', '-f', '-q', '-s' . int($part->{size}/2) . 'K', devices::make($part->{device}));
- } elsif ($nice_resize{xfs}) {
- #- happens only with mounted LVM, see above
- run_program::run_or_die("xfs_growfs", $part->{mntpoint});
} elsif ($online_resize) {
my $dir = _get_dir_for_online_resize($part);
my @cmd;
@@ -924,6 +921,8 @@ filesystem checks will be run on your next boot into Microsoft Windows®"));
@cmd = (qw(btrfs filesystem resize), $part->{size}*512, $dir);
} elsif ($nice_resize{nilfs2}) {
@cmd = ('nilfs-resize', devices::make($part->{device}), $part->{size}*512);
+ } elsif ($nice_resize{xfs}) {
+ @cmd = ("xfs_growfs", $dir);
}
if (!run_program::run(@cmd)) {
$nice_resize{$part->{fs_type}} = undef;