On Monday, September 19, 2011 03:01:32 AM Dale wrote:
> Alan McKinnon wrote:
> > On Mon, 19 Sep 2011 13:51:03 +0700
> > 
> > Pandu Poluan<[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?

I think you're using the wrong names for the different pieces.
The 2 300GB drives will be Physical Volumes (PV)
These 2 PVs are in the Volume Group (VG)
This VG has 1 LV for database.

This LV, as it's at least 500GB will have parts on both PVs (harddrives)

This will have increased performance when the data being read happens to be on 
2 physically different drives. If you just extend over 2 (or more) drives, 
this is not very likely as the first 300GB of data will still, physically, be 
on the same drive.

To spread the data more equally (eg. sequential parts will be on alternating 
drives) you have 2 options:
1) Merge the 2 drives in a single RAID0-device (for striping)
2) Tell LVM to use striping for the LV when creating it.

My personal preference would be option 1 as I agree with Alan that LVM should 
stick to managing LVs and leave striping and other options to RAID-
devices/software.

> Now if it is like me and is only one drive, then that won't happen.

With only one drive, definitely not :)

--
Joost

Reply via email to