Bug 489428

Summary: Can't use "-" in LV during Kickstart-based install
Product: Red Hat Enterprise Linux 5 Reporter: Thomas <theitsmith>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED DUPLICATE QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: low    
Version: 5.2   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-10 15:40:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thomas 2009-03-09 23:48:55 UTC
Description of problem:
I use a Kickstart file to create a series of partitions. The LV names are in the format lv-name. Kickstart creates the volumes as expected in /dev/vg1 but then symlinks them to /dev/mapper/vg1-lv--name. When Kickstart later attempts to access the volume directly in /dev/mapper it uses /dev/mapper/vg1-lv-name, which doesn't exist. (See below for the partitioning options from my Kickstart file.)

Version-Release number of selected component (if applicable):
RHEL 5.2 (installation DVD)

How reproducible:
Always.

Steps to Reproduce:
1. Create a Kickstart file with the partition options listed below.
2. Boot the installation using this file.
3. Wait for the error to occur (just before it starts copying data to the partitions)
  
Actual results:
Kickstart throws the error: "OSError: [Errno 2] No such file or directory: '/dev/mapper/vg1-lv-root'" The installation stops at that point.

Expected results:
If I create a volume named "lv-root", that volume name should be consistent in /dev/vg1 and /dev/mapper

Additional info:
If I create a volume of the same naming convention on a functioning system, or from a shell within the installation environment, the symlink to /dev/mapper is the same--an extra "-" is added to the name. Thus, when the installer attempts to access the volume using its actual name (/dev/mapper/vg1-lv-name) it's not able to locate it because it was created as /dev/mapper/vg1-lv--name.

Comment 1 Thomas 2009-03-10 00:00:47 UTC
After creating this ticket, I found a similar issue (though with LVM1): Bug 125405. According to that bug, this issue may not be resolved for some time yet.

There are also some RHEL docs that RECOMMEND using dashes in volume names--if this issue is not going away, would it be possible to update the documentation to recommend against using dashes in volume names? See this link for one example of what I'm referring to: http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Installation_Guide/ch28s04s04.html .

Comment 2 Thomas 2009-03-10 00:03:21 UTC
My partition options from ks.cfg:

clearpart --linux --initlabel 
part /boot --fstype ext3 --size=100 --asprimary
part pv.1 --size=100 --grow --asprimary
volgroup vg1 pv.1
logvol swap --fstype swap --name=lv-swap --vgname=vg1 --size=1024
logvol / --fstype ext3 --name=lv-root --vgname=vg1 --size=6144
logvol /home --fstype ext3 --name=lv-home --vgname=vg1 --size=4096
logvol /tmp --fstype ext3 --name=lv-tmp --vgname=vg1 --size=1024
logvol /var --fstype ext3 --name=lv-var --vgname=vg1 --size=1024

Comment 3 Chris Lumens 2009-03-10 15:40:01 UTC
Huh?  That documentation refers to creating encrypted partitions.  It has nothing to do with LVM.

*** This bug has been marked as a duplicate of bug 125405 ***

Comment 4 Thomas 2009-03-10 19:08:22 UTC
Sorry, I should have clarified that better...

LUKS, as I understand it, uses the same subsystem as LVM (http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Installation_Guide/ch28s02.html). In my case, I'm using LUKS over LVM.

What I was asserting is that IF this is a problem with LVM (or device-mapper or whatever), it may also affect LUKS or other software that uses the same subsystems.

That is why I pointed out that LUKS page--it recommends using dashes in its device names.