[linux-lvm] deleted LV recovery: understanding metadata format and determining LV extents
Thanos Makatos
thanos.makatos at citrix.com
Sun Jan 11 10:47:46 UTC 2015
> > know how to interpret the "stripes" member. These are all linear LVs.
> >
> > stripes = [ "pv0", 306705 ]
>
> do the values make sense from a 512byte block point of view? Either as extent-size * #extents = size in 512kb blocks,
> or as an absolute offset from the beginning of PV0 device? or it might be the offset in extent-size from the beginning
> of the PV0 data area. Yeah, it's probably that.
I don't think these units are expressed in anything else but extent size units (http://tldp.org/HOWTO/LVM-HOWTO/pe.html).
I did the following test: I created two LV and compared the LVM metadata against the output of lvdisplay -m, here's what I got:
First volume, LVM metadata:
segment1 {
start_extent = 0
extent_count = 256
type = "striped"
stripe_count = 1
stripes = ["pv0", 2568]
}
First volume, lvdisplay -m:
--- Segments ---
Logical extent 0 to 255:
Type linear
Physical volume /dev/sda3
Physical extents 2568 to 2823
Second volume, LVM metadata:
segment1 {
start_extent = 0
extent_count = 2567
type = "striped"
stripe_count = 1
stripes = ["pv0", 1]
}
Second volume, lvdisplay -m:
--- Segments ---
Logical extent 0 to 2566:
Type linear
Physical volume /dev/sda3
Physical extents 1 to 2567
Or have I got it completely wrong?
More information about the linux-lvm
mailing list