Bug 820229

Summary: fail to rename the thin LV
Product: Red Hat Enterprise Linux 6 Reporter: Peter Rajnoha <prajnoha>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.3CC: agk, bmarzins, bmr, cb20777, cmarthal, dwysocha, heinzm, jbrassow, jonathan, lvm-team, mbroz, msnitzer, nperic, prajnoha, prockai, thornber, xiaoli, zkabelac
Target Milestone: rc   
Target Release: 6.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.97-2.el6 Doc Type: Bug Fix
Doc Text:
Attempting to rename Logical Volumes gave the following error: lvrename Cannot rename <volume_name>: name format not recognized for internal LV <pool_name> This is fixed.
Story Points: ---
Clone Of: 818020 Environment:
Last Closed: 2013-02-21 08:09:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 818020    
Bug Blocks:    

Description Peter Rajnoha 2012-05-09 12:40:33 UTC
+++ This bug was initially created as a clone of Bug #818020 +++

Description of problem:


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


How reproducible:


Steps to Reproduce:
1.# lvs tsvg
lvs  LV   VG   Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
lvs  lv1  tsvg Vwi-a-tz 100.00m pool          0.00                        
lvs  lv2  tsvg Vwi-a-tz 100.00m pool          0.00                        
lvs  pool tsvg twi-a-tz   4.00m               0.00     
              
# lvrename tsvg lv1 lv3
lvrename  Cannot rename "lv1": name format not recognized for internal LV "pool1"

2.
3.
  
Actual results:


Expected results:


Additional info:

--- Additional comment from agk on 2012-05-02 14:45:50 CEST ---

What about the other form of the command - does that work or fail?

lvrename tsvg/lv1 lv3

--- Additional comment from zkabelac on 2012-05-02 14:56:18 CEST ---

This is bug in for_each_sub_lv() logic in lv_manip code  for thin pool rename  

While for renaming pool - multiple LV must be renamed,  for  thin volume this is not the case.

--- Additional comment from xiaoli on 2012-05-03 03:15:49 CEST ---

(In reply to comment #1)
> What about the other form of the command - does that work or fail?
> 
> lvrename tsvg/lv1 lv3

Still failed.
[root@laker T1]# lvrename tsvg/lv1 lv2
lvrename  Cannot rename "lv1": name format not recognized for internal LV "pool"

--- Additional comment from zkabelac on 2012-05-09 14:37:24 CEST ---

Regression fixed upstream with this commit:

https://www.redhat.com/archives/lvm-devel/2012-May/msg00003.html

Comment 3 Peter Rajnoha 2012-05-11 11:55:15 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:
It's not possible to rename thin logical volumes using current LVM2 release. The rename ends up with an error "lvrename  Cannot rename <volume_name>: name format not recognized for internal LV <pool_name>". This issue will be fixed in next LVM2 release.

Comment 5 Martin Prpič 2012-05-14 09:48:09 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1,5 @@
-It's not possible to rename thin logical volumes using current LVM2 release. The rename ends up with an error "lvrename  Cannot rename <volume_name>: name format not recognized for internal LV <pool_name>". This issue will be fixed in next LVM2 release.+It is not possible to rename thin logical volumes using tools provided in the current LVM2 release. The rename operation returns the following error:
+
+lvrename Cannot rename <volume_name>: name format not recognized for internal LV <pool_name>
+
+This issue will be fixed in the next LVM2 release.

Comment 6 Alasdair Kergon 2012-07-31 17:59:43 UTC
Deleted Technical Notes Contents.

Old Contents:
It is not possible to rename thin logical volumes using tools provided in the current LVM2 release. The rename operation returns the following error:

lvrename Cannot rename <volume_name>: name format not recognized for internal LV <pool_name>

This issue will be fixed in the next LVM2 release.

Comment 7 Alasdair Kergon 2012-07-31 19:19:23 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:
Attempting to rename Logical Volumes gave the following error:

lvrename Cannot rename <volume_name>: name format not recognized for internal LV <pool_name>

This is fixed.

Comment 8 Corey Marthaler 2012-08-09 17:40:37 UTC
Adding QA ack for 6.4.

Comment 10 Nenad Peric 2012-09-12 14:38:35 UTC
Tested and lvrename successfully renamed thin_lv with version 97-2:



(09:38:48) [root@r6-node01:~]$ lvs
  LV       VG       Attr     LSize Pool     Origin Data%  Move Log Copy%  Convert
  lv_root  VolGroup -wi-ao-- 6.54g                                               
  lv_swap  VolGroup -wi-ao-- 1.97g                                               
  my_log   myvg     Vwi-a-tz 1.00g thinpool          0.00                        
  thinpool myvg     twi-a-tz 1.00g                   0.00              


(09:38:59) [root@r6-node01:~]$ lvrename myvg my_log your_log
  WARNING: Thin pool target does not support discards (needs kernel >= 3.4).
  Renamed "my_log" to "your_log" in volume group "myvg"


(09:39:24) [root@r6-node01:~]$ lvs
  LV       VG       Attr     LSize Pool     Origin Data%  Move Log Copy%  Convert
  lv_root  VolGroup -wi-ao-- 6.54g                                               
  lv_swap  VolGroup -wi-ao-- 1.97g                                               
  thinpool myvg     twi-a-tz 1.00g                   0.00                        
  your_log myvg     Vwi-a-tz 1.00g thinpool          0.00                      




Version used:
lvm2-2.02.97-2.el6.x86_64
device-mapper-1.02.76-2.el6.x86_64

Comment 11 Alasdair Kergon 2012-11-26 18:13:21 UTC
*** Bug 880331 has been marked as a duplicate of this bug. ***

Comment 12 Charles Butterfield 2012-11-26 18:19:04 UTC
Any idea when this fix (lvm2-2.02.97) will be pushed to the RHEL 6.3 and Fedora-17 updates (or even testing).  I don't see it there, but that may be due to bad looking skills on my part.

Comment 13 Alasdair Kergon 2012-11-26 18:37:05 UTC
The fix will be in RHEL6.4.  It will not be available in 6.3.

It should already be in Fedora 18.  We'd no immediate plans to put it into F17 updates, but that could be done.

Comment 14 errata-xmlrpc 2013-02-21 08:09:50 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-0501.html