All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH pvmove 1/3] remove pvmove-specific params from allocation code
@ 2007-11-21 21:24 Jun'ichi Nomura
  2007-11-21 21:28 ` [PATCH pvmove 2/3] support splitted destinations of pvmove Jun'ichi Nomura
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jun'ichi Nomura @ 2007-11-21 21:24 UTC (permalink / raw)
  To: lvm-devel

This set of patches changes pvmove to use more generalized
allocation code and logic.
The approach might be adaptible to other intermediate layer
manipulation.
Please let me know if this approach is acceptable or not.

[1/3] remove pvmove-specific params from allocation code
[2/3] support splitted destinations of pvmove
[3/3] use generic mirror allocation for pvmove

This 1st patch is basically a repost of the patch posted August:
https://www.redhat.com/archives/lvm-devel/2007-August/msg00068.html
with a few edits to comments, variable names, etc.

The patch is a preparation for other pathes in this series.
This patch removes most of pvmove specific codes from extent allocation
code without affecting the functionality.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-pvmove-cleanup-lv_extend.patch
Type: text/x-patch
Size: 12398 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071121/1e42b778/attachment.bin>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH pvmove 2/3] support splitted destinations of pvmove
  2007-11-21 21:24 [PATCH pvmove 1/3] remove pvmove-specific params from allocation code Jun'ichi Nomura
@ 2007-11-21 21:28 ` Jun'ichi Nomura
  2007-11-21 21:28 ` [PATCH pvmove 3/3] use generic mirror allocation for pvmove Jun'ichi Nomura
  2007-11-21 22:45 ` [PATCH pvmove appendix] 'make check' script for testing basic pvmove operations Jun'ichi Nomura
  2 siblings, 0 replies; 4+ messages in thread
From: Jun'ichi Nomura @ 2007-11-21 21:28 UTC (permalink / raw)
  To: lvm-devel

Currently, pvmove can't split destination area.
This patch removes the restriction.
(Actually, a prepration for removing the restriction.)

If you have 1GB LV on a contiguous area of PV1
and would like to move it to 2 x 500MB PVs, PV2 and PV3,
you have to manually split the pvmove session into 2.

It's because pvmove assumes 1-1 relationship between
source area and destination area and forces a contiguous allocation.

This patch changes pvmove completion to split the original segment
to map to the destination areas.

Other patch ("3/3" of this series) allows allocation of splitted areas
for a single source area.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-pvmove-handle-splitted-area.patch
Type: text/x-patch
Size: 1772 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071121/0f07c413/attachment.bin>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH pvmove 3/3] use generic mirror allocation for pvmove
  2007-11-21 21:24 [PATCH pvmove 1/3] remove pvmove-specific params from allocation code Jun'ichi Nomura
  2007-11-21 21:28 ` [PATCH pvmove 2/3] support splitted destinations of pvmove Jun'ichi Nomura
@ 2007-11-21 21:28 ` Jun'ichi Nomura
  2007-11-21 22:45 ` [PATCH pvmove appendix] 'make check' script for testing basic pvmove operations Jun'ichi Nomura
  2 siblings, 0 replies; 4+ messages in thread
From: Jun'ichi Nomura @ 2007-11-21 21:28 UTC (permalink / raw)
  To: lvm-devel

Extent allocation code used to have special support for pvmove
since pvmove already knows PV area to use for mirrored segment.

This patch changes the pvmove's logic to the way similar to
what lvconvert does for mirrored LV.
Not only clean up the allocation code, it also allows
splitted allocation for destination areas.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-pvmove-generalized-mirror-allocation.patch
Type: text/x-patch
Size: 14681 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071121/34e24058/attachment.bin>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH pvmove appendix] 'make check' script for testing basic pvmove operations
  2007-11-21 21:24 [PATCH pvmove 1/3] remove pvmove-specific params from allocation code Jun'ichi Nomura
  2007-11-21 21:28 ` [PATCH pvmove 2/3] support splitted destinations of pvmove Jun'ichi Nomura
  2007-11-21 21:28 ` [PATCH pvmove 3/3] use generic mirror allocation for pvmove Jun'ichi Nomura
@ 2007-11-21 22:45 ` Jun'ichi Nomura
  2 siblings, 0 replies; 4+ messages in thread
From: Jun'ichi Nomura @ 2007-11-21 22:45 UTC (permalink / raw)
  To: lvm-devel

Attached is a test script for basic pvmove operations.
(Not actually in a patch form.)
I hope it gets included in the test directory for future
regression testings.

To run this, put it in LVM2/test directory, then
  # cd test; ./t-pvmove-basic.sh
With the posted patch set, all tests succeeds.
Without the patches, test 15 will fail.

# ./t-pvmove-basic.sh 
*   ok 1: set up temp file and loopback device
*   ok 2: create pv1
*   ok 3: create pv2
*   ok 4: create pv3
*   ok 5: Run this: pvcreate
  /LVM2.work/test/lvm-pvmove-basic.xqtoq24243/root/dev/mapper/pv1 
  /LVM2.work/test/lvm-pvmove-basic.xqtoq24243/root/dev/mapper/pv2
  /LVM2.work/test/lvm-pvmove-basic.xqtoq24243/root/dev/mapper/pv3
*   ok 6: set up a VG
*   ok 7: create a linear LV lv1 on pv1
*   ok 8: create a striped LV lv2 on pv2 and pv3
*   ok 9: pvmove from pv1 to pv1 (same source and destination)
*   ok 10: pvmove failure should not affect lv contents
*   ok 11: pvmove from pv1 to pv2
*   ok 12: pvmove from pv2 to pv1 only for lv1
*   ok 13: pvmove from pv3 (a part of striped LV) to pv1
*   ok 14: pvmove from pv3 to pv1 (no PEs to move)
*   ok 15: pvmove from pv1:0-1 to pv2:2-2 and pv3:3-3 (splitted)
*   ok 16: pvmove abort
*   ok 17: pvmove LV isn't left
* passed all 17 test(s)

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t-pvmove-basic.sh
Type: application/x-sh
Size: 3588 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071121/84957a11/attachment.sh>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-21 22:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-21 21:24 [PATCH pvmove 1/3] remove pvmove-specific params from allocation code Jun'ichi Nomura
2007-11-21 21:28 ` [PATCH pvmove 2/3] support splitted destinations of pvmove Jun'ichi Nomura
2007-11-21 21:28 ` [PATCH pvmove 3/3] use generic mirror allocation for pvmove Jun'ichi Nomura
2007-11-21 22:45 ` [PATCH pvmove appendix] 'make check' script for testing basic pvmove operations Jun'ichi Nomura

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.