Bug 1009678 - with kickstart, reusing LVM logical volumes causes anaconda problems
Summary: with kickstart, reusing LVM logical volumes causes anaconda problems
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 20
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Vratislav Podzimek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-18 20:33 UTC by Gene Czarcinski
Modified: 2013-10-03 11:03 UTC (History)
9 users (show)

Fixed In Version: anaconda-20.20-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-03 11:03:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
kickstart to create minimal system (1.12 KB, text/plain)
2013-09-24 10:47 UTC, Gene Czarcinski
no flags Details
kickstart to reuse allocated logical volumes (1.12 KB, text/plain)
2013-09-24 10:48 UTC, Gene Czarcinski
no flags Details
anaconda.log (3.13 KB, text/plain)
2013-09-24 10:49 UTC, Gene Czarcinski
no flags Details
ifcfg.log (461 bytes, text/plain)
2013-09-24 10:50 UTC, Gene Czarcinski
no flags Details
packaging.log (12.79 KB, text/plain)
2013-09-24 10:52 UTC, Gene Czarcinski
no flags Details
program.log.gz (3.42 KB, application/octet-stream)
2013-09-24 10:57 UTC, Gene Czarcinski
no flags Details
anaconda-tb-edited (first 100 lines) (4.93 KB, text/plain)
2013-09-24 11:02 UTC, Gene Czarcinski
no flags Details
storage.log.gz (9.85 KB, application/octet-stream)
2013-09-24 11:04 UTC, Gene Czarcinski
no flags Details

Description Gene Czarcinski 2013-09-18 20:33:49 UTC
Description of problem:
I did a minimal-window-manager install (you get openbox and not much else). with Fedora 19.  Everything was LVM .. swap, /boot and / (root).  I then reinstall everything but with --noformat for swap and --useexisting for /boot and /

This is just using the F19 distribution DVD (iso image .. this is KVM virtuals).

I then ran exactly the same kickstart config file but with the F20 alpha RC3 DVD. Oops ... it dies.

What do you need?  I can easily reproduce this so gathering info is no problem.

Comment 1 Gene Czarcinski 2013-09-18 20:42:51 UTC
Note:  this appears to be something related to kickstart only.  I was able to re-use the space if I did a basic-window gui install.

Comment 2 Vratislav Podzimek 2013-09-23 19:00:15 UTC
Could you please attach (as separate, text/plain files) the logs from the /tmp directory (from the installation process) and also the kickstart you are using? Also please explain what it means that the installer dies.

Comment 3 Gene Czarcinski 2013-09-24 10:47:22 UTC
Created attachment 802157 [details]
kickstart to create minimal system

Comment 4 Gene Czarcinski 2013-09-24 10:48:54 UTC
Created attachment 802158 [details]
kickstart to reuse allocated logical volumes

swap is --noformat, /boot and / are --useexisting

Comment 5 Gene Czarcinski 2013-09-24 10:49:41 UTC
Created attachment 802159 [details]
anaconda.log

Comment 6 Gene Czarcinski 2013-09-24 10:50:34 UTC
Created attachment 802160 [details]
ifcfg.log

Comment 7 Gene Czarcinski 2013-09-24 10:52:17 UTC
Created attachment 802164 [details]
packaging.log

Comment 8 Gene Czarcinski 2013-09-24 10:57:48 UTC
Created attachment 802168 [details]
program.log.gz

Comment 9 Gene Czarcinski 2013-09-24 11:02:26 UTC
Created attachment 802172 [details]
anaconda-tb-edited (first 100 lines)

anaconda-tb-* was too large so just first 100 lines.

Comment 10 Gene Czarcinski 2013-09-24 11:04:12 UTC
Created attachment 802184 [details]
storage.log.gz

Comment 11 Vratislav Podzimek 2013-09-24 13:14:33 UTC
To save you quite a lot of work, I'd suggest you to use the "Report Bug" button in the Anaconda's exception handler.

Comment 12 Vratislav Podzimek 2013-09-24 13:16:38 UTC
As for the kickstart's line:
> volgroup fedora --noformat  pv.01

From Anaconda/Kickstart wiki, section volgroup [1]:
> --noformat
>
>    Use an existing volume group. Do not specify partitions when using this option. 

[1] http://fedoraproject.org/wiki/Anaconda/Kickstart#volgroup

Comment 13 Gene Czarcinski 2013-09-24 13:49:46 UTC
1. Using the supplied kickstart file works for Fedora 19.

2. If it did work in Fedora 19 but was incorrect, how does one specify logical volumes to be reused whether they are reformatted or not?

Note:  With kickstart, sometimes the documentation is just not clear as to how to do something and it is trial and error to figure out how to do it.

Comment 14 Vratislav Podzimek 2013-09-24 13:58:44 UTC
(In reply to Gene Czarcinski from comment #13)
> 1. Using the supplied kickstart file works for Fedora 19.
> 
> 2. If it did work in Fedora 19 but was incorrect, how does one specify
> logical volumes to be reused whether they are reformatted or not?
> 
> Note:  With kickstart, sometimes the documentation is just not clear as to
> how to do something and it is trial and error to figure out how to do it.
Actually, I got confused as well. What the documentation says works with the RHEL6 version of the pykickstart package, but for some reason the patch doing the change wasn't ported to master/fedora. So it should still work once the patch I sent to anaconda-patches gets applied.

However, the patch for pykickstart will get ported, so do not specify partitions when using 'volgroup --noformat' in F20 kickstart installations.

Comment 15 Gene Czarcinski 2013-09-24 14:30:19 UTC
OK, but I still do not understand.  What relates a logical volume to a mount point and whether that mount point is to be reformatted or not.

For example, with four logical volumes defined: swap, /boot, /home, and /, I do not want swap or /home reformatted but I do want /boot and / reformatted.  In addition, the names could be one, two three, and four.  I know of nothing in a VG which has the mount point definition.

The only alternative I can think of is rather "over-the-top" ...

Use the UUID for the logical volume and specify something like:

part /home --noformat --onpart=UUID=3c6c53ec-fcc4-43dd-85fe-9b3939ce8f01
part / --useexisting --fstype=ext4 --onpart=UUID=2af6e4b0-da29-48e0-a039-9e2bba1876ee

If this is what we are suppose to do for the reuse of logical volumes then you had better (quickly) put an update into the kickstart documentation that says to do this.  I do not knopw if this will work but I am going to giv it a try.

Comment 16 Gene Czarcinski 2013-09-24 14:49:27 UTC
Well, that did not work and I am glad it did not!

Comment 17 Vratislav Podzimek 2013-09-24 16:48:04 UTC
(In reply to Gene Czarcinski from comment #15)
> OK, but I still do not understand.  What relates a logical volume to a mount
> point and whether that mount point is to be reformatted or not.
> 
> For example, with four logical volumes defined: swap, /boot, /home, and /, I
> do not want swap or /home reformatted but I do want /boot and / reformatted.
> In addition, the names could be one, two three, and four.  I know of nothing
> in a VG which has the mount point definition.
When specifying logvol, you specify its mountpoint. You also specify its name and may use --useexisting (to reuse the LV and reformat it) or --noformat (to reuse the LV and not format it).

Just like you did in your kickstart. It looks correct if you want to preserve the 'fedora' VG and its 'swap' LV and reformat the 'boot' and 'root' LVs. It doesn't work due to a bug in the code which I fixed with a patch.

And with a next build of pykickstart for F20, you'll need to remove the pv.01 specification from the kickstart -- both the part command (completely) and referring to it in the volgroup command.

Comment 18 Gene Czarcinski 2013-09-24 17:34:37 UTC
OK, I think I understand now.

1.  There was a bug and you have fixed it.

2.  In F20 (as compared to a valid F19 kickstart file), the part command(s) specifying partitions for the volume group are completely removed AND the "pv.01" on the volgroup command.  Now, I believe that you should still need to specify --noformat or --useexisting on the volgroup command but the documentation says "Do not specify partitions when using this option".

BTW, is there going to be another RC for the alpha or do I need to wait for the beta round to test this?

Comment 19 Vratislav Podzimek 2013-09-24 18:01:34 UTC
(In reply to Gene Czarcinski from comment #18)
> OK, I think I understand now.
> 
> 1.  There was a bug and you have fixed it.
> 
> 2.  In F20 (as compared to a valid F19 kickstart file), the part command(s)
> specifying partitions for the volume group are completely removed AND the
> "pv.01" on the volgroup command.  Now, I believe that you should still need
> to specify --noformat or --useexisting on the volgroup command but the
> documentation says "Do not specify partitions when using this option".
If reusing volgroup (--noformat or --useexisting), there's no point of specifying partitions for it as it already exists and "runs".

> 
> BTW, is there going to be another RC for the alpha or do I need to wait for
> the beta round to test this?
You can test the changes by adding:
updates=http://vpodzime.fedorapeople.org/1009678_updates.img

to the boot options.

Comment 20 Gene Czarcinski 2013-09-24 18:52:00 UTC
Sorry, but this does not fix the problem.

Using the attached file minimal-20.cfg as my reference, I removed the "part pv.01" command and changed "volgroup" to remove "pv.01".  I tried it with "--noformat" and then with "--useexisting" on the volgroup command line and the result was the same: an error message saying "volgroup must be given a list of partitions" and pointing to the volgroup line in the kickstart file.

Comment 21 Gene Czarcinski 2013-09-24 20:38:13 UTC
I hate to tell you this but you are incorrect about needing to change the kickstart file.

1. Using F20 alpha RC4 plus your 1009678_updates.img

2. The minimal-20.cfg kickstart file which includes a part pv.01, volgroup with pv.01 and then the logvol statements.

It worked!

That is, the same kickstart file that reuses logical volumes when installing Fedora 19 will also reuse logical volumes when the Fedora 20 installation includes you patch/update.

I still believe that the documentation could be made a bit clearer with respect to some examples for logical volume reuse.

Comment 22 Vratislav Podzimek 2013-09-24 21:08:19 UTC
(In reply to Gene Czarcinski from comment #21)
> I hate to tell you this but you are incorrect about needing to change the
> kickstart file.
> 
> 1. Using F20 alpha RC4 plus your 1009678_updates.img
> 
> 2. The minimal-20.cfg kickstart file which includes a part pv.01, volgroup
> with pv.01 and then the logvol statements.
> 
> It worked!
That's what I expected. There are two separate issues -- the one I fixed with a patch and that makes you kickstart work and the other one that will soon cause that your kickstart won't work unless you remove the pv.01 stuff.

> 
> I still believe that the documentation could be made a bit clearer with
> respect to some examples for logical volume reuse.
The documentation will get clearer once the kickstart changes are done and the code will actually reflect what the documentation says about not using partitions for reusing existing volgroups.

Comment 23 Gene Czarcinski 2013-09-25 09:11:59 UTC
OK, the "light bulb" suddenly went on and I understand.  The "partitions" refers to the "pv.01" and the part command and not the logvol commands which is what I was confusing it with.

Question:  are one or both of these changes going to make it into alpha.  As it now stands, anyone attempting logical volume reuse (at least with kickstart) will need to use this update if alpha is based on RC4.  If this is true, then a message on the test list might be appropriate.

Comment 24 Vratislav Podzimek 2013-09-25 13:26:16 UTC
(In reply to Gene Czarcinski from comment #23)
> OK, the "light bulb" suddenly went on and I understand.  The "partitions"
> refers to the "pv.01" and the part command and not the logvol commands which
> is what I was confusing it with.
> 
> Question:  are one or both of these changes going to make it into alpha.  As
> it now stands, anyone attempting logical volume reuse (at least with
> kickstart) will need to use this update if alpha is based on RC4.  If this
> is true, then a message on the test list might be appropriate.
Yeah, you are right, Alpha is base on RC4 and was released yesterday, so anyone attempting LV reus will need this update. Feel free to send a message on the test list.

Comment 25 Fedora Update System 2013-09-25 16:03:58 UTC
anaconda-20.20-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/anaconda-20.20-1.fc20

Comment 26 Fedora Update System 2013-09-27 00:32:02 UTC
Package anaconda-20.20-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.20-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-17681/anaconda-20.20-1.fc20
then log in and leave karma (feedback).

Comment 27 Fedora Update System 2013-09-28 01:16:58 UTC
anaconda-20.21-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/anaconda-20.21-1.fc20

Comment 28 Gene Czarcinski 2013-10-03 11:03:01 UTC
Verified: working as advertised on Fedora 20, Beta-TC1 with Anaconda-20.21-1

I am closing this.


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