diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-02-17 15:52:49 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-03-18 17:15:01 +0100 |
commit | 1706d84b42c2c5f19556c218aea3729352738e93 (patch) | |
tree | 2dd7539e104574e2467a5330c61104f38a533b0a /perl-install/diskdrake | |
parent | bf84edcafe11e4e1a9bf41bfb82522a4d78c785e (diff) | |
download | drakx-1706d84b42c2c5f19556c218aea3729352738e93.tar drakx-1706d84b42c2c5f19556c218aea3729352738e93.tar.gz drakx-1706d84b42c2c5f19556c218aea3729352738e93.tar.bz2 drakx-1706d84b42c2c5f19556c218aea3729352738e93.tar.xz drakx-1706d84b42c2c5f19556c218aea3729352738e93.zip |
actually enable to resize NILFS2
bit of support was there but code could not be reached
also actually include nilfs-resize for resizing NILFS2
It's only supported online:
"This command is valid only for mounted NILFS2 file systems, and
will fail if the device has no active mounts."
Note that ext3/4 could use the same path but only for growing.
XFS could also share that path...
Diffstat (limited to 'perl-install/diskdrake')
-rw-r--r-- | perl-install/diskdrake/interactive.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index 511a2660b..8cc82d099 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -397,7 +397,7 @@ sub Hd_info { sub is_LVM_resizable { my ($part) = @_; - member($part->{fs_type}, qw(btrfs ext3 ext4 reiserfs xfs)); + member($part->{fs_type}, qw(btrfs ext3 ext4 nilfs2 reiserfs xfs)); } sub part_possible_actions { my ($_in, $hd, $part, $all_hds) = @_; @@ -829,10 +829,12 @@ sub Resize { } elsif ($part->{fs_type} eq 'xfs' && isLVM($hd) && $::isStandalone && $part->{isMounted}) { $min = $part->{size}; #- ensure the user can only increase $nice_resize{xfs} = 1; - } elsif ($part->{fs_type} eq 'btrfs') { + } elsif (member($part->{fs_type}, qw(btrfs nilfs2))) { $online_resize = $part->{fs_type}; } + # Btrf & nilfs 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; $nice_resize{$online_resize} = 1; @@ -920,6 +922,8 @@ filesystem checks will be run on your next boot into Microsoft Windows®")); my @cmd; if ($nice_resize{btrfs}) { @cmd = (qw(btrfs filesystem resize), $part->{size}*512, $dir); + } elsif ($nice_resize{nilfs2}) { + @cmd = ('nilfs-resize', devices::make($part->{device}), $part->{size}*512); } if (!run_program::run(@cmd)) { $nice_resize{$part->{fs_type}} = undef; @@ -931,8 +935,6 @@ filesystem checks will be run on your next boot into Microsoft Windows®")); } } elsif ($nice_resize{f2fs}) { run_program::run_or_die("resize.f2fs", devices::make($part->{device})); - } elsif ($nice_resize{nilfs}) { - run_program::run_or_die("nilfs-resize", devices::make($part->{device})); } if (%nice_resize) { |