From: Milan Broz <mbroz@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] LVM2 on-disk layout
Date: Mon, 05 Jan 2009 21:14:34 +0100 [thread overview]
Message-ID: <49626A2A.80709@redhat.com> (raw)
In-Reply-To: <ffa0f8300901050222y2083fbb1pbbc4bdb5c10aeb5a@mail.gmail.com>
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
prev parent reply other threads:[~2009-01-05 20:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-05 10:22 [linux-lvm] LVM2 on-disk layout Tejas Sumant
2009-01-05 18:49 ` Stuart D. Gathman
2009-01-05 20:08 ` malahal
2009-01-06 10:47 ` Bryn M. Reeves
2009-01-05 20:11 ` Jayson Vantuyl
2009-01-05 20:14 ` Milan Broz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49626A2A.80709@redhat.com \
--to=mbroz@redhat.com \
--cc=linux-lvm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.