[linux-lvm] LVM tools return ECMD_FAILED when they shouldn't (exported vg)
oren at held.org.il
Sun Jul 25 14:57:04 UTC 2010
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"
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
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1240 bytes
Desc: not available
More information about the linux-lvm