RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 990828 - Cannot use "-" (simple dash/minus) character for volume group name in kickstart partitioning
Summary: Cannot use "-" (simple dash/minus) character for volume group name in kicksta...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: doc-Installation_Guide
Version: 6.5
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Petr Bokoc
QA Contact: ecs-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-01 05:21 UTC by Gilles Dubreuil
Modified: 2014-05-21 05:54 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-26 12:07:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Gilles Dubreuil 2013-08-01 05:21:53 UTC
Description of problem:
When partitioning in a Kickstart file with volume group names containing a dash or minus sign, the sign is ignored by anaconda during the build.

The two issues with this are:
1. It's not documented therefore not expected
2. Can it be fixed or is this an anconda limitation?

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

How reproducible:
Steps to Reproduce:
1. Create a kickstart file,
   In the partitioning,
   use a "-" in a volume group name, for instance:
   part pv.2 --ondrive=sda --size=10240
   volgroup cinder-volume --pesize=4096 pv.2
2. Install

Actual results:
The installation will go through without error and will simply remove the character.

Expected results:
Obvioulsy, the "-" character to stay in place and not being removed.

Comment 2 David Cantrell 2013-08-02 14:00:42 UTC
This is a restriction imposed by anaconda and we've been doing this for a very long time.  I think the best way to approach this is to update the documentation.

Comment 3 Petr Bokoc 2013-08-06 16:21:08 UTC
Hello David,

does this restriction apply only to volume group names, or to volume names as well?

Comment 4 pada 2013-08-07 08:30:58 UTC
Unfortunately, the behaviour was different in RHEL 6.0 to 6.3 so I vote for the bug to be fixed instead of the

* fresh systems with volgroup foo-bar created foo-bar as volume group (OK)
* reinstalled systems kept dashes foo-bar in existing volume groups (OK)
* Linux LVM Tools accept dashes inside of volume group names (OK)

RHEL 6.4 shows the following anomalous behaviour and there breaks cobbler "reinstallation" on upgrade from 6.3 to 6.4 wich expected the volume groups to be existing with a dash.

* fresh systems with configured volgroup foo-bar get volume group named foobar (FAIL)
* reinstalled systems with --noformat keep the dash in volume group foo-bar (OK)
* Linux LVM Tools accept dashes inside of volume group names (OK)

This is very inconsistent behaviour (especially the difference between noformat and format), which has been introduced with Release 6.4.

In cannot tell anything about the logical volume names, since we have only been using dashes in our volume group names (for years now) and we would like to continue doing so, since the volumes exist on many systems, automatically installed with cobbler and our cobbler preinstallation scripts expect the data volumes to contain a dash on existing machines. For now we needed to implement a very dirty workaround which renames the volume group back from foobar to foo-bar in the cobbler postinstall section.

Comment 5 pada 2013-08-07 08:48:55 UTC
Yes, logical volume names are also affected.
Dashes get removed from logvol names on fresh RHEL 6.4 installs.

Comment 6 Gilles Dubreuil 2013-08-08 01:20:29 UTC
This limitation actually causes trouble down the road with potentially any system provisionning solution.

For instance, on top of Foreman, I have the case where Openstack Cinder expects a "cinder-volume" to be present for automated installation. Of course Cinder default could be changed but the why not fix the trouble at the bottom of the stack, for good? 

Can someone, please, explain/check why the "-" is an issue in Anaconda and why it cannot be escaped?

Cheers

Comment 7 A. R. Thomas 2013-08-19 21:39:25 UTC
Here's what I've run into, which can hopefully help others seeking answers.

It appears (not to point fingers) that when lvm creates the new volume group, if there's a "-" in the name, it somehow doubles that up.  (vg_foo-bar becomes vg_foo--bar)

To recreate, create a physical volume (e.g. pv.01), a volume group, and a a logical volume.


vgcreate foo-bar pv.01
lvcreate -L10m foo-bar


The VG Name in vgdisplay and lvdisplay will show as foo-bar but a quick check under /dev/mapper/ will show a dynamic link for foo--bar-lvol0.

udev is understandably confused as a query reports the following:

udev info --query=all --name=/dev/mapper/foo--bar-lvol0 | grep foo
S:  mapper/foo--bar-lvol0
S:  foo-bar/lvol0
S:  disk/by-id/dm-name-foo--bar-lvol0
E:  DM_NAME=foo--bar-lvol0
E:  DM_VG_NAME=foo-bar
E:  DEVLINKS=...


So, in summation, I'm not certain what's causing the issue, however I believe when lvm writes the block information, it adds an additional "-" to the VG Name.  It appears Red Hat was trying to protect us by removing "-" from VG names.

As a workaround, you can rename the volume group (vgrename), however you will also need to change your grub.conf and /etc/fstab to reflect.  I'm not a big fan of naming the VG "foo-bar" and then putting "foo--bar" in /etc/fstab as that could be confusing, so I change fstab and grub to point to /dev/foo-bar/root.  The issue there is, the mount command still reports /dev/mapper/foo--bar-root.  It's something you have to live with, unless you can remove "-" from your volumegroup name altogether without issue.

Comment 8 Gilles Dubreuil 2013-08-20 07:15:54 UTC
Thanks, thomas, that's interesting and good to know to help the workaround.

Maybe someone can explain why this is an Anaconda restriction and if there is any way we could ultimately (RFE) see if the "part" parameter can be fully escaped?

Comment 18 Ramon Acedo 2014-05-20 20:14:17 UTC
I'm using RHEL 6.5 provisioned via Foreman with this disk layout template:

zerombr
clearpart --all --initlabel
part /boot --fstype ext4 --size=150
part swap --recommended
part pv.01 --size=5120
part pv.02 --size=1 --grow
volgroup vg_root pv.01
logvol  /  --fstype=ext4 --vgname=vg_root  --name=lv_root --size=1 --grow --percent=100
volgroup cinder-volumes pv.02

The VG is still created without the "-" and I have to manually "vgrename cindervolumes cinder-volumes" after the systems are provisioned.

Is is possible that some packages need to be updated in the provisioning media created from the current rhel-server-6.5-x86_64-dvd.iso?

Comment 19 Gilles Dubreuil 2014-05-21 05:54:04 UTC
(In reply to Ramon Acedo from comment #18)
> The VG is still created without the "-" and I have to manually "vgrename
> cindervolumes cinder-volumes" after the systems are provisioned.
> 

This was a fix to the documentation not to anaconda.


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