Skip to content

Refactoring lvconvert mirror

Jun'ichi Nomura lvm-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Add insert_layer_for_lv() / remove_layer_from_lv()+0 -00 replies
2/6Add add_mirror_images() / {add, remove}_mirror_log()+0 -00 replies
3/6Change lvconvert to use the new mirror APIs+0 -00 replies
4/6Change lvcreate to use the new mirror APIs+0 -00 replies
5/6Remove unused mirror functions+0 -00 replies
6/6Add lv_{add,remove}_mirrors()+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH lvconvert 0/6] Refactoring lvconvert mirror

Hi,

This patchset refactors lvconvert mirror.
The patches are applicable on top of the pvmove refactoring patches.
https://www.redhat.com/archives/lvm-devel/2007-December/msg00020.html

I would like to know whether this changes are acceptable. I guess there might be other needs for layer insertion/removal APIs. Comments are welcome.
If they looks ok, I'll convert add-mirror-to-mirror patches based on this.

The patches add following APIs:
- lv_add_mirrors(), lv_remove_mirrors()
Generic APIs for lvconvert mirror.
Having 2 modes of conversion: MIRROR_BY_SEG and MIRROR_BY_LV. MIRROR_BY_LV is for the current version of lvconvert, i.e. mirroring by mimage LVs.
MIRROR_BY_SEG is for the current version of pvmove, i.e. mirroring segment by segment.
- add_mirror_images()
Add mirrors (mimage LVs) to LV.
The counter part of existing remove_mirror_images(). Wrapped by lv_add_mirrors().
- add_mirror_log(), remove_mirror_log()
Simplified version of the APIs specific to add/remove disk log.
- lv_mirror_count()
Returns the number of mirrors
- insert_layer_for_lv(), remove_layer_from_lv()
Insert a layer on top of the LV and remove it.

Then, lvconvert, lvcreate and pvmove are converted to use them.

The patchset also includes an experimental patch to allow
- lvcreate/lvconvert to create segment-by-segment mirrored LV
- pvmove to use disk log

[1/6] add insert_layer_for_lv() / remove_layer_from_lv() [2/6] add add_mirror_images(), {add,remove}_mirror_log() [3/6] change lvconvert to use the new APIs
[4/6] change lvcreate to use the new APIs
[5/6] remove unused mirror functions
[6/6] add and convert tools to use lv_{add,remove}_mirrors() [Appendix] experimental: pvmove with disk log and seg-by-seg mirror LV

Thanks,

Signature · 1 line
Jun'ichi Nomura, NEC Corporation of America