[lvm-devel] [PATCH] Scan also special metadata areas (like metadata/dirs) in fmt_from_vgname

Alasdair G Kergon agk at redhat.com
Mon Nov 29 23:54:32 UTC 2010


On Fri, Nov 26, 2010 at 04:50:53PM +0100, Peter Rajnoha wrote:
> We reread labels and metadata from raw devices in fmt_from_vgname function,
> but we forgot to read special metadata areas? (like dirs defined by metadata/dirs
> config setting) Anyway, can someone remind me why we do scanning inside this fn
> at all?
 
We don't.

fmt_from_vgname *just* looks for the VG in the cache.  If it's not there, it
returns nothing.  If it *is* there, it rereads the PV metadata to check it's
still current.  Any scanning is the responsibility of the caller.

> Without this patch, we will fail to find a VG when metadata/dirs is only
> used and there are no other metadata areas (which is itself a strange situation,

Not at all strange.  If that's broken now, I'm afraid the fix lies elsewhere...

Alasdair




More information about the lvm-devel mailing list