Red Hat Bugzilla – Bug 204085
vgextend command does not accept VG name prepended with /dev
Last modified: 2007-11-30 17:07:27 EST
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.
This event sent from IssueTracker by jlayton [Support Engineering Group]
Created attachment 134916 [details]
untested patch that does the same thing that vgcreate seems to do with respect
Created attachment 134925 [details]
Same as first patch, but also fix up vgreduce and vgmerge.
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.
Created attachment 134938 [details]
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.
QE ack for 4.5.
This actually got fixed upstream last August (for most of those commands) in