Bug 221322

Summary: Unable to create mirror with name longer than 22 chars
Product: Red Hat Enterprise Linux 4 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Milan Broz <mbroz>
Status: CLOSED ERRATA QA Contact: Corey Marthaler <cmarthal>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: agk, dwysocha, jbrassow, mbroz, prockai, pvrabec
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0287 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-08 00:14:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Corey Marthaler 2007-01-03 20:17:01 UTC
Description of problem:
You can create linears with names of 23 chars just fine:
[root@link-08 bin]# lvcreate -n 1234567890123456789012 -L 20M  mirror_sanity
  Logical volume "1234567890123456789012" created
[root@link-08 bin]# lvcreate -n 12345678901234567890123 -L 20M  mirror_sanity
  Logical volume "12345678901234567890123" created


but not mirrors:
[root@link-08 bin]# lvcreate -n 1234567890123456789012 -L 20M -m 1 mirror_sanity
  Logical volume "1234567890123456789012" created
[root@link-08 bin]# lvcreate -n 12345678901234567890123 -L 20M -m 1 mirror_sanity
  Failed to generate unique name for the new logical volume
  Aborting. Failed to create mirror image LV. Remove new LV and retry.

[root@link-08 bin]# lvs -a -o +devices
  LV                                VG            Attr   LSize  Origin Snap% 
Move Log                         Copy%  Devices
  1234567890123456789012            mirror_sanity mwi-a- 20.00M                
   1234567890123456789012_mlog 100.00
1234567890123456789012_mimage_0(0),1234567890123456789012_mimage_1(0)
  12345678901234567890123_mlog      mirror_sanity -wi---  4.00M                
                                      /dev/sdb1(5)
  [1234567890123456789012_mimage_0] mirror_sanity iwi-ao 20.00M                
                                      /dev/sda1(0)
  [1234567890123456789012_mimage_1] mirror_sanity iwi-ao 20.00M                
                                      /dev/sdb1(0)
  [1234567890123456789012_mlog]     mirror_sanity lwi-ao  4.00M                
                                      /dev/sdg1(0)
[root@link-08 bin]# dmsetup ls
mirror_sanity-1234567890123456789012    (253, 5)
mirror_sanity-1234567890123456789012_mlog       (253, 2)
VolGroup00-LogVol01     (253, 1)
VolGroup00-LogVol00     (253, 0)
mirror_sanity-1234567890123456789012_mimage_1   (253, 4)
mirror_sanity-1234567890123456789012_mimage_0   (253, 3)
[root@link-08 bin]# dmsetup table
mirror_sanity-1234567890123456789012: 0 40960 mirror disk 3 253:2 1024
block_on_error 2 253:3 0 253:4 0
mirror_sanity-1234567890123456789012_mlog: 0 8192 linear 8:97 384
VolGroup00-LogVol01: 0 4063232 linear 3:2 151912832
VolGroup00-LogVol00: 0 151912448 linear 3:2 384
mirror_sanity-1234567890123456789012_mimage_1: 0 40960 linear 8:17 384
mirror_sanity-1234567890123456789012_mimage_0: 0 40960 linear 8:1 384
[root@link-08 bin]# lvscan
  ACTIVE            '/dev/mirror_sanity/1234567890123456789012' [20.00 MB] inherit
  inactive          '/dev/mirror_sanity/12345678901234567890123_mlog' [4.00 MB]
inherit


As you can see the log does end up created which is confusing.


Version-Release number of selected component (if applicable):
lvm2-2.02.17-1

How reproducible:
everytime

Comment 1 Milan Broz 2007-01-05 16:19:29 UTC
Fixed upstream 2.02.18, setting to POST (waiting for next rebase of RHEL4.5 pkg).

Comment 2 Corey Marthaler 2007-01-18 22:03:01 UTC
Fix verified in lvm2-2.02.19-1.el4.

Comment 6 Red Hat Bugzilla 2007-05-08 00:14:45 UTC
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 the 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-2007-0287.html