* [linux-lvm] stripped LV with segments vs one segment
@ 2017-04-10 9:29 lejeczek
2017-04-10 11:03 ` Zdenek Kabelac
0 siblings, 1 reply; 10+ messages in thread
From: lejeczek @ 2017-04-10 9:29 UTC (permalink / raw)
To: LVM general discussion and development
hi there
I could not extend my stripped LV, had 3 stripes and wanted
to add one more.
Only way LVM let me do it was where I ended up with this:
--- Segments ---
Logical extents 0 to 751169:
Type striped
Stripes 3
Stripe size 16.00 KiB
Stripe 0:
Physical volume /dev/sdd
Physical extents 0 to 250389
Stripe 1:
Physical volume /dev/sde
Physical extents 0 to 250389
Stripe 2:
Physical volume /dev/sdc
Physical extents 0 to 250389
Logical extents 751170 to 1001559:
Type linear
Physical volume /dev/sdf
Physical extents 0 to 250389
1st question - was this really the only way LVM would extend?
2nd - is there performance penalty with segments like above
vs one stripped segment?
many thanks,
L.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] stripped LV with segments vs one segment
2017-04-10 9:29 [linux-lvm] stripped LV with segments vs one segment lejeczek
@ 2017-04-10 11:03 ` Zdenek Kabelac
2017-04-10 11:16 ` lejeczek
0 siblings, 1 reply; 10+ messages in thread
From: Zdenek Kabelac @ 2017-04-10 11:03 UTC (permalink / raw)
To: LVM general discussion and development, peljasz
Dne 10.4.2017 v 11:29 lejeczek napsal(a):
> hi there
>
> I could not extend my stripped LV, had 3 stripes and wanted to add one more.
> Only way LVM let me do it was where I ended up with this:
>
> --- Segments ---
> Logical extents 0 to 751169:
> Type striped
> Stripes 3
> Stripe size 16.00 KiB
> Stripe 0:
> Physical volume /dev/sdd
> Physical extents 0 to 250389
> Stripe 1:
> Physical volume /dev/sde
> Physical extents 0 to 250389
> Stripe 2:
> Physical volume /dev/sdc
> Physical extents 0 to 250389
>
> Logical extents 751170 to 1001559:
> Type linear
> Physical volume /dev/sdf
> Physical extents 0 to 250389
>
> 1st question - was this really the only way LVM would extend?
> 2nd - is there performance penalty with segments like above vs one stripped
> segment?
>
Hi
Not really sure what you aim to do.
If you have LV segment with 3 stripes - you have to keep also extension using
3 stripes - you can't have 1st. halve of LV spanning 3 disk and add there a
new LV segment as linear - as listed in this post.
Both segments must by striped.
Regards
Zdenek
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] stripped LV with segments vs one segment
2017-04-10 11:03 ` Zdenek Kabelac
@ 2017-04-10 11:16 ` lejeczek
2017-04-10 12:27 ` Marian Csontos
2017-04-10 14:19 ` Zdenek Kabelac
0 siblings, 2 replies; 10+ messages in thread
From: lejeczek @ 2017-04-10 11:16 UTC (permalink / raw)
To: Zdenek Kabelac, LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 1992 bytes --]
On 10/04/17 12:03, Zdenek Kabelac wrote:
> Dne 10.4.2017 v 11:29 lejeczek napsal(a):
>> hi there
>>
>> I could not extend my stripped LV, had 3 stripes and
>> wanted to add one more.
>> Only way LVM let me do it was where I ended up with this:
>>
>> --- Segments ---
>> Logical extents 0 to 751169:
>> Type striped
>> Stripes 3
>> Stripe size 16.00 KiB
>> Stripe 0:
>> Physical volume /dev/sdd
>> Physical extents 0 to 250389
>> Stripe 1:
>> Physical volume /dev/sde
>> Physical extents 0 to 250389
>> Stripe 2:
>> Physical volume /dev/sdc
>> Physical extents 0 to 250389
>>
>> Logical extents 751170 to 1001559:
>> Type linear
>> Physical volume /dev/sdf
>> Physical extents 0 to 250389
>>
>> 1st question - was this really the only way LVM would
>> extend?
>> 2nd - is there performance penalty with segments like
>> above vs one stripped
>> segment?
>>
>
> Hi
>
>
> Not really sure what you aim to do.
>
> If you have LV segment with 3 stripes - you have to keep
> also extension using 3 stripes - you can't have 1st.
> halve of LV spanning 3 disk and add there a new LV segment
> as linear - as listed in this post.
>
> Both segments must by striped.
>
> Regards
>
> Zdenek
I had 3 stripe LV, you know, three PVs, and wanted the LV to
have 4 stripes, wanted to add 4th PV, you can see it from
above lvdisplay.
I tried these and each time it errored:
$ lvextend -v -i 4 -l+100%free dellH200.InternalB/0
$ lvextend -v -i 4 -l+100%pv dellH200.InternalB/0 /dev/sdf
$ lvextend -i 4 -l 100%vg dellH200.InternalB/0
I did have only one segment, an LV spanning 100%vg with
100%each-pv.
And the above is the result of: $ lvextend -i 1 -l +100%free
dellH200.InternalB/0 /dev/sdf
so, either I'm not getting it right or a stripped LV cannot
be extended this way - then: is there performance penalty
with segments like above vs one stripped
segment?
[-- Attachment #2: Type: text/html, Size: 3284 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] stripped LV with segments vs one segment
2017-04-10 11:16 ` lejeczek
@ 2017-04-10 12:27 ` Marian Csontos
2017-04-10 13:35 ` lejeczek
2017-04-10 14:27 ` lejeczek
2017-04-10 14:19 ` Zdenek Kabelac
1 sibling, 2 replies; 10+ messages in thread
From: Marian Csontos @ 2017-04-10 12:27 UTC (permalink / raw)
To: linux-lvm, peljasz
On 04/10/2017 01:16 PM, lejeczek wrote:
>
> I had 3 stripe LV, you know, three PVs, and wanted the LV to have 4
> stripes, wanted to add 4th PV, you can see it from above lvdisplay.
What you want is "reshape" not extend. This was committed as RAID
feature to 2.02.169, but it is still somewhat experimental. You would
need to convert stripe LV to RAID0 (aka takeover) and then reshape.
> I tried these and each time it errored:
> $ lvextend -v -i 4 -l+100%free dellH200.InternalB/0
> $ lvextend -v -i 4 -l+100%pv dellH200.InternalB/0 /dev/sdf
> $ lvextend -i 4 -l 100%vg dellH200.InternalB/0
>
lvextend With -i 4 this would add another striped segment with 4 devices
after the first segment - and IIUC you do not have enough space for that.
> I did have only one segment, an LV spanning 100%vg with 100%each-pv.
> And the above is the result of: $ lvextend -i 1 -l +100%free
> dellH200.InternalB/0 /dev/sdf
>
> so, either I'm not getting it right or a stripped LV cannot be extended
> this way - then: is there performance penalty with segments like above
> vs one stripped
> segment?
>
>
>
>
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] stripped LV with segments vs one segment
2017-04-10 12:27 ` Marian Csontos
@ 2017-04-10 13:35 ` lejeczek
2017-04-11 17:16 ` Marian Csontos
2017-04-10 14:27 ` lejeczek
1 sibling, 1 reply; 10+ messages in thread
From: lejeczek @ 2017-04-10 13:35 UTC (permalink / raw)
To: LVM general discussion and development
On 10/04/17 13:27, Marian Csontos wrote:
> On 04/10/2017 01:16 PM, lejeczek wrote:
>
>>
>> I had 3 stripe LV, you know, three PVs, and wanted the LV
>> to have 4
>> stripes, wanted to add 4th PV, you can see it from above
>> lvdisplay.
>
> What you want is "reshape" not extend. This was committed
> as RAID feature to 2.02.169, but it is still somewhat
> experimental. You would need to convert stripe LV to RAID0
> (aka takeover) and then reshape.
>
thanks, I see it more clearly now.
Is it possible to get rid of that second segment now? Have
the LV prior to extension?
>> I tried these and each time it errored:
>> $ lvextend -v -i 4 -l+100%free dellH200.InternalB/0
>> $ lvextend -v -i 4 -l+100%pv dellH200.InternalB/0 /dev/sdf
>> $ lvextend -i 4 -l 100%vg dellH200.InternalB/0
>>
>
> lvextend With -i 4 this would add another striped segment
> with 4 devices after the first segment - and IIUC you do
> not have enough space for that.
>
>
>> I did have only one segment, an LV spanning 100%vg with
>> 100%each-pv.
>> And the above is the result of: $ lvextend -i 1 -l +100%free
>> dellH200.InternalB/0 /dev/sdf
>>
>> so, either I'm not getting it right or a stripped LV
>> cannot be extended
>> this way - then: is there performance penalty with
>> segments like above
>> vs one stripped
>> segment?
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] stripped LV with segments vs one segment
2017-04-10 11:16 ` lejeczek
2017-04-10 12:27 ` Marian Csontos
@ 2017-04-10 14:19 ` Zdenek Kabelac
1 sibling, 0 replies; 10+ messages in thread
From: Zdenek Kabelac @ 2017-04-10 14:19 UTC (permalink / raw)
To: lejeczek, LVM general discussion and development
Dne 10.4.2017 v 13:16 lejeczek napsal(a):
>
>
> On 10/04/17 12:03, Zdenek Kabelac wrote:
>> Dne 10.4.2017 v 11:29 lejeczek napsal(a):
>>> hi there
>>>
>>> I could not extend my stripped LV, had 3 stripes and wanted to add one more.
>>> Only way LVM let me do it was where I ended up with this:
>>>
>>> --- Segments ---
>>> Logical extents 0 to 751169:
>>> Type striped
>>> Stripes 3
>>> Stripe size 16.00 KiB
>>> Stripe 0:
>>> Physical volume /dev/sdd
>>> Physical extents 0 to 250389
>>> Stripe 1:
>>> Physical volume /dev/sde
>>> Physical extents 0 to 250389
>>> Stripe 2:
>>> Physical volume /dev/sdc
>>> Physical extents 0 to 250389
>>>
>>> Logical extents 751170 to 1001559:
>>> Type linear
>>> Physical volume /dev/sdf
>>> Physical extents 0 to 250389
>>>
>>> 1st question - was this really the only way LVM would extend?
>>> 2nd - is there performance penalty with segments like above vs one stripped
>>> segment?
>>>
>>
>> Hi
>>
>>
>> Not really sure what you aim to do.
>>
>> If you have LV segment with 3 stripes - you have to keep also extension
>> using 3 stripes - you can't have 1st. halve of LV spanning 3 disk and add
>> there a new LV segment as linear - as listed in this post.
>>
>> Both segments must by striped.
>>
>> Regards
>>
>> Zdenek
>
> I had 3 stripe LV, you know, three PVs, and wanted the LV to have 4 stripes,
> wanted to add 4th PV, you can see it from above lvdisplay.
> I tried these and each time it errored:
> $ lvextend -v -i 4 -l+100%free dellH200.InternalB/0
> $ lvextend -v -i 4 -l+100%pv dellH200.InternalB/0 /dev/sdf
You can't request stripe 4 (needs 4 disks) and pass just single /dev/sdf
device.
Zdenek
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] stripped LV with segments vs one segment
2017-04-10 12:27 ` Marian Csontos
2017-04-10 13:35 ` lejeczek
@ 2017-04-10 14:27 ` lejeczek
2017-04-11 17:37 ` Marian Csontos
1 sibling, 1 reply; 10+ messages in thread
From: lejeczek @ 2017-04-10 14:27 UTC (permalink / raw)
To: Marian Csontos, linux-lvm
On 10/04/17 13:27, Marian Csontos wrote:
> On 04/10/2017 01:16 PM, lejeczek wrote:
>
>>
>> I had 3 stripe LV, you know, three PVs, and wanted the LV
>> to have 4
>> stripes, wanted to add 4th PV, you can see it from above
>> lvdisplay.
>
> What you want is "reshape" not extend. This was committed
> as RAID feature to 2.02.169, but it is still somewhat
> experimental. You would need to convert stripe LV to RAID0
> (aka takeover) and then reshape.
>
convert from stipe to raid0 would not preserve stripe sizes?
is this correct?
nor it would:
-I/--stripesize not allowed for LV dellH200.InternalB/0 when
converting from striped to raid0.
LVM version: 2.02.166(2)-RHEL7 (2016-11-16)
Library version: 1.02.135-RHEL7 (2016-11-16)
Driver version: 4.35.0
>> I tried these and each time it errored:
>> $ lvextend -v -i 4 -l+100%free dellH200.InternalB/0
>> $ lvextend -v -i 4 -l+100%pv dellH200.InternalB/0 /dev/sdf
>> $ lvextend -i 4 -l 100%vg dellH200.InternalB/0
>>
>
> lvextend With -i 4 this would add another striped segment
> with 4 devices after the first segment - and IIUC you do
> not have enough space for that.
>
>
>> I did have only one segment, an LV spanning 100%vg with
>> 100%each-pv.
>> And the above is the result of: $ lvextend -i 1 -l +100%free
>> dellH200.InternalB/0 /dev/sdf
>>
>> so, either I'm not getting it right or a stripped LV
>> cannot be extended
>> this way - then: is there performance penalty with
>> segments like above
>> vs one stripped
>> segment?
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] stripped LV with segments vs one segment
2017-04-10 13:35 ` lejeczek
@ 2017-04-11 17:16 ` Marian Csontos
0 siblings, 0 replies; 10+ messages in thread
From: Marian Csontos @ 2017-04-11 17:16 UTC (permalink / raw)
To: LVM general discussion and development, peljasz
On 04/10/2017 03:35 PM, lejeczek wrote:
>
>
> On 10/04/17 13:27, Marian Csontos wrote:
>> On 04/10/2017 01:16 PM, lejeczek wrote:
>>
>>>
>>> I had 3 stripe LV, you know, three PVs, and wanted the LV to have 4
>>> stripes, wanted to add 4th PV, you can see it from above lvdisplay.
>>
>> What you want is "reshape" not extend. This was committed as RAID
>> feature to 2.02.169, but it is still somewhat experimental. You would
>> need to convert stripe LV to RAID0 (aka takeover) and then reshape.
>>
> thanks, I see it more clearly now.
> Is it possible to get rid of that second segment now? Have the LV prior
> to extension?
Either lvresize to previous size or vgcfgrestore would work UNLESS you
resized the filesystem as well. vgcfgrestore has more limitations - no
other metadata altering operations were performed on VG since the change.
Marian
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] stripped LV with segments vs one segment
2017-04-10 14:27 ` lejeczek
@ 2017-04-11 17:37 ` Marian Csontos
2017-04-11 18:26 ` lejeczek
0 siblings, 1 reply; 10+ messages in thread
From: Marian Csontos @ 2017-04-11 17:37 UTC (permalink / raw)
To: lejeczek, linux-lvm
On 04/10/2017 04:27 PM, lejeczek wrote:
>
>
> On 10/04/17 13:27, Marian Csontos wrote:
>> On 04/10/2017 01:16 PM, lejeczek wrote:
>>
>>>
>>> I had 3 stripe LV, you know, three PVs, and wanted the LV to have 4
>>> stripes, wanted to add 4th PV, you can see it from above lvdisplay.
>>
>> What you want is "reshape" not extend. This was committed as RAID
>> feature to 2.02.169, but it is still somewhat experimental. You would
>> need to convert stripe LV to RAID0 (aka takeover) and then reshape.
>>
> convert from stipe to raid0 would not preserve stripe sizes? is this
> correct?
It should keep stripe size and if it does not it is a bug.
> nor it would:
>
> -I/--stripesize not allowed for LV dellH200.InternalB/0 when converting
> from striped to raid0.
As it says, the option is simply not allowed. Also it would be
meaningless - one can not change stripe size while converting stripe to
raid0. At least not in RHEL-7.3 (lvm2-2.02.166). This is supposed to
work in upstream/2.02.169, but keep in mind that is a new feature, and
it is altering data, so better keep a working backup.
>
> LVM version: 2.02.166(2)-RHEL7 (2016-11-16)
> Library version: 1.02.135-RHEL7 (2016-11-16)
> Driver version: 4.35.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] stripped LV with segments vs one segment
2017-04-11 17:37 ` Marian Csontos
@ 2017-04-11 18:26 ` lejeczek
0 siblings, 0 replies; 10+ messages in thread
From: lejeczek @ 2017-04-11 18:26 UTC (permalink / raw)
To: Marian Csontos, linux-lvm
On 11/04/17 18:37, Marian Csontos wrote:
> On 04/10/2017 04:27 PM, lejeczek wrote:
>>
>>
>> On 10/04/17 13:27, Marian Csontos wrote:
>>> On 04/10/2017 01:16 PM, lejeczek wrote:
>>>
>>>>
>>>> I had 3 stripe LV, you know, three PVs, and wanted the
>>>> LV to have 4
>>>> stripes, wanted to add 4th PV, you can see it from
>>>> above lvdisplay.
>>>
>>> What you want is "reshape" not extend. This was
>>> committed as RAID
>>> feature to 2.02.169, but it is still somewhat
>>> experimental. You would
>>> need to convert stripe LV to RAID0 (aka takeover) and
>>> then reshape.
>>>
>> convert from stipe to raid0 would not preserve stripe
>> sizes? is this
>> correct?
>
> It should keep stripe size and if it does not it is a bug.
>
then probably a bug, I don't have it as was on the console
in front of me now, but should be easy to replicate.
I had stripe LV with 16KB stripe and conversion(successful)
to raid0 said I got 64KB stripe raid0 - is how I remember it.
>> nor it would:
>>
>> -I/--stripesize not allowed for LV dellH200.InternalB/0
>> when converting
>> from striped to raid0.
>
> As it says, the option is simply not allowed. Also it
> would be meaningless - one can not change stripe size
> while converting stripe to raid0. At least not in RHEL-7.3
> (lvm2-2.02.166). This is supposed to work in
> upstream/2.02.169, but keep in mind that is a new feature,
> and it is altering data, so better keep a working backup.
>
>>
>> LVM version: 2.02.166(2)-RHEL7 (2016-11-16)
>> Library version: 1.02.135-RHEL7 (2016-11-16)
>> Driver version: 4.35.0
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2017-04-11 18:26 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-10 9:29 [linux-lvm] stripped LV with segments vs one segment lejeczek
2017-04-10 11:03 ` Zdenek Kabelac
2017-04-10 11:16 ` lejeczek
2017-04-10 12:27 ` Marian Csontos
2017-04-10 13:35 ` lejeczek
2017-04-11 17:16 ` Marian Csontos
2017-04-10 14:27 ` lejeczek
2017-04-11 17:37 ` Marian Csontos
2017-04-11 18:26 ` lejeczek
2017-04-10 14:19 ` Zdenek Kabelac
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).