[CentOS] LVM & Stripe

Tue Mar 9 12:14:15 UTC 2010
Lincoln Zuljewic Silva <lincolnzsilva at gmail.com>

Christopher and Ross,

Thanks for the tips. I will make some tests using md and check performance.

Unfortunately I can't move the data to another LV to setup a new
stripe value when a new PV is added.

Thanks

Lincoln

On Mon, Mar 8, 2010 at 10:43 PM, Ross Walker <rswwalker at gmail.com> wrote:
> On Mar 8, 2010, at 7:31 PM, Christopher Chan <christopher.chan at bradbury.edu.hk
>  > wrote:
>
>> On Tuesday, March 09, 2010 06:40 AM, Lincoln Zuljewic Silva wrote:
>>> Hello list,
>>>
>>> I have a question about LVM.
>>>
>>> My server has five disks and I will use it to create a LVM
>>> environment.
>>>
>>> I saw in the lvcreate man page that I can use the “-i” option to
>>> set
>>> the number of disks that I want to stripe the lvols, but this option
>>> doesn’t exists in the “lvchange” option (in case I add new
>>> disks to
>>> the VG).
>>>
>>> I had in mind: create 10 lvols – “lvcreate -i5 -L 10G MyVG
>>> /dev/MyVG/lvol[1-10]” and in the future, add more disks and incre
>>> ate
>>> the stripe value of the existing lvols.
>>
>> I would recommend md striping over lvm but then lvm is a bit more
>> flexible on that score if you have disks of varying size. What are you
>> using as your physical volumes?
>
> I actually like mdraid for raid1s then striping them with LVM for
> raid10s and it has the added benefit of passing the config to the file
> system during mkfs so it sets the chunk size and stripe width
> appropriately.
>
>>>
>>> Does anybody knows how to change the parameter “-i" of a lvol that
>>> already exists?
>>
>> It appears to be fixed at creation time. Kinda hard to let you mess
>> around with stripesize and what not after stuff has been laid out on
>> the
>> platters.
>
> Yeah, unfortunately you can't change the interleave of a LV. You need
> to keep around 20% in reserve so when you add another PV you can
> create a new LV with the new interleave and then copy or dump/restore
> from the old LV to the new, delete the old LV, and repeat for the
> other LVs in the group. Remember to start with your largest to your
> smallest LVs.
>
> -Ross
>
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>



-- 
Lincoln Zuljewic Silva
More contact info.: http://www.system.adm.br/contact.php

"How often must a question be asked before it’s considered a
frequently asked question?"