1 |
On Mon, 19 Sep 2011 03:01:32 -0500 |
2 |
Dale <rdalek1967@×××××.com> wrote: |
3 |
|
4 |
> >> I'm not sure if LVM by itself implement striping. Most likely not |
5 |
> >> because LVM usually starts with 1 HD then gets additional PVs |
6 |
> >> added. Plus there's the possibility that the second PV has a |
7 |
> >> different size. |
8 |
> >> |
9 |
> >> I might be wrong, though, since all my experience with LVM involves |
10 |
> >> only one drive. |
11 |
> > |
12 |
> > LVM does do striping according to the man page. I've never tried it, |
13 |
> > mostly because LVM is the wrong place to do that IMHO. |
14 |
> > |
15 |
> > Use RAID for that instead and leave LVM to do what it's good at - |
16 |
> > managing storage volumes |
17 |
> > |
18 |
> > |
19 |
> |
20 |
> What I was thinking about is this. You have two drives that is one |
21 |
> lv. It has to be data stored on both drives at some point. Example, |
22 |
> you have a data base that is 500Gbs. You have two drives that are |
23 |
> 300Gbs each that are in the same lv. Well obviously 200Gbs has to be |
24 |
> on a different drive. Isn't that striping which would would result |
25 |
> in a speed increase? |
26 |
> |
27 |
> Now if it is like me and is only one drive, then that won't happen. |
28 |
|
29 |
Think about this from a viewpoint of design. |
30 |
|
31 |
You took two drives and put them in one big VG then assigned an LV to |
32 |
the entire VG. |
33 |
|
34 |
Now, what can you reasonably expect LVM to do with this? The obvious |
35 |
answer is that PVs can be any old size and speed so LVM should just go |
36 |
and do what it thinks is best. You only have one volume, there is zero |
37 |
information available to the software to help it decide which PV is |
38 |
better for which use, it can't look at your files on the LV and use |
39 |
that to decide (LVM is clueless about fs structure and files), it |
40 |
can't look at the connection type and decide to give higher priority to |
41 |
Fibre connected drives in preference to USB connected drives. So the |
42 |
only thing it could possibly do is maybe perhaps notice that the PVs |
43 |
are the same size and maybe perhaps decide to do striping. Maybe. What |
44 |
it will probably do is fill the first drive then start on the second. |
45 |
|
46 |
Your case of two identical drives for a big database is not the usual |
47 |
case for LVM, it is built to deal with VGs consisting of just about |
48 |
anything. Any support it has for striping and mirroring would be |
49 |
necessarily highly limited. |
50 |
|
51 |
There is a MUCH better to do this, it's RAID which was designed to deal |
52 |
with exactly this kind of thing. You know how you want those two drives |
53 |
to behave, so put them in a RAID array first, set up the way you want |
54 |
them. That will give you a block device that you turn into a PV, add |
55 |
this single PV to a VG and make an LV from that. |
56 |
|
57 |
|
58 |
-- |
59 |
Alan McKinnnon |
60 |
alan.mckinnon@×××××.com |