Bug 204085

Summary: vgextend command does not accept VG name prepended with /dev
Product: Red Hat Enterprise Linux 4 Reporter: Issue Tracker <tao>
Component: lvm2Assignee: Alasdair Kergon <agk>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: agk, dwysocha, mbroz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.02.10-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-09 21:23:59 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:
Attachments:
Description Flags
patch1
none
patch 2
none
patch3 none

Comment 1 Issue Tracker 2006-08-25 14:07:59 UTC
Customer reports an inconsistency in the use of vgextend lvm command. In the lvm man page is stated: 
               "Where  commands  take  VG or LV names as arguments, the full path name is optional." 
but not all the commands seems to accept the full path name. For instance:

[root@<hostname> ~]#  vgcreate /dev/vg_test /dev/cciss/c0d1

   Volume group "vg_test" successfully created

[root@<hostname> ~]#  vgextend /dev/vg_test /dev/cciss/c0d2
   /var/lock/lvm/V_/dev/vg_test: open failed: No such file or directory
   Can't get lock for /dev/vg_test

but we can use "vgextend" with just VG name and we do not get errors:

[root@<hostname> ~]# vgextend       vg_test /dev/cciss/c0d2
   Volume group "vg_test" successfully extended


"vgcreate" and "vgremove" accept both a VG name or a full path name as argument as specifyed in the "man lvm" documentation.

Thanks
This event sent from IssueTracker by jlayton  [Support Engineering Group]
 issue 100325

Comment 2 Jeff Layton 2006-08-25 14:10:03 UTC
Created attachment 134916 [details]
patch1

untested patch that does the same thing that vgcreate seems to do with respect
to this.

Comment 3 Jeff Layton 2006-08-25 14:52:54 UTC
Created attachment 134925 [details]
patch 2

Same as first patch, but also fix up vgreduce and vgmerge.

Comment 4 Jeff Layton 2006-08-25 14:57:46 UTC
The patch works with vgextend and vgreduce. I have not been able to test vgmerge
yet, however. This patch should probably get applied to the devel branch
sometime soon. I'll clone the BZ for that in a bit.

There may be other commands as well that still need to be fixed up this way.


Comment 6 Jeff Layton 2006-08-25 17:13:00 UTC
Created attachment 134938 [details]
patch3

I think this should be the final one. The rest of the vg* commands all look
like they do the correct thing wrt dev_dir names.

Comment 8 Jay Turner 2006-08-28 00:25:56 UTC
QE ack for 4.5.

Comment 11 Alasdair Kergon 2007-03-09 21:20:46 UTC
This actually got fixed upstream last August (for most of those commands) in
version 2.02.10.