linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Poison pills
@ 2007-10-03 19:06 Stuart D. Gathman
  2007-10-03 19:28 ` Alasdair G Kergon
  2007-10-03 21:47 ` malahal
  0 siblings, 2 replies; 5+ messages in thread
From: Stuart D. Gathman @ 2007-10-03 19:06 UTC (permalink / raw)
  To: linux-lvm

I have an old server with a VG named "rootvg".  (AIX roots showing.) I
just bought a new server, and it now has a volume group named "rootvg".
I plan to remove the disk from the old server, put it in a USB enclosure, 
and put it on the new server to access old files and use for backup.

To be safe, I will rename the volume grouip on the old machine first.  But 
I'm curious.  What would happen if I connected the PV with a duplicate VG 
name?  The VGIDs will be different, so hopefully the system will keep them 
separate somehow.  Will it refuse to activate the hot plugged VG because 
of the differing VGID?  Will it let me rename it without activating?

That brings up the subject of "poison pills".  Suppose I added a PV with a 
matching VGID?  That was created maliciously to mess up my system, or is 
just an old PV that I disconnected from the VG (before the vgreduce) that 
I forgot about.  Is this a poison pill?  It would have a unique PVID that 
is not listed in the metadata for the existing VG, but how does the system 
know which metadata to believe?  AIX used a "quorum" voting system to 
prevent accidental poison pills.  What happens in linux LVM?  If it sees 
two conflicting metadatas for the same VGID, what happens?

I think an inexpensive torture test of this logic is to get 3 or 4 external USB
drives, put them all in a VG, and start playing games with hotplugging them.
(E.g. unplug drive, vgreduce, plug drive back in).

-- 
	      Stuart D. Gathman <stuart@bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Poison pills
  2007-10-03 19:06 [linux-lvm] Poison pills Stuart D. Gathman
@ 2007-10-03 19:28 ` Alasdair G Kergon
  2007-10-03 21:47 ` malahal
  1 sibling, 0 replies; 5+ messages in thread
From: Alasdair G Kergon @ 2007-10-03 19:28 UTC (permalink / raw)
  To: LVM general discussion and development

On Wed, Oct 03, 2007 at 03:06:42PM -0400, Stuart D. Gathman wrote:
> What happens in linux LVM?  If it sees 
> two conflicting metadatas for the same VGID, what happens?
 
It'll apply some simple rules to distinguish them (e.g. if one has the
current hostname written into its metadata identifying the machine where
it was created and the other doesn't it'll select that one), but if it
can't tell them apart it will pick one at random (not in the strict
sense of that word - in identical external conditions it'll always
choose the same one) and use that.   [The hostname test is less use than
you might think, as many VGs are created with identical hostnames during
installation, and others are accessed early in the boot sequence before
the hostname has been set.]

BTW vgrename accepts the VGID as a parameter.

Alasdair
-- 
agk@redhat.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Poison pills
  2007-10-03 19:06 [linux-lvm] Poison pills Stuart D. Gathman
  2007-10-03 19:28 ` Alasdair G Kergon
@ 2007-10-03 21:47 ` malahal
  2007-10-04 16:13   ` Stuart D. Gathman
  1 sibling, 1 reply; 5+ messages in thread
From: malahal @ 2007-10-03 21:47 UTC (permalink / raw)
  To: Stuart D. Gathman; +Cc: linux-lvm

It would be a lot cheaper if you can test it with loop devices!

Stuart D. Gathman [stuart@bmsi.com] wrote:
> I think an inexpensive torture test of this logic is to get 3 or 4 external USB
> drives, put them all in a VG, and start playing games with hotplugging them.
> (E.g. unplug drive, vgreduce, plug drive back in).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Poison pills
  2007-10-03 21:47 ` malahal
@ 2007-10-04 16:13   ` Stuart D. Gathman
  2007-10-04 17:57     ` malahal
  0 siblings, 1 reply; 5+ messages in thread
From: Stuart D. Gathman @ 2007-10-04 16:13 UTC (permalink / raw)
  To: malahal; +Cc: linux-lvm

On Wed, 3 Oct 2007 malahal@us.ibm.com wrote:

> It would be a lot cheaper if you can test it with loop devices!

Loop devices don't let you disconnect them while active (or at least they
complain and I've never tried to override them).  The torture test is
removing the drive while active in the VG, file system mounted, etc.

> Stuart D. Gathman [stuart@bmsi.com] wrote:
> > I think an inexpensive torture test of this logic is to get 3 or 4 external USB
> > drives, put them all in a VG, and start playing games with hotplugging them.
> > (E.g. unplug drive, vgreduce, plug drive back in).

-- 
	      Stuart D. Gathman <stuart@bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Poison pills
  2007-10-04 16:13   ` Stuart D. Gathman
@ 2007-10-04 17:57     ` malahal
  0 siblings, 0 replies; 5+ messages in thread
From: malahal @ 2007-10-04 17:57 UTC (permalink / raw)
  To: linux-lvm

You may be able to place the flakey target on top of loop device to simulate device failure.

-Malahal.

Stuart D. Gathman [stuart@bmsi.com] wrote:
> On Wed, 3 Oct 2007 malahal@us.ibm.com wrote:
> 
> > It would be a lot cheaper if you can test it with loop devices!
> 
> Loop devices don't let you disconnect them while active (or at least they
> complain and I've never tried to override them).  The torture test is
> removing the drive while active in the VG, file system mounted, etc.
> 
> > Stuart D. Gathman [stuart@bmsi.com] wrote:
> > > I think an inexpensive torture test of this logic is to get 3 or 4 external USB
> > > drives, put them all in a VG, and start playing games with hotplugging them.
> > > (E.g. unplug drive, vgreduce, plug drive back in).
> 
> -- 
> 	      Stuart D. Gathman <stuart@bmsi.com>
>     Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
> "Confutatis maledictis, flammis acribus addictis" - background song for
> a Microsoft sponsored "Where do you want to go from here?" commercial.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-10-04 17:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-03 19:06 [linux-lvm] Poison pills Stuart D. Gathman
2007-10-03 19:28 ` Alasdair G Kergon
2007-10-03 21:47 ` malahal
2007-10-04 16:13   ` Stuart D. Gathman
2007-10-04 17:57     ` malahal

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).