From: Milan Broz <mbroz@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: Jewsco Pius Jacquez <JewscoPius.Jacquez@Amdocs.com>
Subject: Re: [linux-lvm] metadata copies
Date: Thu, 11 Aug 2011 11:11:51 +0200 [thread overview]
Message-ID: <4E439CD7.2010105@redhat.com> (raw)
In-Reply-To: <alpine.LRH.2.00.1108101650150.10808@bmsred.bmsi.com>
On 08/10/2011 11:00 PM, Stuart D. Gathman wrote:
> What happens if there are 2 or more metadata copies with the same sequence
> ID, but different contents? Not just buggy/malicious code can cause this.
> Imagine that a careless admin removes a PV, puts it on another system,
> independently updates both systems for a while, then later adds the PV back to
> the original system (and the seqnos match).
I did not mention two other checks:
- there is a checksum of text metadata in PV header, so random
corruption is detected
- the whole update process is atomic, there is a round buffer, new
version of metadata is written and if done successfully, atomic
sector update changes just pointer (so either new or old version is active)
> 2) I suspect there is no clever algorithm, and it probably uses the first
> valid copy seen with the highest sequence. AIX had a "quorum" system
> where the majority of metadata copies had to agree - or operator intervention
> was required to bring the VG online.
Metadata should be updated on all PVs when the code detect inconsistency.
TBH I am not sure if this happens in every malicious situation
(correct metadata versions with different content but the same ID).
Maybe if anyone want to try it - report a bug if there is a problem
handling it. (IMHO this check should be somehow added to vgck.)
Anyway, there is date, lvm version, full command and system name written
to text metadata (from the system where it was written), so manual admin
interaction should be trivial - just vgcfgrestore proper backup file.)
Milan
prev parent reply other threads:[~2011-08-11 9:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-10 16:30 [linux-lvm] metadata copies Jewsco Pius Jacquez
2011-08-10 20:04 ` Milan Broz
2011-08-10 21:00 ` Stuart D. Gathman
2011-08-11 9:11 ` 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=4E439CD7.2010105@redhat.com \
--to=mbroz@redhat.com \
--cc=JewscoPius.Jacquez@Amdocs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).