Red Hat Bugzilla – Bug 489428
Can't use "-" in LV during Kickstart-based install
Last modified: 2011-06-29 10:32:23 EDT
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)
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)
Kickstart throws the error: "OSError: [Errno 2] No such file or directory: '/dev/mapper/vg1-lv-root'" The installation stops at that point.
If I create a volume named "lv-root", that volume name should be consistent in /dev/vg1 and /dev/mapper
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.
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 .
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
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 ***
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.