Bug 213942 - super long char names can confuse lvm
super long char names can confuse lvm
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2 (Show other bugs)
5.0
All Linux
low Severity low
: ---
: ---
Assigned To: Milan Broz
Corey Marthaler
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-03 16:15 EST by Corey Marthaler
Modified: 2013-02-28 23:04 EST (History)
7 users (show)

See Also:
Fixed In Version: lvm2-2.02.84-1.el5
Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-21 06:52:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2006-11-03 16:15:36 EST
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
Comment 1 Corey Marthaler 2009-01-14 17:20:54 EST
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
Comment 3 Alasdair Kergon 2011-02-11 15:54:42 EST
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.)
Comment 5 Milan Broz 2011-03-08 09:19:06 EST
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).
Comment 8 Corey Marthaler 2011-05-09 16:24:19 EDT
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.
Comment 10 Florian Nadge 2011-05-26 10:52:44 EDT
    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.
Comment 11 Florian Nadge 2011-05-26 10:53:29 EDT
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
Comment 12 errata-xmlrpc 2011-07-21 06:52:13 EDT
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
Comment 13 errata-xmlrpc 2011-07-21 08:28:35 EDT
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

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