[linux-lvm] vgs result code error
Ron Johnson
ron.l.johnson at cox.net
Tue Jul 21 09:41:46 UTC 2009
On 2009-07-21 04:08, Masanari Iida wrote:
> Thanks for reply.
>
>> You specified a PV, not a VG. Try:
>> # vgs vg01
>
> Yes I know it should work.
>
> # vgs vg01
> VG #PV #LV #SN Attr VSize VFree
> vg01 1 0 0 wz--n- 3.82G 3.82G
>
>
> The point I want to say is, vgs command _should_ return non-zero
> exit status value, if vgs command returned an error.
Sorry.
> Reference: man lvm(8)
>
> DIAGNOSTICS
> All tools return a status code of zero on success or non-zero on fail-
> ure.
[snip]
> I have found this bug on RHEL5 (which uses lvm2.02.40-6) and
> I have checked out WHATS_NEW between 2.02-40 to 49,
> so far no similar symptom.
Debian Sid's 2.02.44-3 returns a non-zero code, so either RH fixed
it upstream, or Debian patched it...
# vgs --version
WARNING: Ignoring duplicate config node: filter (seeking filter)
LVM version: 2.02.44 (2009-01-26)
Library version: 1.02.30 (2009-01-26)
Driver version: 4.14.0
# vgs /dev/sdc1
WARNING: Ignoring duplicate config node: filter (seeking filter)
Volume group "sdc1" not found
# echo $?
5
--
Scooty Puff, Sr
The Doom-Bringer
More information about the linux-lvm
mailing list