On 05/07/2013 04:29 AM, Osier Yang wrote:
If the volume is of a clustered volume group, and not active, the
related pool APIs fails on open /dev/vg/lv. If the volume is suspended,
it hangs on open(2) the volume.
Though the best solution is to expose the volume status in volume
XML, and even better to provide API to active/deactive the volume,
but it's not the work I want to touch currently. Volume status in
other status is just fine to skip.
Yeah, nice ideas for future improvement, and not as important as fixing
the bug now.
About the 5th field of lv_attr (from man lvs)
5 State: (a)ctive, (s)uspended, (I)nvalid snapshot, invalid
(S)uspended snapshot, snapshot (m)erge failed,suspended
snapshot (M)erge failed, mapped (d)evice present without
tables, mapped device present with (i)nactive table
src/storage/storage_backend_logical.c | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
int i, err, nextents, nvars, ret = -1;
+ const char *attrs = groups;
+ /* Skip not active volume */