[linux-lvm] Strange PV metadata issue

Alex Brett alex at alexbrett.net
Mon Jan 12 09:32:36 UTC 2009


Alex Brett wrote:
> I assume what's happened (I'm no expert in lvm at all, so a lot of this
> is guessing) is that when I (stupidly) ran pvresize on the disk before
> rebooting, it somehow created this second metadata area, which the mkfs
> of my new LV overwrote in some way.
> 
> Looking at the LVs that exist and their stripes, I'm fairly sure that
> this metadata area is *inside* the new 500G LV that I created, since
> that shows up as:
> 
>                         segment1 {
>                                 start_extent = 0
>                                 extent_count = 128000   # 500 Gigabytes
> 
>                                 type = "striped"
>                                 stripe_count = 1        # linear
> 
>                                 stripes = [
>                                         "pv0", 128000
>                                 ]
>                         }
> which obviously seems wrong to me!
> 
> Can anybody suggest a way of dealing with this - can I manually edit the
> data on the partition to remove any reference to this second metadata
> area some how? Ideally I'd copy all the data off, and start from
> scratch, but unfortunately I don't have enough storage space to do that!
> 

For anybody interested - I managed to fix this by forcing the pvcreate
with -ff, specifying only 1 metadata copy (not sure if I needed this bit
or not) and then a vgcfgrestore did the trick - all seems happy now :)

Alex




More information about the linux-lvm mailing list