Re: LVM2 on-disk layout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tejas Sumant wrote:
> 3) Why the metadata inside MDA wraps around, instead of the offset
> pointing to the start of metadata?

Metadata updates run in two steps:

- write() saves the new metadata to new place (circular buffer)
but still keeping previous version active.
(Also operation can be safely reverted here, because there
are still old version of metadata prepared.)

- commit() switch the pointer to new offset and activate
new metadata. This operation is atomic (one synchronous sector write)
so it cannot corrupt active metadata copy.
(If the write fails, old metadata are still valid.)

(Imagine for example power failure during metadata write operation.)

There is serial number in metadata, lvm will update mda content to newest
metadata if any copies are older.


Milan
--
mbroz@redhat.com

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux