Bug 533350

Summary: Resizing encrypted devices is unsupported
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: python-blivetAssignee: Blivet Maintenance Team <blivet-maint-list>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: amulhern, anaconda-maint-list, awilliam, ddumas, dlehman, srevivo, vanmeeuwen+fedora, vtrefny
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 538445 (view as bug list) Environment:
Last Closed: 2020-04-15 12:18:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 538445    
Attachments:
Description Flags
my layout
none
trying to shrink partition
none
using custom resize none

Description Kamil Páral 2009-11-06 10:33:30 UTC
Created attachment 367805 [details]
my layout

Description of problem:
I have two partitions:
200MB /dev/vda1 as /boot, unencrypted
8GB /dev/vda2 as /, encrypted with dm-crypt and LUKS

Selecting "Shrink current system" in partitioning dialog allows me to shrink only the 200MB partition, not the 8GB one. I have provided a password to the encrypted partition at the start of the install, so it should be accessible.

Using "Custom layout" also does not allow me to resize my encrypted partition, I can't change the predefined number 0.

Version-Release number of selected component (if applicable):
anaconda 12.44

How reproducible:
always

Comment 1 Kamil Páral 2009-11-06 10:33:58 UTC
Created attachment 367806 [details]
trying to shrink partition

Comment 2 Kamil Páral 2009-11-06 10:34:21 UTC
Created attachment 367807 [details]
using custom resize

Comment 3 James Laska 2009-11-06 17:56:44 UTC
Kamil ... how reproducable is this issue?  Can you also attach /tmp/*log* when the problem occurs?

Comment 4 Adam Williamson 2009-11-06 18:10:36 UTC
this was discussed at the blocker meeting today. we generally agreed that we
don't have a sufficiently solid base of shrink code to expect all shrink
operations to work, so we won't generally take shrink failures as blockers.

however, if this causes any pre-existing data to be lost, corrupted or
otherwise damaged, that could be a blocker. can you please test whether the
failure causes any adverse effects for the existing data? or does the shrink
just fail without actually touching the existing data in any way? thanks.

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 5 Kamil Páral 2009-11-09 12:48:26 UTC
This bugreport simply states, that resizing encrypted partitions (not inside LVM) is not possible. There was no data loss, because there was no process executed. The GUI simply does not offer any possibility to do that. Wizard offers you only resizing of boot partition (of course useless) and custom partition dialog does not allow you to specify any number except zero to the particular field (didn't try to accept zero size). So surely there were no data loss and it is then probably not a blocker.

I don't think there is anything interesting in the logs, but I can recreate the layout if required. Maybe this should be seen more as a feature request. Currently you must resize encrypted partitions manually before install, because anaconda can't do it.

Comment 6 Chris Lumens 2009-11-10 14:27:35 UTC
How do you resize an encrypted partition?

Comment 7 Kamil Páral 2009-11-10 15:43:36 UTC
You mean by hand? I have googled up some guides and they worked :) Usually the guides describe resizing combination of dm-crypt and LVM and it's quite complicated. For the simple case of just dm-crypt (this case), I believe it is enough to:
1. if you want to enlarge partition, first enlarge dm-crypt area by "cryptsetup resize", then grow the partition, then grow the filesystem
2. if you want to shrink partition, first shrink filesystem, then shrink partition and then (maybe optionally) shrink dm-crypt are by "cryptsetup resize".

But I don't guarantee the exact approach. I believe I have seen some howto on the very site belonging to dm-crypt, but I can't find the link now.

Comment 8 Bug Zapper 2009-11-16 15:12:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 9 Adam Williamson 2009-11-17 07:12:15 UTC
I don't really see that this is a 'common bugs' issue. I mean, nothing breaks, the installer really behaves as it should - it can't shrink encrypted partitions, so it doesn't offer to. If this needs to be documented anywhere, it's in the installation guide, not common bugs. Dropping from common bugs list.

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 10 Hans de Goede 2009-11-17 13:31:58 UTC
dlehman, as this is about dmcrypt I'm going to assign this to you, feel free
to punt it over to David as it is about resizing, or to declare this something we don't want to support.

Comment 11 Denise Dumas 2009-11-17 14:15:48 UTC
Release note flag is set because we need to fix documentation - see comment 9

Comment 13 Ryan Lerch 2009-11-18 00:34:29 UTC
As per Comment #9,  Removed the "Requires Release Notes" flag,
and triaged this one to the install-guide.

cheers,
ryanlerch

Comment 14 Adam Williamson 2009-11-18 03:00:14 UTC
um, that wasn't really desireable, the anaconda team did seem to want to keep this open and assigned to them as a feature request. we simply want the fact that this feature isn't implemented yet mentioned in the install guide _as well_.

Comment 15 eric 2009-11-18 16:01:17 UTC
Back to anaconda and I'll clone this ticket for the User Guide.

Comment 16 Bug Zapper 2010-11-04 06:46:29 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 17 Kamil Páral 2010-11-04 10:25:33 UTC
Still the same with anaconda-14.22.

Comment 18 Karsten Wade 2011-12-14 03:47:11 UTC
Removing myself for these bug components as I'm either no longer involved in that aspect of the project, or no longer care to watch this particular bug. Sorry if you are caught in a maelstrom of bug changes as a result!

Comment 19 Fedora Admin XMLRPC Client 2015-09-28 20:25:05 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 20 Vojtech Trefny 2020-04-15 12:18:30 UTC
Support for resizing of LUKS devices has been added in Blivet 2.0 -- https://github.com/storaged-project/blivet/blob/3.2-devel/release_notes.rst#luks-resize