linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Losing one of various PVs in VG
@ 2010-11-25 18:39 Spelic
  2010-12-03 16:43 ` Stuart D. Gathman
  0 siblings, 1 reply; 2+ messages in thread
From: Spelic @ 2010-11-25 18:39 UTC (permalink / raw)
  To: linux-lvm

Hi all,
I am planning our new storage system.

I would like the ability to migrate LVs between the various RAID arrays 
we have.
This would require we have a PV per array and all PVs under the same VG.

Now I'm wondering what happens if we lose an array: all data on all 
arrays will be lost because the VG is lost?

I did spot one way to prevent this:

I could create one VG per PV, then just before the migration I would do 
vgmerge between the two VGs source and destination, then perform 
migration of the LV with pvmove, then wait for it to complete (by not 
sending it to background probably), then do vgsplit to return to initial 
condition.

It's quite complex and unconvenient though. Also if I forget to wait 
completion for pvmove and/or I forget to do vgsplit, and then one of the 
two array fails, I would probably lose data from both.

What do you suggest?

Thanks for your help

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

* Re: [linux-lvm] Losing one of various PVs in VG
  2010-11-25 18:39 [linux-lvm] Losing one of various PVs in VG Spelic
@ 2010-12-03 16:43 ` Stuart D. Gathman
  0 siblings, 0 replies; 2+ messages in thread
From: Stuart D. Gathman @ 2010-12-03 16:43 UTC (permalink / raw)
  To: LVM general discussion and development

On Thu, 25 Nov 2010, Spelic wrote:

> Now I'm wondering what happens if we lose an array: all data on all arrays
> will be lost because the VG is lost?

No.

If you use LVM level raid0 (striping) on a particular LV, then losing any
component of the stripe will lose the LV (but not the VG).

If you use LVM level raid1 (mirroring) on a particular LV, then losing
any component of the mirror does not lose the LV (or the VG).

For linear LVs (extents on minimum number of PVs), losing a PV used by 
the LV will lose the LV, but not the VG.

You do not gain anything by assigning a separate VG to each array -
unless you want to be able to easily remove the array.

-- 
	      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] 2+ messages in thread

end of thread, other threads:[~2010-12-03 16:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-25 18:39 [linux-lvm] Losing one of various PVs in VG Spelic
2010-12-03 16:43 ` Stuart D. Gathman

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