Bug 948369

Summary: LVMError: lvresize failed for root: running lvm lvresize (anaconda custom partitioning 'reformat' a lvm root having changing the partition scheme to standard partition results in crash during installation)
Product: [Fedora] Fedora Reporter: Reartes Guillermo <rtguille>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 19CC: anaconda-maint-list, dshea, g.kaviyarasu, jonathan, mkolman, rtguille, sbueno, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-13 19:16:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
anaconda-tb-xxx file
none
anaconda.log
none
program.log
none
storage.log
none
screenshot #1
none
screenshot #2 none

Description Reartes Guillermo 2013-04-04 16:42:39 UTC
Created attachment 731670 [details]
anaconda-tb-xxx file

Description of problem:

When one installs over a previous F19a system installed with default automatic partitioning (lvm swap,/ + standard partition /boot), and one does custom partitioning having changed the scheme to 'standar partitions' this issue happens.

In screenshot #1, one can se that 'device type' is grayed out in LVM and cannot be changed. (I should delete the entry, i think, if i want a standar partition for /).

But if i just 'reformat' it (aka, still being LVM and not switching to Standard Parititon), anaconda then crashes at the start of the installation process.
 
If it do not change the Partition Scheme (leaving LVM) and doing the same steps, the issue does not happen.

Version-Release number of selected component (if applicable):
F19a TC4 (19.15)
 
How reproducible:
always

Steps to Reproduce:

0. Make sure the disk contains both LVM and a Standar Partition (previous default autopart:lvm F19a install)

1. Reach the Main Hub, leave defaults at the Welcome Screen

2. Set the Keyboard if needed (I used Spanish)

3. Leave default Software Selection (GNOME)

4. Enter Storage: Installation Destination

5. Select the disk (i have only one, sda)

6. In Installation Options Dialog, set the Partition Scheme to: Standard Partition

7. In Installation Options Dialog, enter Custom Partitioning

8. Expand the 'Fedora Linux 19...' (previous F19 installation)

9. '/boot' will be selected by default, check 'reformat' and set '/boot' as mount point and 'boot-fs' as Label. Update Settings.

10. Select 'Swap', check 'reformat' and set 'swap-fs' as Label. Update Settings.

11. Select 'Root', check 'reformat' and set '/' as mounbt point and 'root-fs' as Label. Update Settings.

12. Click 'Done' to return to the Main Hub

13. The Summary Of Changes will show that the previous LVM Root (/), will be a Standar Partition Root(/) now, since

i do changed the Partition Scheme. (But i did not change it manually, see screenshot, it is still shown as LVM).

14. Accept Changes, press 'Begin Installation' in the Main Hub.

15. Anaconda crashes 'Setting up the installation environment'

Actual results:
anaconda crashes at the start of the installation process, and touches the disk.


Additional info:

anaconda 19.15 exception report
Traceback (most recent call first):
  File "/usr/lib/python2.7/site-packages/blivet/devicelibs/lvm.py", line 374, in lvresize
    raise LVMError("lvresize failed for %s: %s" % (lv_name, msg))
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 2600, in resize
    lvm.lvresize(self.vg.name, self._name, self.size)
  File "/usr/lib/python2.7/site-packages/blivet/deviceaction.py", line 403, in execute
    self.device.resize()
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 241, in processActions
    action.execute()
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 298, in doIt
    self.devicetree.processActions()
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 157, in turnOnFilesystems
    storage.doIt()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/install.py", line 119, in doInstall
    turnOnFilesystems(storage, mountOnly=flags.flags.dirInstall)
  File "/usr/lib64/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 141, in run
    threading.Thread.run(self, *args, **kwargs)
LVMError: lvresize failed for root: running lvm lvresize --force -L 7512m --config  devices { filter=["r|/loop3$|","r|/loop4$|","r|/loop5$|","r|/loop6$|","r|/loop7$|"] }  fedora/root failed

Comment 1 Reartes Guillermo 2013-04-04 16:43:11 UTC
Created attachment 731672 [details]
anaconda.log

Comment 2 Reartes Guillermo 2013-04-04 16:43:31 UTC
Created attachment 731673 [details]
program.log

Comment 3 Reartes Guillermo 2013-04-04 16:43:51 UTC
Created attachment 731674 [details]
storage.log

Comment 4 Reartes Guillermo 2013-04-04 16:46:23 UTC
fdisk -l output: 

Disk /dev/sda: 10.5 GB, 10485760000 bytes, 20480000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000de112

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048    20479999     9726976   8e  Linux LVM

Disk /dev/mapper/live-rw: 1073 MB, 1073741824 bytes, 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

pvs output: 
  PV         VG     Fmt  Attr PSize PFree
  /dev/sda2  fedora lvm2 a--  9.27g    0 

vgs output:
  VG     #PV #LV #SN Attr   VSize VFree
  fedora   1   2   0 wz--n- 9.27g    0 

lvs output: 
  LV   VG     Attr      LSize Pool Origin Data%  Move Log Copy%  Convert
  root fedora -wi------ 7.34g                                           
  swap fedora -wi------ 1.94g

Comment 5 Reartes Guillermo 2013-04-04 16:46:55 UTC
Created attachment 731675 [details]
screenshot #1

Comment 6 Reartes Guillermo 2013-04-04 16:47:46 UTC
Created attachment 731676 [details]
screenshot #2

Comment 7 David Shea 2014-02-28 14:57:34 UTC
Does this still occur with F20 or rawhide? It looks like blivet tried to resize a lv to the same size it already was.

Comment 8 Red Hat Bugzilla 2023-09-14 01:43:09 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days