Mageia Bugzilla – Attachment 10931 Details for
Bug 22032
Resizing an encrypted XFS partition only resizes the LUKS container, not the XFS partition
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Proposed fix for second bug
0001-Fix-resizing-of-encrypted-partitions-mga-22032.patch (text/plain), 1.83 KB, created by
Martin Whitaker
on 2019-04-14 19:32:54 CEST
(
hide
)
Description:
Proposed fix for second bug
Filename:
MIME Type:
Creator:
Martin Whitaker
Created:
2019-04-14 19:32:54 CEST
Size:
1.83 KB
patch
obsolete
>From c4aa343d9e56569e756919a518f0970ef8ec450e Mon Sep 17 00:00:00 2001 >From: Martin Whitaker <mageia@martin-whitaker.me.uk> >Date: Sun, 14 Apr 2019 18:26:51 +0100 >Subject: [PATCH] Fix resizing of encrypted partitions (mga#22032) > >When performing a lossy resize, we must make sure luksOpen is called >*after* the partition table has been written and the kernel has been >informed of the new size. The simplest fix is to write the partition >table at the time the user requests the resize, as we already do for >a lossless resize. > >diff --git a/perl-install/NEWS b/perl-install/NEWS >index 0d5935000..fff4b3d3d 100644 >--- a/perl-install/NEWS >+++ b/perl-install/NEWS >@@ -1,3 +1,5 @@ >+- diskdrake: fix resize of encrypted partitions (mga#22032) >+ > Version 18.11 - 16 March 2019 > > - recognize new kernel 5.0 drivers >diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm >index 7521e8685..0b1ed6b44 100644 >--- a/perl-install/diskdrake/interactive.pm >+++ b/perl-install/diskdrake/interactive.pm >@@ -860,7 +860,7 @@ sub Resize { > partition_table::will_tell_kernel($hd, resize => $low_part); > partition_table::adjust_local_extended($hd, $low_part); > partition_table::adjust_main_extended($hd); >- write_partitions($in, $hd) or return if $write_partitions && %nice_resize; >+ write_partitions($in, $hd) or return if $write_partitions && (%nice_resize || isLUKS($part)); > if ($write_partitions && isLUKS($part)) { > require fs::dmcrypt; > fs::dmcrypt::open_part([], $low_part); >diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS >index 36f81f341..01fe86fa0 100644 >--- a/perl-install/install/NEWS >+++ b/perl-install/install/NEWS >@@ -1,3 +1,5 @@ >+- partitioning: fix resize of encrypted partitions (mga#22032) >+ > Version 18.12 - 16 March 2019 > > - don't preselect Nonfree 32bit media (mga#23927) >-- >2.21.0 >
From c4aa343d9e56569e756919a518f0970ef8ec450e Mon Sep 17 00:00:00 2001 From: Martin Whitaker <mageia@martin-whitaker.me.uk> Date: Sun, 14 Apr 2019 18:26:51 +0100 Subject: [PATCH] Fix resizing of encrypted partitions (mga#22032) When performing a lossy resize, we must make sure luksOpen is called *after* the partition table has been written and the kernel has been informed of the new size. The simplest fix is to write the partition table at the time the user requests the resize, as we already do for a lossless resize. diff --git a/perl-install/NEWS b/perl-install/NEWS index 0d5935000..fff4b3d3d 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,5 @@ +- diskdrake: fix resize of encrypted partitions (mga#22032) + Version 18.11 - 16 March 2019 - recognize new kernel 5.0 drivers diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index 7521e8685..0b1ed6b44 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -860,7 +860,7 @@ sub Resize { partition_table::will_tell_kernel($hd, resize => $low_part); partition_table::adjust_local_extended($hd, $low_part); partition_table::adjust_main_extended($hd); - write_partitions($in, $hd) or return if $write_partitions && %nice_resize; + write_partitions($in, $hd) or return if $write_partitions && (%nice_resize || isLUKS($part)); if ($write_partitions && isLUKS($part)) { require fs::dmcrypt; fs::dmcrypt::open_part([], $low_part); diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 36f81f341..01fe86fa0 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,5 @@ +- partitioning: fix resize of encrypted partitions (mga#22032) + Version 18.12 - 16 March 2019 - don't preselect Nonfree 32bit media (mga#23927) -- 2.21.0
View Attachment As Raw
Actions:
View
Attachments on
bug 22032
:
9793
|
9804
|
10926
|
10927
|
10928
|
10929
| 10931