Bug 1093144

Summary: RHEL7 RC1/anaconda not working with multiple volumes
Product: Red Hat Enterprise Linux 7 Reporter: John Margaritsanakis <john>
Component: python-blivetAssignee: Vratislav Podzimek <vpodzime>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: amulhern, bloch, cmc, dkochuka, fang64, john, jstodola, marcus, mikolaj, nicolas, pasteur, perry_yuan, pjanda, tugov
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: python-blivet-0.61.0.2-1 Doc Type: Bug Fix
Doc Text:
Cause: When installing to a LVM on top of a RAID using a kickstart with --grow it was not taking into account the amount of extra space reserved for metadata. Consequence: Not enought space would result in an error. Fix: Take into account the extra space when growing a LV. Result: Successful installation.
Story Points: ---
Clone Of:
: 1131609 (view as bug list) Environment:
Last Closed: 2015-03-05 14:06:53 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:
Bug Depends On:    
Bug Blocks: 1113519, 1131609    
Attachments:
Description Flags
The file you requested.
none
Log from my kickstart attempt. none

Description John Margaritsanakis 2014-04-30 17:41:16 UTC
Description of problem:

In RHEL7 beta I installed VMs with more than one drive using anaconda. When I do the same thing (the exact same anaconda configuration) but in RHEL7 RC1 it produces this:

ValueError: not enough free space in volume group

This seems to be regardless of the --size argument used. I gave it volume files as large as 50 GB and passed --size=12000, --size=1, --size=20000... nothing worked for RC1.

The anaconda file (well, the partition information segment) is this:

#----------------
zerombr
clearpart --all --initlabel --drives=sda,sdb

part raid.11 --size=500 --ondrive=sda
part raid.12 --size=1 --grow --ondrive=sda

part raid.21 --size=500 --ondrive=sdb
part raid.22 --size=12000 --grow --ondrive=sdb

raid /boot --fstype ext4 --device md1 --level=RAID1 raid.11 raid.21
raid pv.01 --device md0 --level=RAID1 raid.12 raid.22

volgroup sysvg pv.01
logvol / --vgname=sysvg --size=8000 --name=lv_root --fstype=ext4
logvol swap --vgname=sysvg --name=lv_swap --grow --size=1024 --maxsize=2048
logvol /mnt/edata --vgname=sysvg --size=1 --grow --name=mntedata
#----------------

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

RHEL rc1

How reproducible:

Trying to install RHEL7 rc1 VMs using anaconda/qemu with two volumes rather than one (the latter worked fine for me). 

Please note again that the exact same configuration works fine for RHEL7 beta, I just tested it. Everything is the same - host, kickstart, IP, image file sizes, etc.

Steps to Reproduce:
1. Use two image files in kickstart rather than one as above.
2. Try to install
3. Get error message

Actual results:

ValueError: not enough free space in volume group

Expected results:

RHEL7 rc1 installs with two volumes.

Additional info:

Comment 2 Chris Lumens 2014-04-30 19:10:48 UTC
For starters, please don't use "--size=1 --grow" in your raid.12 line.  You should specify a size at least large enough to hold what you're going to put into it later.  Same with the /mnt/edata logvol, though that's less critical.  Using this really just confuses anaconda and makes things harder than it needs to be.

Comment 3 John Margaritsanakis 2014-04-30 20:41:53 UTC
Fair enough. As I said, I tried more than one value (and pairs of values) for --size=X. This is just a snapshot of where it was by the end of my tests with rc1 and right after I tried el7 beta again.

Speaking of which, please bear in mind that the configuration above worked for el7 beta.

Comment 4 John Margaritsanakis 2014-05-01 18:18:17 UTC
In order to test this I just edited my anaconda file and tried an installation again using rhel7 rc1.

#--- This is the partition info
zerombr
clearpart --all --initlabel --drives=sda,sdb

part raid.11 --size=500 --ondrive=sda
part raid.12 --size=12000 --grow --ondrive=sda

part raid.21 --size=500 --ondrive=sdb
part raid.22 --size=12000 --grow --ondrive=sdb

raid /boot --fstype ext4 --device md1 --level=RAID1 raid.11 raid.21
raid pv.01 --device md0 --level=RAID1 raid.12 raid.22

volgroup sysvg pv.01
logvol / --vgname=sysvg --size=8000 --name=lv_root --fstype=ext4
logvol swap --vgname=sysvg --name=lv_swap --grow --size=1024 --maxsize=2048
logvol /mnt/edata --vgname=sysvg --size=1 --grow --name=mntedata
#---

#--- Produces (in rc1) 

File "/usr/lib64/python2.7/site-packages/pyanaconda/kickstart.py", line 1784,                                                   
                                                  in doKickstartStorage                                                                                                             
                                                      ksdata.logvol.execute(storage, ksdata, instClass)                                                                             
                                                    File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/tui/spokes/storage.py",                                                  
                                                   line 349, in execute                                                                                                             
                                                      doKickstartStorage(self.storage, self.data, self.instclass)                                                                   
                                                    File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/tui/hubs/summary.py", l                                                  
                                                  ine 53, in setup                                                                                                                  
                                                      spoke.execute()                                                                                                               
                                                    File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/tui/__init__.py", line                                                   
                                                  169, in setup                                                                                                                     
                                                      obj.setup(self.ENVIRONMENT)                                                                                                   
                                                    File "/sbin/anaconda", line 1134, in <module>                                                                                   
                                                      anaconda._intf.setup(ksdata)                                                                                                  
                                                  ValueError: not enough free space in volume group                                                                                 
                                                                                                                                                                                    
                                                  What do you want to do now?                                                                                                       
                                                  1) Report Bug                                                                                                                     
                                                  2) Debug                                                                                                                          
                                                  3) Quit                                                                                                                           
                                                                                                                                                                                    
                                                  Please make your choice from above: 
#---

I'm using two 32G images on qemu so there should have been plenty of space. The same configuration works smoothly on rhel7 beta.

If you have any ideas or tests please let me know. Thanks in advance for your time. :)

Comment 5 David Lehman 2014-05-01 22:52:00 UTC
You should assign a meaningful name to your raid devices, eg: "boot", "pv1". The old names, which are based on the minor number of the array, are no longer supported in anaconda.

Please attach the file matching /tmp/anaconda-tb-* to this bug report (type text/plain).

Thanks.

Comment 6 John Margaritsanakis 2014-05-02 14:09:21 UTC
Created attachment 891826 [details]
The file you requested.

As requested.

Comment 7 David Lehman 2014-05-02 19:11:37 UTC
It looks like the padding for vgs with md pvs is not being accounted for in growLVM and/or VGChunk.

Comment 8 David Lehman 2014-05-02 19:12:28 UTC
John, can you do a quick test to verify that the layout works if you remove the raid layer?

Comment 9 John Margaritsanakis 2014-05-02 20:05:46 UTC
Of course. Did you mean you want me to try it on a single-drive?

What I already have for el7 rc1 is this:

---
zerombr
clearpart --all --initlabel --drives=vda

part /boot --size=500 --fstype=ext4
part pv.01 --grow --size=1

volgroup sysvg pv.01
logvol / --vgname=sysvg --size=8000 --name=lv_root --fstype=ext4
logvol swap --vgname=sysvg --name=lv_swap --grow --size=1024 --maxsize=2048
logvol /mnt/edata --vgname=sysvg --size=1 --grow --name=mntedata
---

Which works. I can make any changes to it that you wish for testing purposes, just let me know.

Thanks for your quick responses on this. :)

Comment 10 John Margaritsanakis 2014-05-02 20:24:05 UTC
Second attempt with rc1, this time with two drives.

---
zerombr
clearpart --all --initlabel --drives=sda,sdb

part /boot --size=500 --fstype ext4 --device sda
part pv.01 --grow --size=1 --device sda

volgroup sysvg pv.01
logvol / --vgname=sysvg --size=8000 --name=lv_root --fstype=ext4
logvol swap --vgname=sysvg --name=lv_swap --grow --size=1024 --maxsize=2048
logvol /mnt/edata --vgname=sysvg --size=1 --grow --name=mntedata
---

This results in a nice

n execute                                                                                                                         
                                                      growLVM(storage)                                                                                                              
                                                    File "/usr/lib64/python2.7/site-packages/pyanaconda/kickstart.py", line 1784,                                                   
                                                  in doKickstartStorage                                                                                                             
                                                      ksdata.logvol.execute(storage, ksdata, instClass)                                                                             
                                                    File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/tui/spokes/storage.py",                                                  
                                                   line 349, in execute                                                                                                             
                                                      doKickstartStorage(self.storage, self.data, self.instclass)                                                                   
                                                    File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/tui/hubs/summary.py", l                                                  
                                                  ine 53, in setup                                                                                                                  
                                                      spoke.execute()                                                                                                               
                                                    File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/tui/__init__.py", line                                                   
                                                  169, in setup                                                                                                                     
                                                      obj.setup(self.ENVIRONMENT)                                                                                                   
                                                    File "/sbin/anaconda", line 1134, in <module>                                                                                   
                                                      anaconda._intf.setup(ksdata)                                                                                                  
                                                  ValueError: not enough free space in volume group                                                                                 
                                                                                                                                                                                    
                                                  What do you want to do now?                                                                                                       
                                                  1) Report Bug                                                                                                                     
                                                  2) Debug                                                                                                                          
                                                  3) Quit

Comment 11 Roy Williams 2014-08-21 18:18:01 UTC
Hello everyone,

I would like to confirm this issue exist with my installations of RHEL 7 with the following partitioning schema

# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel --drives=sda
# Mosaic Partition Layout
#autopart
bootloader --location=mbr --driveorder=sda
part /boot --fstype xfs --size=400 --ondisk=sda
part pv.1 --size=300000 --grow --ondisk=sda
volgroup vg_rhel pv.1
logvol / --fstype xfs --name=lv_root --vgname=vg_rhel --size=50000 --percent=42 --grow
logvol /home --fstype xfs --name=lv_home --vgname=vg_rhel --size=10000 --percent=5 --grow
logvol /tmp --fstype xfs --name=lv_tmp --vgname=vg_rhel --size=10000 --percent=20 --grow
logvol /usr/vice/cache --fstype xfs --name=lv_vicecache --vgname=vg_rhel --size=8000 --percent=20 --grow
logvol /var/log --fstype xfs --name=lv_varlog --vgname=vg_rhel --size=2000 --percent=3 --grow
logvol swap --fstype swap --recommended --name=lv_swap --vgname=vg_rhel


This was working prior to the change over from the beta to the RC and I have not found a viable workaround.

Roy

Comment 12 Roy Williams 2014-08-22 15:46:02 UTC
Created attachment 929690 [details]
Log from my kickstart attempt.

Comment 16 errata-xmlrpc 2015-03-05 14:06:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0313.html