Bug 700181

Summary: [RFE] lvm tools not available for kickstart %pre section
Product: [Fedora] Fedora Reporter: jcpunk
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: anaconda-maint-list, jonathan, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-28 00:10:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description jcpunk 2011-04-27 17:02:40 UTC
Description of problem:
For building custom partitioning we are encouraged to use the %pre section.  However, I have a particularly messy lvm configuration that I need to deploy and I am unable to do so with kickstart.  

My primary need is the ability to examine the size of the volume group to determine the sizes of my slices.

My secondary need is to examine existing volume groups, and abort if I find a particular slice (VG-ORACLE for example.  One of the people doing the reload of these systems is not as attentive to node names as I would desire - sanity checks are good in my environment).

This extra command set for %pre may also come in handy for the rescue environment (which seems to be the same env that %pre runs from).

Comment 1 Brian Lane 2011-04-28 00:10:06 UTC
lvm is available from %pre

Comment 2 jcpunk 2011-04-28 00:26:20 UTC
If I may ask, what commands are available as I am unable to run a vgscan, vgchange, or lvscan from the pre environment.  Furthermore, there are no lvm commands listed in the documentation:

http://docs.fedoraproject.org/en-US/Fedora/14/html/Installation_Guide/s1-redhat-config-kickstart-prescript.html

If the lvm tools are available, what must I do to use them as I'm unable to find them in my instance of the Fedora 14 pre environment?

Comment 3 Brian Lane 2011-04-28 01:07:03 UTC
On an installed system those are symlinks to lvm. In the %pre environment you will need to use the lvm command itself. eg. lvm vgscan

Also, if you switch to tty2 you will find a bash shell that you can use to experiment with.