[linux-lvm] LVM2 on-disk layout

Jayson Vantuyl jvantuyl at engineyard.com
Mon Jan 5 20:11:26 UTC 2009

The reason the metadata wraps around is to decrease the likelihood of  
losing all your metadata if a failure happens during an update.

If you always write from the beginning of the area, then any partial  
write guarantees a complete loss.  If you always start part-way  
through, then you only lose data when your metadata approaches the  
full size of the MDA.  Since this is most likely an issue with small  
arrays (where there are few disks and you may only have 1 or 2 MDAs),  
this gives vastly greater chances of recovery.

Also, even in the event of a failure, you are likely to get the  
beginning of the new data + end the of the old data--which is more  
recoverable (by hand) than the alternatives.

It's all about increasing chances of recoverability in the event of a  

On Jan 5, 2009, at 2:22 AM, Tejas Sumant wrote:

> I have few questions on lvm2 layout.
> 1) Why array of MDA (metadata area) is required? Isnt single MDA  
> sufficient?
> 2) Which MDA is current?
> 3) Why the metadata inside MDA wraps around, instead of the offset
> pointing to the start of metadata?
> Can somebody kindly answers this?
> -- 
> Tejas Sumant
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Jayson Vantuyl
Systems Architect
Engine Yard
jvantuyl at engineyard.com
1 866 518 9275 ext 204
IRC (freenode): kagato

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20090105/eafefabd/attachment.htm>

More information about the linux-lvm mailing list