[lug] lvm and physical volume worries

Sean Reifschneider jafo at tummy.com
Wed Jan 31 22:03:33 MST 2007


On Tue, Jan 30, 2007 at 10:26:42PM -0800, karl horlen wrote:
>I keep seeing an occasional warning in LVM posts and
>documentation that you should NOT span LVM across

If you are using LVM to *NOT* span data across discs, why are you using LVM
at all?

It boils down to this: if you lose a disc, any data that's on it that
doesn't exist elsewhere is gone.  If you're worried about the system
staying up, that replication should be in RAID.  If you're just worried
about the data, it can be a backup.

>Are they talking about SPANNING the entire VG (volume
>group) or just an individual LV (logical volume) in a
>VG over multiple PVs?  

If a LV exists ONLY on one device, and that device isn't dead, you're
probably fine as far as accessing it.  If any of the extents exist on the
a dead device, access may be problematic or non-existant.

>The reason I ask is because assuming a VG consists of
>multiple PVs, there is no way that I know of that you
>can tell the LV which PV[s] to actually use.  And

You should read the "lvcreate" and "lvm" man pages for more information
about allocation policies.  You *CAN* influence the allocation to try to
fit things on a single PV.  Also, the "lvextend" man page includes an
example of adding extents from a particular PV.  Note that lvcreate and
lvextend can take a "PhysicalVolumePath" option...

>So the way I'm reading this is that the minute you
>lose any PV in a VG you lose the entire VG.  Can
>someone confirm this?

I would doubt that is true.  You'll have to try it to confirm, I'm not
going to take a volume out of one of my production systems to see what
happens.  :-)

>If that's the case, then LVM is severely limited in
>multi PV configurations.  Or at least it means that

Of course it's not!  If you lose a disc, bad things will happen.  It's like
you're shocked that Linux is of limited use because if one of the systems
CPUs freaks out you will have problems.  If you can't stand a drive
failure, you'd best be running RAID.  That's why it exists...

If you care about the integrity of your data, have backups.  Simple as
that.  LVM doesn't make this new and different.  Hint: lvcreate has a
"--mirrors" option.

Sean
-- 
 "Moral indignation is jealousy with a halo."
                 -- H. G. Wells
Sean Reifschneider, Member of Technical Staff <jafo at tummy.com>
tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability




More information about the LUG mailing list