* [linux-lvm] How to re-stripe a LV after pvmove?
@ 2007-03-29 11:42 Olle Liljenzin
2007-03-29 12:39 ` Heinz Mauelshagen
0 siblings, 1 reply; 5+ messages in thread
From: Olle Liljenzin @ 2007-03-29 11:42 UTC (permalink / raw)
To: linux-lvm
Hello,
How can I rearrange a striped volume after pvmove has been run, so that
I get back the original structure with the stripes equally distributed
on PVs?
/Olle
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] How to re-stripe a LV after pvmove?
2007-03-29 11:42 [linux-lvm] How to re-stripe a LV after pvmove? Olle Liljenzin
@ 2007-03-29 12:39 ` Heinz Mauelshagen
2007-03-29 14:05 ` Olle Liljenzin
0 siblings, 1 reply; 5+ messages in thread
From: Heinz Mauelshagen @ 2007-03-29 12:39 UTC (permalink / raw)
To: LVM general discussion and development
On Thu, Mar 29, 2007 at 01:42:47PM +0200, Olle Liljenzin wrote:
> Hello,
>
> How can I rearrange a striped volume after pvmove has been run, so that
> I get back the original structure with the stripes equally distributed
> on PVs?
I need to presume, that IO to the striped LV was going on during pvmove.
Hence restoring the old mapping won't help and will lead to data corruption.
pvmove back using the destination options of the command.
>
> /Olle
>
> _______________________________________________
> 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/
--
Regards,
Heinz -- The LVM Guy --
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Red Hat GmbH
Consulting Development Engineer Am Sonnenhang 11
Storage Development 56242 Marienrachdorf
Germany
Mauelshagen@RedHat.com PHONE +49 171 7803392
FAX +49 2626 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [linux-lvm] How to re-stripe a LV after pvmove?
2007-03-29 12:39 ` Heinz Mauelshagen
@ 2007-03-29 14:05 ` Olle Liljenzin
2007-03-29 14:29 ` Dave Wysochanski
0 siblings, 1 reply; 5+ messages in thread
From: Olle Liljenzin @ 2007-03-29 14:05 UTC (permalink / raw)
To: mauelshagen, LVM general discussion and development
Heinz Mauelshagen wrote:
> On Thu, Mar 29, 2007 at 01:42:47PM +0200, Olle Liljenzin wrote:
>
>> Hello,
>>
>> How can I rearrange a striped volume after pvmove has been run, so that
>> I get back the original structure with the stripes equally distributed
>> on PVs?
>>
>
> I need to presume, that IO to the striped LV was going on during pvmove.
> Hence restoring the old mapping won't help and will lead to data corruption.
>
> pvmove back using the destination options of the command.
>
Maybe an example is helpful. After the commands below I have two stripes
on sdb2 and one on sdb3. How do I move one of the stripes from sdb2 to sdb4?
pvcreate /dev/sdb{1,2,3}
vgcreate vg /dev/sdb{1,2,3}
lvcreate -i 3 -L100M -n lv /dev/vg
vgreduce /dev/vg /dev/sdb1
pvremove /dev/sdb1
pvcreate /dev/sdb4
vgextend /dev/vg /dev/sdb4
lvdisplay -m /dev/vg/lv
--- Logical volume ---
LV Name /dev/vg/lv
VG Name vg
LV UUID NVBrvT-5fZe-0qKA-LCYA-Z9au-X84A-fXYkx3
LV Write Access read/write
LV Status available
# open 0
LV Size 108.00 MB
Current LE 27
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:2
--- Segments ---
Logical extent 0 to 26:
Type striped
Stripes 3
Stripe size 64 KB
Stripe 0:
Physical volume /dev/sdb2
Physical extents 9 to 17
Stripe 1:
Physical volume /dev/sdb2
Physical extents 0 to 8
Stripe 2:
Physical volume /dev/sdb3
Physical extents 0 to 8
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [linux-lvm] How to re-stripe a LV after pvmove?
2007-03-29 14:05 ` Olle Liljenzin
@ 2007-03-29 14:29 ` Dave Wysochanski
2007-03-29 14:39 ` Olle Liljenzin
0 siblings, 1 reply; 5+ messages in thread
From: Dave Wysochanski @ 2007-03-29 14:29 UTC (permalink / raw)
To: olle, LVM general discussion and development; +Cc: mauelshagen
On Thu, 2007-03-29 at 16:05 +0200, Olle Liljenzin wrote:
> Heinz Mauelshagen wrote:
> > On Thu, Mar 29, 2007 at 01:42:47PM +0200, Olle Liljenzin wrote:
> >
> >> Hello,
> >>
> >> How can I rearrange a striped volume after pvmove has been run, so that
> >> I get back the original structure with the stripes equally distributed
> >> on PVs?
> >>
> >
> > I need to presume, that IO to the striped LV was going on during pvmove.
> > Hence restoring the old mapping won't help and will lead to data corruption.
> >
> > pvmove back using the destination options of the command.
> >
>
> Maybe an example is helpful. After the commands below I have two stripes
> on sdb2 and one on sdb3. How do I move one of the stripes from sdb2 to sdb4?
>
> pvcreate /dev/sdb{1,2,3}
> vgcreate vg /dev/sdb{1,2,3}
> lvcreate -i 3 -L100M -n lv /dev/vg
> vgreduce /dev/vg /dev/sdb1
> pvremove /dev/sdb1
> pvcreate /dev/sdb4
> vgextend /dev/vg /dev/sdb4
> lvdisplay -m /dev/vg/lv
>
> --- Logical volume ---
> LV Name /dev/vg/lv
> VG Name vg
> LV UUID NVBrvT-5fZe-0qKA-LCYA-Z9au-X84A-fXYkx3
> LV Write Access read/write
> LV Status available
> # open 0
> LV Size 108.00 MB
> Current LE 27
> Segments 1
> Allocation inherit
> Read ahead sectors 0
> Block device 253:2
> --- Segments ---
> Logical extent 0 to 26:
> Type striped
> Stripes 3
> Stripe size 64 KB
> Stripe 0:
> Physical volume /dev/sdb2
> Physical extents 9 to 17
> Stripe 1:
> Physical volume /dev/sdb2
> Physical extents 0 to 8
> Stripe 2:
> Physical volume /dev/sdb3
> Physical extents 0 to 8
looks like you need something like this:
pvmove /dev/sdb2:9-17 /dev/sdb4:0-8
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-03-29 14:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-29 11:42 [linux-lvm] How to re-stripe a LV after pvmove? Olle Liljenzin
2007-03-29 12:39 ` Heinz Mauelshagen
2007-03-29 14:05 ` Olle Liljenzin
2007-03-29 14:29 ` Dave Wysochanski
2007-03-29 14:39 ` Olle Liljenzin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.