[linux-lvm] [PATCH] lib/metadata: add new api lv_is_available()

David Teigland teigland at redhat.com
Mon Aug 31 22:37:24 UTC 2020


On Sun, Aug 30, 2020 at 11:49:38PM +0800, heming.zhao at suse.com wrote:
> in my opinion, the 'not available'

We already use the word available/unavailable in other ways, so let's use
"broken" for the moment, maybe we can find a better word.

'lvs -o broken' would report 0|1.  Choosing an attr letter to represent
that is not as important and can be decided on later.

> means the LV can't correctly do r/w io.
>
> for raid, if the missing or breaking underlying devs number beyond raid level limit. the 
> 'not available' shoud be display.
> 
> for linear, any one of underlying dev is missing, upper layer module like fs may don't work
> (e.g. missing first disk, fs will missing w/r first disk's super-block metadata). the
> 'not available' should be display.

That definition of "broken" could be a specific enough, if we can report
it accurately enough.  Do we need to say "io will succeed on the entire LV
(as far as lvm knows)"?  It would be nice to know in which cases lvm can
report it accurately, and in which cases lvm doesn't know enough to report
it accurately.  If it's not correct in many cases, then we should consider
a different definition (maybe raid-specific.)

> for other type LV, I don't have too much experience to answer this question.

Any LV not using raid (or mirror) will be equivalant to linear, and be
broken if a single disk is missing or broken.

Dave




More information about the linux-lvm mailing list