[linux-lvm] LVM tools return ECMD_FAILED when they shouldn't (exported vg)

Oren Held oren at held.org.il
Sun Jul 25 14:57:04 UTC 2010


Hi All,

We have encountered an unexpected behavior, in which 'lvs' command
behaves well (lists the LV's) but still returns rc==5. Well, the reason
is that we've had an exported vg. It's indeed something the user might
care about, yet its severity should be less than other "failed command"
situations.

What I suggest, is adding a new error type "EXPORTED_VG_WARNING", for
these cases, that would be returned by toollib.c's
process_each_lv_in_vg() function in this specific case of
failure-because-vg-is-exported.

I've used error number 4 (it seemed available), because the erroring
mechanism in process_each_lv cares about the error number's value, so it
should be lower than ECMD_FAILED.

Attached is the patch.

Best Regards

Oren Held
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm-distinguish-between-fail-and-exported-vg-status.patch
Type: text/x-patch
Size: 1240 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20100725/d8391b29/attachment.bin>


More information about the linux-lvm mailing list