Bug 1027947 - Cannot change a logical volume's size, then return it to the original size
Summary: Cannot change a logical volume's size, then return it to the original size
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 20
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Lehman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:611cdb9be933cf4c49780484ed7...
Depends On:
Blocks: F20FinalBlocker 1029630
TreeView+ depends on / blocked
 
Reported: 2013-11-07 13:32 UTC by Jan Sedlák
Modified: 2013-12-11 12:55 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1029630 (view as bug list)
Environment:
Last Closed: 2013-12-11 12:55:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: anaconda-tb (741.91 KB, text/plain)
2013-11-07 13:32 UTC, Jan Sedlák
no flags Details
File: anaconda.log (71.56 KB, text/plain)
2013-11-07 13:32 UTC, Jan Sedlák
no flags Details
File: environ (404 bytes, text/plain)
2013-11-07 13:32 UTC, Jan Sedlák
no flags Details
File: lsblk_output (1.44 KB, text/plain)
2013-11-07 13:32 UTC, Jan Sedlák
no flags Details
File: nmcli_dev_list (4.27 KB, text/plain)
2013-11-07 13:32 UTC, Jan Sedlák
no flags Details
File: os_info (291 bytes, text/plain)
2013-11-07 13:32 UTC, Jan Sedlák
no flags Details
File: program.log (32.13 KB, text/plain)
2013-11-07 13:32 UTC, Jan Sedlák
no flags Details
File: storage.log (86.16 KB, text/plain)
2013-11-07 13:32 UTC, Jan Sedlák
no flags Details
File: syslog (66.58 KB, text/plain)
2013-11-07 13:32 UTC, Jan Sedlák
no flags Details
File: ifcfg.log (650 bytes, text/plain)
2013-11-07 13:32 UTC, Jan Sedlák
no flags Details
File: packaging.log (430.45 KB, text/plain)
2013-11-07 13:32 UTC, Jan Sedlák
no flags Details
anaconda.log (updates-1121.0.img) (94.61 KB, text/plain)
2013-11-25 12:48 UTC, Kamil Páral
no flags Details
program.log (updates-1121.0.img) (23.19 KB, text/plain)
2013-11-25 12:49 UTC, Kamil Páral
no flags Details
storage.log (updates-1121.0.img) (90.38 KB, text/plain)
2013-11-25 12:49 UTC, Kamil Páral
no flags Details
bug demonstration video for LVM (871.40 KB, video/ogg)
2013-12-09 10:28 UTC, Kamil Páral
no flags Details
logs for standard partitions problem - comment 38 and 39 (42.21 KB, application/x-7z-compressed)
2013-12-09 19:29 UTC, Kamil Páral
no flags Details
logs for lvm problem - comment 40 (44.48 KB, application/x-7z-compressed)
2013-12-09 19:29 UTC, Kamil Páral
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1008732 0 unspecified CLOSED LUKSError: luks device not configured 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1026466 0 unspecified CLOSED blivet shows existing LVs as not taking up any space in the VG 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1027682 0 unspecified CLOSED DeviceError: ('Cannot destroy non-leaf device', 'fedora_dhcp-29-193-root') 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1027714 0 unspecified CLOSED Re-using LVM partitions makes them non-resizable in certain cases 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1039503 0 unspecified CLOSED FSError: filesystem has not been created 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1040352 0 unspecified CLOSED Custom partitioning: cannot change a standard partition's size, then return it to the original size 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1040413 0 unspecified CLOSED Cannot change a logical volume's size twice, then return it to the original size 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1040422 0 unspecified CLOSED Standard partitions can't be enlarged 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1040438 0 unspecified CLOSED LV partitions can't be enlarged 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1040445 0 unspecified CLOSED resize attempts ignored for LVs already scheduled for reformat 2021-02-22 00:41:40 UTC


Description Jan Sedlák 2013-11-07 13:32:05 UTC
Description of problem:
I had old LVM partition scheme on my disk. I have resized old root partition to some big number (130 GB on my 20 GB disk), accepted changes (ran without problem), and then tried to resize it back to old value and this showed up.

Version-Release number of selected component:
anaconda-20.25.6-1

The following was filed automatically by anaconda:
anaconda 20.25.6-1 exception report
Traceback (most recent call first):
  File "/usr/lib/python2.7/site-packages/blivet/deviceaction.py", line 581, in __init__
    raise ValueError("new size same as old size")
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 1250, in resizeDevice
    self.devicetree.registerAction(action_class(device, new_size))
  File "/usr/lib/python2.7/site-packages/pyanaconda/ui/gui/spokes/custom.py", line 1454, in _save_right_side
    self.__storage.resizeDevice(device, size)
  File "/usr/lib/python2.7/site-packages/pyanaconda/ui/gui/spokes/custom.py", line 2802, in on_apply_clicked
    self._save_right_side(self._current_selector)
ValueError: new size same as old size

Additional info:
cmdline:        /usr/bin/python  /sbin/anaconda
cmdline_file:   initrd=initrd.img inst.stage2=hd:LABEL=Fedora\x2020-Beta\x20i386 rd.live.check quiet BOOT_IMAGE=vmlinuz 
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         3.11.6-301.fc20.i686
product:        Fedora
release:        Cannot get release name.
type:           anaconda
version:        20-Beta

Potential duplicate: bug 868698

Comment 1 Jan Sedlák 2013-11-07 13:32:13 UTC
Created attachment 821104 [details]
File: anaconda-tb

Comment 2 Jan Sedlák 2013-11-07 13:32:18 UTC
Created attachment 821105 [details]
File: anaconda.log

Comment 3 Jan Sedlák 2013-11-07 13:32:24 UTC
Created attachment 821106 [details]
File: environ

Comment 4 Jan Sedlák 2013-11-07 13:32:28 UTC
Created attachment 821107 [details]
File: lsblk_output

Comment 5 Jan Sedlák 2013-11-07 13:32:32 UTC
Created attachment 821108 [details]
File: nmcli_dev_list

Comment 6 Jan Sedlák 2013-11-07 13:32:36 UTC
Created attachment 821109 [details]
File: os_info

Comment 7 Jan Sedlák 2013-11-07 13:32:40 UTC
Created attachment 821110 [details]
File: program.log

Comment 8 Jan Sedlák 2013-11-07 13:32:44 UTC
Created attachment 821111 [details]
File: storage.log

Comment 9 Jan Sedlák 2013-11-07 13:32:48 UTC
Created attachment 821112 [details]
File: syslog

Comment 10 Jan Sedlák 2013-11-07 13:32:51 UTC
Created attachment 821113 [details]
File: ifcfg.log

Comment 11 Jan Sedlák 2013-11-07 13:32:57 UTC
Created attachment 821114 [details]
File: packaging.log

Comment 12 Jan Sedlák 2013-11-07 13:34:11 UTC
I am using Fedora F20 Beta RC5.

Comment 13 Kamil Páral 2013-11-07 13:38:17 UTC
This fails:
" Reject or disallow invalid disk and volume configurations without crashing. "
https://fedoraproject.org/wiki/Fedora_20_Beta_Release_Criteria#Custom_partitioning

Anaconda should not allow to create a partition larger than disk and then crash.

Comment 14 Jan Sedlák 2013-11-07 13:54:20 UTC
Steps to reproduce:

1. Install Fedora using default LVM partition scheme.
2. Boot F20 anaconda installer.
3. Choose custom partitioning.
4. Resize existing root partition to bigger size than your disk have (130 GB) and click "update settings". It shows that root will have 130 GB.
5. Resize your root partition back to old size.

Comment 15 Mike Ruckman 2013-11-07 18:14:45 UTC
Discussed in the 2013-11-07 Go/No-Go meeting [1]. Voted as a RejectedBlocker. While unfortunate, this is a resize issue at heart and that is not covered by the F20 beta release criteria and thus, is rejected as a release blocking issue for fedora 20 beta. Please re-propose as a F20 final blocker and mark for inclusion in CommonBugs

[1] http://meetbot.fedoraproject.org/meetbot/meetbot/fedora-meeting-2/2013-11-07/

Comment 16 Fedora Blocker Bugs Application 2013-11-08 09:59:57 UTC
Proposed as a Blocker for 20-final by Fedora user jsedlak using the blocker tracking app because:

 Any installer mechanism for resizing storage volumes must correctly attempt the requested operation.

Comment 17 Adam Williamson 2013-11-13 17:52:47 UTC
Discussed at 2013-11-13 blocker review meeting - http://meetbot.fedoraproject.org/fedora-blocker-review/2013-11-13/f20-final-blocker-review-1.2013-11-13-17.01.log.txt . Accepted as a blocker per criterion "The installer must be able to create and install to any workable partition layout using any file system and/or container format combination offered in a default installer configuration." - it may instead be "Any installer mechanism for resizing storage volumes must correctly attempt the requested operation." or "Custom partitioning: Reject or disallow invalid disk and volume configurations without crashing." depending on the exact cause of the crash, but we're solidly agreed that it ought to be a blocker.

Comment 18 Fedora Update System 2013-11-16 02:12:41 UTC
anaconda-20.25.8-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/anaconda-20.25.8-1.fc20

Comment 19 Fedora Update System 2013-11-17 07:04:08 UTC
Package anaconda-20.25.8-1.fc20, pykickstart-1.99.46-1.fc20, python-blivet-0.23.5-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-20.25.8-1.fc20 pykickstart-1.99.46-1.fc20 python-blivet-0.23.5-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-21553/pykickstart-1.99.46-1.fc20,python-blivet-0.23.5-1.fc20,anaconda-20.25.8-1.fc20
then log in and leave karma (feedback).

Comment 20 Jan Sedlák 2013-11-20 09:49:36 UTC
It still doesn't work. If you try to resize existing partition to lower value and back (for example 13 GB -> 1 GB (update settings) -> 13 GB (update settings)), it shows the same traceback.

Comment 21 Adam Williamson 2013-11-20 16:48:20 UTC
jan: how did you test? the new anaconda is not in any build yet (it will be in TC2 when that lands).

Comment 22 Adam Williamson 2013-11-20 19:36:42 UTC
Status reviewed at 2013-11-20 blocker review meeting: http://meetbot.fedoraproject.org/fedora-blocker-review/2013-11-20/f20-blocker-review.2013-11-20-17.00.log.txt . We'd like to double-check with Jan that he actually tested 20.25.8 (e.g. by updating it on a live image), and didn't assume that it was present in TC1 or anything.

Comment 23 David Lehman 2013-11-20 19:38:29 UTC
This is not fixed, but the fix is fairly simple.

Comment 24 Adam Williamson 2013-11-20 20:27:14 UTC
Best ask bcl to edit the update and mark it as not fixing this bug any more, then, or else Bodhi will continue to update the status and eventually close it.

Comment 25 Jan Sedlák 2013-11-21 10:35:50 UTC
(In reply to Adam Williamson from comment #21)
> jan: how did you test? the new anaconda is not in any build yet (it will be
> in TC2 when that lands).

Booted F20 TC1 Live and updated anaconda to 20.25.8-1 via yum.

Comment 26 David Lehman 2013-11-21 15:23:06 UTC
Updates image available for testing (against 20-TC2):

  http://dlehman.fedorapeople.org/updates/updates-1121.0.img

It should handle setting the size back to its original value by cancelling all scheduled resize actions on the device.

Comment 27 Fedora Update System 2013-11-24 04:00:04 UTC
pykickstart-1.99.46-1.fc20, python-blivet-0.23.5-1.fc20, anaconda-20.25.9-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 28 Kamil Páral 2013-11-25 12:47:58 UTC
(In reply to David Lehman from comment #26)
> Updates image available for testing (against 20-TC2):
> 
>   http://dlehman.fedorapeople.org/updates/updates-1121.0.img
> 
> It should handle setting the size back to its original value by cancelling
> all scheduled resize actions on the device.

David, this is still not correct. Anaconda no longer crashes, but it is impossible to set the partition back to its original value.

Reproducer:
1. Go to custom part, click on existing root partition (6 GB).
2. Change size to 7 GB, click Update, see it updated correctly.
3. Change size to 6 GB, click Update, see the number reverted to 7 GB.
4. Change size to 5 GB, click Update, see it updated correctly.
5. Change size to 6 GB, click Update, see the number reverted to 5 GB.

Comment 29 Kamil Páral 2013-11-25 12:48:57 UTC
Created attachment 828645 [details]
anaconda.log (updates-1121.0.img)

Comment 30 Kamil Páral 2013-11-25 12:49:07 UTC
Created attachment 828646 [details]
program.log (updates-1121.0.img)

Comment 31 Kamil Páral 2013-11-25 12:49:16 UTC
Created attachment 828647 [details]
storage.log (updates-1121.0.img)

Comment 32 Jan Sedlák 2013-11-27 09:45:55 UTC
Still present in F20 TC3.

Comment 33 Dan Mossor [danofsatx] 2013-12-04 18:24:25 UTC
Confirmed fixed in TC4.

Comment 34 Kamil Páral 2013-12-04 18:29:53 UTC
(In reply to Dan Mossor from comment #33)
> Confirmed fixed in TC4.

No, comment 28 still applies and crashes anaconda.

Comment 35 Fedora Update System 2013-12-05 01:12:20 UTC
anaconda-20.25.14-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/anaconda-20.25.14-1.fc20

Comment 36 Fedora Update System 2013-12-05 21:24:47 UTC
Package anaconda-20.25.14-1.fc20, python-blivet-0.23.8-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-20.25.14-1.fc20 python-blivet-0.23.8-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-22800/python-blivet-0.23.8-1.fc20,anaconda-20.25.14-1.fc20
then log in and leave karma (feedback).

Comment 37 Jan Sedlák 2013-12-06 12:14:07 UTC
I have tested it with TC5 and it seems to work now. Verified.

Comment 38 Kamil Páral 2013-12-09 10:06:02 UTC
No, this is still broken as per comment 28 - standard partitions, the same steps apply. Furthermore, I received a crash (bug 1039503) when I tried to reproduce this.

Comment 39 Kamil Páral 2013-12-09 10:16:50 UTC
Please see attachment 834296 [details] to see a video of the problem.

Comment 40 Kamil Páral 2013-12-09 10:28:21 UTC
Created attachment 834297 [details]
bug demonstration video for LVM

This is the video of the same performed with LVM.

To summarize:

Standard partitions:
1. Can resize up and down, but can't go back to original size.
2. Once mounted, can resize up but can't downsize (neither revert).

LVMs:
1. Can resize down (and revert, even to original size), but can't resize up.
2. Once mounted, can't resize at all.

I can create separate bug reports for selected problems, if you wish.

Comment 41 Kamil Páral 2013-12-09 19:29:28 UTC
Created attachment 834484 [details]
logs for standard partitions problem - comment 38 and 39

Attaching logs for failed use cases (comment 38 - 40).

I wanted to split the report into separate cases, but bugzilla is broken today and I can't create new bugs. I also don't want to spam it here with a dozen new attachments. So I decided the attach the logs compressed, hope you don't mind.

Comment 42 Kamil Páral 2013-12-09 19:29:56 UTC
Created attachment 834488 [details]
logs for lvm problem - comment 40

Comment 43 Fedora Update System 2013-12-10 06:53:31 UTC
anaconda-20.25.14-1.fc20, python-blivet-0.23.8-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 44 Adam Williamson 2013-12-10 20:17:20 UTC
So this is getting confused due to the bugzilla problems, and I still can't file a new bug right now. But to focus on the initial report, dlehman has just told me he thought the initial problem was fixed, but I and kparal assert that it is not. I have reproduced it as in kparal's video. To reproduce:

1. Boot F20 Final TC5 on a system with an existing storage volume (at least ext4 and LVM VG are affected).
2. Go to custom partitioning (with the disk with that volume on selected, obviously).
3. Find the existing storage volume and change 'Desired Capacity' to something else. Hit 'Update Settings'.
4. Change 'Desired Capacity' back to its original value. Hit 'Update Settings' again.

This will cause the value to show as the changed value you set in step 3, not the original value you set back in step 4. I have just reproduced this with F20 Final TC5, using a disk containing an existing F20 install with a 500MB ext4 /boot partition. Changing the value to 450 MB, hitting 'Update Settings", then changing it back to 500 MB and hitting 'Update Settings' again leaves the field reading '450 MB'. There is no reproducible crasher that I can see.

The other issues kparal found with it not being possible to grow/shrink volumes after assigning a mount point should be considered separate issues we will report separately when we can.

Comment 45 Adam Williamson 2013-12-10 20:55:24 UTC
Step 1 in c#44 was incorrect in an important way: turns out LVM is not affected, that's the original case that was reported and fixed.

I believe dlehman and I now agree that we're tracking four separate current issues here. weird numbering to match the numbers we started using in IRC, so we don't confuse ourselves.

0) regular filesystems are still broken as per the 'original' bug here: changing the size of an ext4 partition, then changing it back to the original size, does not work correctly.

1) multiple resize actions followed by resetting to original size resets size to the second-to-last size instead of the initial size.

2) scheduling reformat of lv scheduled for resize causes a crash.

3) resize attempts ignored for lvs already scheduled for reformat.

ideally we'd have separate reports for each of these, but BZ is not playing ball. Until it is, let's try and track things with those numbers.

dlehman and I agree that 0) and 2) are the most important to work on and consider as blockers. We think 1) and 3) are probably FE/F21 stuff rather than F20 blockers. If anyone strongly thinks 1) and/or 3) ought to be considered a blocker, please do reply with justification, but let's try to keep things as clear as we possibly can until we're able to separate the reports, so please be very clear which issue you're talking about at any given time.

Comment 46 Kamil Páral 2013-12-11 12:55:05 UTC
Bugzilla works again, so I created the following bug reports to separate the issues found here. Here we go:
https://bugzilla.redhat.com/show_bug.cgi?id=1040352
https://bugzilla.redhat.com/show_bug.cgi?id=1040413
https://bugzilla.redhat.com/show_bug.cgi?id=1040422
https://bugzilla.redhat.com/show_bug.cgi?id=1040438
https://bugzilla.redhat.com/show_bug.cgi?id=1040445

I proposed all of them for FinalBlocker discussion, so that we can collectively decide which ones are important. Developers feedback will certain be important.

I'm closing this one, because the original crash has been fixed.

(In reply to Adam Williamson from comment #45)
> 2) scheduling reformat of lv scheduled for resize causes a crash.

I couldn't reproduce this one. If you know how, please report a separate bug and link it here, thanks.


Note You need to log in before you can comment on or make changes to this bug.