Red Hat Bugzilla – Bug 193543
'vgs' with options from 'pvs' treats arguments as PVs not VGs
Last modified: 2013-02-28 23:04:19 EST
Using the command "vgs --options vg_name,pv_name" is possible to show all the
VG configured in the system with the related PV.
According to the vgs man page is possible to append to the command a specific VG
name to filter the output information. If you do so (e.g. "vgs --options
vg_name,pv_name mainvolume" where "mainvolume" is one existent volume name) the
command interpret the volume name as a physical volume name (as in pvs command).
Yes, that needs to be fixed in all the reporting commands.
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Created attachment 144217 [details]
Brief analysis of code paths and possible approaches
I spent some time looking at this and could not come up with a simple fix. I
think it requires some thought or insight I do not yet have - do not completely
grok the lvm code yet - or requires some rework of the code. Attached my
analysis in #6.
Note though that the issue of specifying vgs on the cmdline is really just
filtering the output, and this can be done by piping to awk, perl, etc - might
not be pretty in some larger deployments though and certainly not efficient.
Created attachment 146730 [details]
attempt to fix
Fix need review and maybe rewrite, sent to agk.
Comment on attachment 146730 [details]
attempt to fix
Fixed upstream by another commit
to be included in lvm2-2.02.21-1.el4
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.