|Summary:||installer does not check lvm name lengths|
|Product:||Red Hat Enterprise Linux 6||Reporter:||Michal Nowak <mnowak>|
|Component:||anaconda||Assignee:||David Lehman <dlehman>|
|Status:||CLOSED ERRATA||QA Contact:||Release Test Team <release-test-team>|
|Version:||6.2||CC:||agk, atodorov, dwysocha, heinzm, jbrassow, jreed, jstodola, mbanas, ohudlick, prajnoha, prockai, syeghiay, thornber, tlavigne, zkabelac|
|Fixed In Version:||anaconda-13.21.191-1||Doc Type:||Bug Fix|
Do not use hyphens in LVM volume group names or logical volume names. Keep each name under 64 characters in length, ensuring that the total length of the volume group name plus the logical volume name does not exceed 126 characters in length. Most people will not have problems with this limitation. Use short names and you will be fine.
|Last Closed:||2013-02-21 09:58:27 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Cloudforms Team:||---||Target Upstream Version:|
|Bug Depends On:|
|Bug Blocks:||756082, 840685|
Description Michal Nowak 2011-10-19 10:50:44 UTC
abrt version: 2.0.5 executable: /mnt/runtime/usr/bin/python hashmarkername: anaconda kernel: 2.6.32-209.el6.x86_64 product: Red Hat Enterprise Linux reason: LVMError: lvcreate failed for vg_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/lv_root: 06:11:27,670 ERROR : Failed to activate new LV. time: Wed Oct 19 06:32:44 2011 version: 6.2 anaconda-tb-Xt1gNJ: Text file, 179295 bytes description: :The following was filed automatically by anaconda: :anaconda 13.21.145 exception report :Traceback (most recent call first): : File "/usr/lib/anaconda/storage/devicelibs/lvm.py", line 379, in lvcreate : raise LVMError("lvcreate failed for %s/%s: %s" % (vg_name, lv_name, msg)) : File "/usr/lib/anaconda/storage/devices.py", line 2517, in create : lvm.lvcreate(self.vg.name, self._name, self.size, progress=w) : File "/usr/lib/anaconda/storage/deviceaction.py", line 204, in execute : self.device.create(intf=intf) : File "/usr/lib/anaconda/storage/devicetree.py", line 713, in processActions : action.execute(intf=self.intf) : File "/usr/lib/anaconda/storage/__init__.py", line 344, in doIt : self.devicetree.processActions() : File "/usr/lib/anaconda/packages.py", line 110, in turnOnFilesystems : anaconda.id.storage.doIt() : File "/usr/lib/anaconda/dispatch.py", line 208, in moveStep : rc = stepFunc(self.anaconda) : File "/usr/lib/anaconda/dispatch.py", line 126, in gotoNext : self.moveStep() : File "/usr/lib/anaconda/gui.py", line 1478, in setScreen : self.anaconda.dispatch.gotoNext() : File "/usr/lib/anaconda/gui.py", line 1391, in nextClicked : self.setScreen () :LVMError: lvcreate failed for vg_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/lv_root: 06:11:27,670 ERROR : Failed to activate new LV. : :</LOG>
Comment 1 Michal Nowak 2011-10-19 10:50:50 UTC
Created attachment 528970 [details] File: anaconda-tb-Xt1gNJ
Comment 3 David Lehman 2011-10-19 13:56:20 UTC
06:11:27,669 ERROR : Name "vg_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-lv_root" too long 06:11:27,670 ERROR : Failed to set device name for vg_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-lv_root 06:11:27,670 ERROR : Failed to activate new LV.
Comment 4 Michal Nowak 2011-10-20 08:57:37 UTC
*** Bug 747544 has been marked as a duplicate of this bug. ***
Comment 5 David Cantrell 2011-10-24 18:27:22 UTC
I'm sure we're hitting a label length limit here. What is the LVM label length limit we should be enforcing at install time? Is there a good location we can reference for that limit? (feel free to answer the questions and reassign the bug back to anaconda)
Comment 6 Alasdair Kergon 2011-10-24 18:39:31 UTC
Well the underlying restriction is that the vgname + lvname lengths together must not exceed 126 minus the total number of hyphens in them. So 63 bytes is a reasonable limit to use for each, as long as you deduct one from it for each hyphen included in the name.
Comment 7 Alasdair Kergon 2011-10-24 18:46:51 UTC
Internal names used for snapshots etc. can take up a further 8 characters so maybe make the limit 59 characters minus number of hyphens.
Comment 8 Alasdair Kergon 2011-10-24 18:55:56 UTC
The hyphen thing is because the hyphen is used internally as a separator, so any hyphens in the name are escaped by doubling them, eating up an extra character.
Comment 9 David Cantrell 2011-10-24 19:25:14 UTC
Thanks, Alasdair. I'm going to add a technote for this (not that anyone will ever read it) and we can fix it up in 6.3.
Comment 10 David Cantrell 2011-10-24 19:25:16 UTC
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Do not use hyphens in LVM volume group names or logical volume names. Keep each name under 64 characters in length, ensuring that the total length of the volume group name plus the logical volume name does not exceed 126 characters in length. Most people will not have problems with this limitation. Use short names and you will be fine.
Comment 11 Alasdair Kergon 2011-10-24 19:34:22 UTC
Indeed. I've never come across a customer problem from using names that are too long, which is why LVM still only has minimal validation in this area.
Comment 20 RHEL Product and Program Management 2012-07-16 22:49:22 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
Comment 25 Alexander Todorov 2013-01-16 10:52:41 UTC
with snap #3: In GUI: * LV name is limited to 32 characters * VG name is limited to 16 characters When testing with ks.cfg from comment #22 VG name was truncated to 50 characters and installation completed.
Comment 26 errata-xmlrpc 2013-02-21 09:58:27 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0373.html