public inbox for gentoo-amd64@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-amd64] LVM2 Failures
@ 2007-03-05 11:53 Richard Freeman
  2007-03-05 12:18 ` Boyd Stephen Smith Jr.
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Richard Freeman @ 2007-03-05 11:53 UTC (permalink / raw
  To: gentoo-amd64

[-- Attachment #1: Type: text/plain, Size: 1840 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sorry - not really 64-bit related, but I figured somebody on this list
would know the answer to this one...

Does anybody know what happens if an LVM2 physical volume fails?
Obviously any data on that physical volume is lost, and I'd imagine any
logical volumes that reside in part or whole on that physical volume
would be a mess.

What happens to logical volumes in the same volume group which do not
reside on the lost physical volume?  Are they easily recovered?  How
about logical volumes in a different volume group - are those affected
at all?  I didn't see any documentation on this topic on the lvm2 HOWTO.

I'm contemplating adding another drive and rsyncing stuff to it.
Ideally I'd like to use lvm2 with the new drive, and just make sure the
stuff that is important to backup doesn't end up on the same physical
drive (easy enough to do).  However, I don't want the backup drive to
disappear in a puff of logic if one of the main drives fails.  On the
other hand, I like the flexibility LVM gives you in moving data around
and resizing partitions and you lose that if you start making lots of
volume groups - one day that backup drive might become my new primary drive.

I'm trying to avoid RAID as I have a small collection of hard drives at
this point and in order to set up RAID I'd need to toss just about all
of them since they're of various sizes/speeds/etc.  I already backup all
my critical stuff offline anyway - but I have tons of mythtv video
spread across multiple drives that I'd just as soon not lose in a failure.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF7ATQG4/rWKZmVWkRAob7AJ0baRQlCQ3a9ieKbAZ3ESZJSDs6hwCgyiVd
qR70JbH/23+QW4Qp2B8Zjkg=
=M1Rj
-----END PGP SIGNATURE-----

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3875 bytes --]

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

* Re: [gentoo-amd64] LVM2 Failures
  2007-03-05 11:53 [gentoo-amd64] LVM2 Failures Richard Freeman
@ 2007-03-05 12:18 ` Boyd Stephen Smith Jr.
  2007-03-05 15:24 ` dustin
  2007-03-05 16:25 ` [gentoo-amd64] " Duncan
  2 siblings, 0 replies; 4+ messages in thread
From: Boyd Stephen Smith Jr. @ 2007-03-05 12:18 UTC (permalink / raw
  To: gentoo-amd64

[-- Attachment #1: Type: text/plain, Size: 2258 bytes --]

On Monday 05 March 2007, Richard Freeman <rich@thefreemanclan.net> wrote 
about '[gentoo-amd64] LVM2 Failures':
> Does anybody know what happens if an LVM2 physical volume fails?
> Obviously any data on that physical volume is lost, and I'd imagine any
> logical volumes that reside in part or whole on that physical volume
> would be a mess.

Right on both counts (assuming you haven't mirrored those extents to a 
non-failed pv).

> What happens to logical volumes in the same volume group which do not
> reside on the lost physical volume?  Are they easily recovered?

Yes.  Simply activate your vg and lvs in partial mode (-P) and you will 
have (at least) full read access to any lvs that do not have any extents 
on the failed pv.

> How 
> about logical volumes in a different volume group - are those affected
> at all?  I didn't see any documentation on this topic on the lvm2 HOWTO.

No, vgs do not interact with one another.  All vgs without any failed pvs 
will behave completely normally.  [Well, assuming the failed disk isn't 
mucking up other things; like hanging the bus or whotnot.]

> Ideally I'd like to use lvm2 with the new drive.

LVM is nearly always a good choice, which is has been the default on 
commercial unixes for a while.

> I'm trying to avoid RAID as I have a small collection of hard drives at
> this point and in order to set up RAID I'd need to toss just about all
> of them since they're of various sizes/speeds/etc.

Ooooor....

Set up two (or 3 or 4) vgs that are roughly the same size (summed over all 
their constituent pvs).  Make a single lv on each and have all those lvs 
be the same size.  THEN, use software RAID 1 (or 5 or 6) on top of LVM.  
(I'm not sure where mirroring support is on LVM2 -- it may be a viable 
replacement for RAID 1 on top of LVM and it would simplify this setup 
greatly.)

(Linux block devices are quite flexible in how they let you (ab)use them.)

-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss03@volumehost.net                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.org/                      \_/     
New GPG Key!  Old key expires 2007-03-25.  Upgrade NOW!

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-amd64] LVM2 Failures
  2007-03-05 11:53 [gentoo-amd64] LVM2 Failures Richard Freeman
  2007-03-05 12:18 ` Boyd Stephen Smith Jr.
@ 2007-03-05 15:24 ` dustin
  2007-03-05 16:25 ` [gentoo-amd64] " Duncan
  2 siblings, 0 replies; 4+ messages in thread
From: dustin @ 2007-03-05 15:24 UTC (permalink / raw
  To: gentoo-amd64

Yes -- LVM2 will handle the case of a missing PV just fine -- the LVM
metadata is on all of the PV's, so it can figure out what the different
LVs looked like.  It will then mount the existing LV's just fine, and
refuse to mount the partially or totally corrupted LV's.

Dustin
-- 
gentoo-amd64@gentoo.org mailing list



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

* [gentoo-amd64]  Re: LVM2 Failures
  2007-03-05 11:53 [gentoo-amd64] LVM2 Failures Richard Freeman
  2007-03-05 12:18 ` Boyd Stephen Smith Jr.
  2007-03-05 15:24 ` dustin
@ 2007-03-05 16:25 ` Duncan
  2 siblings, 0 replies; 4+ messages in thread
From: Duncan @ 2007-03-05 16:25 UTC (permalink / raw
  To: gentoo-amd64

Richard Freeman <rich@thefreemanclan.net> posted
45EC04D0.3030505@thefreemanclan.net, excerpted below, on  Mon, 05 Mar 2007
06:53:52 -0500:

> Does anybody know what happens if an LVM2 physical volume fails?
> Obviously any data on that physical volume is lost, and I'd imagine any
> logical volumes that reside in part or whole on that physical volume
> would be a mess.
> 
> What happens to logical volumes in the same volume group which do not
> reside on the lost physical volume?  Are they easily recovered?  How
> about logical volumes in a different volume group - are those affected
> at all?  I didn't see any documentation on this topic on the lvm2 HOWTO.
> 
> I'm contemplating adding another drive and rsyncing stuff to it. Ideally
> I'd like to use lvm2 with the new drive, and just make sure the stuff
> that is important to backup doesn't end up on the same physical drive
> (easy enough to do).  However, I don't want the backup drive to
> disappear in a puff of logic if one of the main drives fails.

In addition to BSSJ's answer, since you are just setting up, I'd suggest 
paying particular attention to the LVM metadata sets.  It gives you a lot 
of control as to how many copies it makes and where it puts them, so just 
make sure it's saving its metadata say once or twice to each of several 
of the drives (of course NOT as files on the LVs themselves!) you 
mentioned you had in your collection, so you'll be sure and have it 
around to recover with if there's anything at all left to recover.  It'd 
suck to know what you needed was there and fine, but unavailable because 
all the metadata needed to reconstruct what was left of the volumes was 
on the drives that failed!

Here (altho my LVM is layered over RAID-6), I tweaked both the number of 
backups, and the size of the history, thus providing me rather more of a 
redundancy safety margin, just in case.

You'll also want to keep redundant copies of the recovery tools around, 
as all that metadata won't do a lot of good if LVM isn't loading it and 
you can't tell why because the recovery tools are either on the LVM 
themselves, or were lost with the drive(s) that went out.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

-- 
gentoo-amd64@gentoo.org mailing list



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

end of thread, other threads:[~2007-03-05 16:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-05 11:53 [gentoo-amd64] LVM2 Failures Richard Freeman
2007-03-05 12:18 ` Boyd Stephen Smith Jr.
2007-03-05 15:24 ` dustin
2007-03-05 16:25 ` [gentoo-amd64] " Duncan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox