On Mon, 19 Sep 2011 03:01:32 -0500
Dale <[email protected]> wrote:

> >> I'm not sure if LVM by itself implement striping. Most likely not
> >> because LVM usually starts with 1 HD then gets additional PVs
> >> added. Plus there's the possibility that the second PV has a
> >> different size.
> >>
> >> I might be wrong, though, since all my experience with LVM involves
> >> only one drive.  
> >
> > LVM does do striping according to the man page. I've never tried it,
> > mostly because LVM is the wrong place to do that IMHO.
> >
> > Use RAID for that instead and leave LVM to do what it's good at -
> > managing storage volumes
> >
> >  
> 
> What I was thinking about is this.  You have two drives that is one
> lv. It has to be data stored on both drives at some point.  Example,
> you have a data base that is 500Gbs.  You have two drives that are
> 300Gbs each that are in the same lv.  Well obviously 200Gbs has to be
> on a different drive.  Isn't that striping which would would result
> in a speed increase?
> 
> Now if it is like me and is only one drive, then that won't happen.

Think about this from a viewpoint of design.

You took two drives and put them in one big VG then assigned an LV to
the entire VG.

Now, what can you reasonably expect LVM to do with this? The obvious
answer is that PVs can be any old size and speed so LVM should just go
and do what it thinks is best. You only have one volume, there is zero
information available to the software to help it decide which PV is
better for which use, it can't look at your files on the LV and use
that to decide (LVM is clueless about fs structure and files), it
can't look at the connection type and decide to give higher priority to
Fibre connected drives in preference to USB connected drives. So the
only thing it could possibly do is maybe perhaps notice that the PVs
are the same size and maybe perhaps decide to do striping. Maybe. What
it will probably do is fill the first drive then start on the second.

Your case of two identical drives for a big database is not the usual
case for LVM, it is built to deal with VGs consisting of just about
anything. Any support it has for striping and mirroring would be
necessarily highly limited.

There is a MUCH better to do this, it's RAID which was designed to deal
with exactly this kind of thing. You know how you want those two drives
to behave, so put them in a RAID array first, set up the way you want
them. That will give you a block device that you turn into a PV, add
this single PV to a VG and make an LV from that.


-- 
Alan McKinnnon
[email protected]

Reply via email to