Description of problem: It appears that the kernel only reads the first 64 chars of an lvm device, so you can create a situation where the kernel has one view and user space has another [root@taft-04 tmp]# lvscan ACTIVE '/dev/11111111112222222222333333333344444444445555555555666666666677777777777/111111111122222222223333333333444444444455555555556666666666777777777778888888888' [10.00 GB] inherit ACTIVE '/dev/11111111112222222222333333333344444444445555555555666666666677777777777/111111111122222222223333333333444444444455555555556666666666777777777779999999999' [10.00 GB] inherit [root@taft-04 tmp]# dmsetup ls 11111111112222222222333333333344444444445555555555666666666677777777777-1111111111222222222233333333334444444444555555555566666 (253, 2) VolGroup00-LogVol01 (253, 1) VolGroup00-LogVol00 (253, 0) [root@taft-04 tmp]# ls /dev/1111* 111111111122222222223333333333444444444455555555556666666666777777777778888888888 [root@taft-04 tmp]# ls -l /dev/11111111112222222222333333333344444444445555555555666666666677777777777/ total 0 lrwxrwxrwx 1 root root 165 Nov 3 10:07 111111111122222222223333333333444444444455555555556666666666777777777778888888888 -> /dev/mapper/11111111112222222222333333333344444444445555555555666666666677777777777-111111111122222222223333333333444444444455555555556666666666777777777778888888888 There are two devices but only one dm and /dev/ entry. Version-Release number of selected component (if applicable): [root@taft-04 tmp]# rpm -qa | grep lvm2 lvm2-2.02.12-6.el5 lvm2-cluster-2.02.12-6.el5
It appears that part of this bz has been resolved. [root@hayes-03 bin]# vgs VG #PV #LV #SN Attr VSize VFree 11111111112222222222333333333344444444445555555555666666666677777777777 5 2 0 wz--n- 8.87T 8.87T VolGroup00 1 2 0 wz--n- 74.38G 0 [root@hayes-03 bin]# lvscan ACTIVE '/dev/11111111112222222222333333333344444444445555555555666666666677777777777/111111111122222222223333333333444444444455555555556666666666777777777779999999999' [100.00 MB] inherit ACTIVE '/dev/11111111112222222222333333333344444444445555555555666666666677777777777/111111111122222222223333333333444444444455555555556666666666777777777778888888888' [100.00 MB] inherit # still only one dm entry for the two linears [root@hayes-03 bin]# dmsetup status 11111111112222222222333333333344444444445555555555666666666677777777777-1111111111222222222233333333334444444444555555555566666: 0 204800 linear VolGroup00-LogVol01: 0 20578304 linear VolGroup00-LogVol00: 0 135397376 linear # but both show up in /dev/ [root@hayes-03 bin]# ls -l /dev/11111111112222222222333333333344444444445555555555666666666677777777777/ total 0 lrwxrwxrwx 1 root root 165 Jan 14 16:12 111111111122222222223333333333444444444455555555556666666666777777777778888888888 -> /dev/mapper/11111111112222222222333333333344444444445555555555666666666677777777777-111111111122222222223333333333444444444455555555556666666666777777777778888888888 lrwxrwxrwx 1 root root 165 Jan 14 16:14 111111111122222222223333333333444444444455555555556666666666777777777779999999999 -> /dev/mapper/11111111112222222222333333333344444444445555555555666666666677777777777-111111111122222222223333333333444444444455555555556666666666777777777779999999999 lvm2-2.02.40-6.el5 BUILT: Fri Oct 24 07:37:33 CDT 2008 device-mapper-1.02.28-2.el5 BUILT: Fri Sep 19 02:50:32 CDT 2008
Let's check what the current situation is and if it's not fixed already, deal with it. (Watch for quoting such as doubled-hyphens too.)
I tried to reproduce it and it works for me. The vg-lv devine mane in kernel has maximal length 128 characters, when lv + vg name plus separator "-" exceed this, it properly reports "name too long". When it is in limits all links seem to be working. Note kernel DM is here related as well. Tried on lvm2-2.02.84-1.el5.x86_64 kernel-2.6.18-238.1.1.el5.x86_64 I'll add this to errata so we are sure it is properly tested (but it is possible it is fixed currentrelease already).
Fix verified in the latest rpms. 2.6.18-256.el5 lvm2-2.02.84-2.el5 BUILT: Wed Mar 23 07:18:08 CDT 2011 lvm2-cluster-2.02.84-2.el5 BUILT: Wed Mar 23 07:19:43 CDT 2011 device-mapper-1.02.63-2.el5 BUILT: Fri Mar 4 10:23:17 CST 2011 device-mapper-event-1.02.63-2.el5 BUILT: Fri Mar 4 10:23:17 CST 2011 cmirror-1.1.39-10.el5 BUILT: Wed Sep 8 16:32:05 CDT 2010 kmod-cmirror-0.1.22-3.el5 BUILT: Tue Dec 22 13:39:47 CST 2009 [root@grant-01 ~]# lvcreate -L 10G -n 111111111122222222223333333333444444444455555555556666666666 11111111112222222222333333333344444444445555555555666666666677777777777 Name "11111111112222222222333333333344444444445555555555666666666677777777777-111111111122222222223333333333444444444455555555556666666666" too long Failed to set device name for 11111111112222222222333333333344444444445555555555666666666677777777777-111111111122222222223333333333444444444455555555556666666666 Failed to activate new LV.
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: This field is the basis of the errata or release note for this bug. It can also be used for change logs. The Technical Note template, known as CCFR, is as follows: Cause What actions or circumstances cause this bug to present. Consequence What happens when the bug presents. Fix What was done to fix the bug. Result What now happens when the actions or circumstances above occur. Note: this is not the same as the bug doesn’t present anymore.
Hi, am assigned to edit the errata that describes this bugzilla entry and need you to briefly state the cause, consequence, fix, result for this bug. If possible, use the Technical Notes field at the top of of this bugzilla entry. Try to use the already copied Cause, Consequence, Fix, Result, Structure. Just skip what you think unnecessary. Many thanks, Florian
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-1071.html