Skip to content

Stacking and collapsing mirror (rev. 2)

Jun'ichi Nomura lvm-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 0 repliesNew

Changes from the cover letter

- rebased to the CVS head, which contains most of the latest pvmove/lvconvert patchset

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13Add 'const' for mirror-related functions+0 -00 replies
2/13Misc fixes to the 'lvconvert' generalization+0 -00 replies
3/13Enable layer specification in remove_layer_from_lv()+0 -00 replies
4/13lv_rename() to walk down the stacked LV+0 -00 replies
5/13lv_mirror_count() to cope with stacked mirror+0 -00 replies
6/13remove_mirror_images() to cope with stacked mirror+0 -00 replies
7/13lv_extend() to cope with stacked mirror+0 -00 replies
8/13lvconvert to stack a temporary resync mirror on addition+0 -00 replies
9/13Add collapsing feature for stacked mirror+0 -00 replies
10/13Add '--collapse' option to lvconvert+0 -00 replies
11/13Add 'lv_mirrors' field to reporting functions+0 -00 replies
12/13Remove hardcoded "_mlog" name from deptree construction+0 -00 replies
13/13Allow disk logs for temporary resync mirror+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 mirror 0/13] Stacking and collapsing mirror (rev. 2)

This set of patches allows mirror addition to mirrored LV.

The patchset is an updated version of this one:
[PATCH mirror 0/13] Add/collapse temporary mirror
https://www.redhat.com/archives/lvm-devel/2007-November/msg00040.html

Changes:
- rebased to the CVS head, which contains most of the latest pvmove/lvconvert patchset

[ 1/13] Add 'const' for mirror-related functions
[ 2/13] Misc fixes to the 'lvconvert' generalization
[ 3/13] Enable layer specification in remove_layer_from_lv() [ 4/13] lv_rename() to walk down the stacked LV
[ 5/13] lv_mirror_count() to cope with stacked mirror
[ 6/13] remove_mirror_images() to cope with stacked mirror [ 7/13] lv_extend() to cope with stacked mirror
[ 8/13] lvconvert to stack a temporary resync mirror on addition [ 9/13] Add collapsing feature for stacked mirror [10/13] Add '--collapse' option to lvconvert
[11/13] Add 'lv_mirrors' field to reporting functions [12/13] Remove hardcoded "_mlog" name from deptree construction [13/13] Allow disk logs for temporary resync mirror

Comments are welcome.

Overview of the patches
--------------------------

Current LVM2 mirror doesn't allow mirror addition to already mirrored LV.
It's not possible to simply add mirror image to the existing LV because it will result in full resync even if existing images are already in sync.

With this patchset, a temporary mirror layer is inserted.

For example, if we have the mirrored LV below:
testvg-lvol0
|-testvg-lvol0_mimage_1
|-testvg-lvol0_mimage_0
`-testvg-lvol0_mlog0

'lvconvert -m+1' will result in this:
testvg-lvol0

   |-testvg-lvol0_mimage_2
   |-testvg-lvol0_resync0
   |  |-testvg-lvol0_mimage_1
   |  |-testvg-lvol0_mimage_0
   |  `-testvg-lvol0_mlog0

`-testvg-lvol0_mlog1

"resync0" is a temporary layer to resync "mimage_2".

'lvs -o mirrors testvg/lvol0' will show "3" as a number of mirror images.

After the resync completes, 'lvconvert --collapse testvg/lvol0' will change the LV to this form:
testvg-lvol0

   |-testvg-lvol0_mimage_2
   |-testvg-lvol0_mimage_1
   |-testvg-lvol0_mimage_0

`-testvg-lvol0_mlog0

Thanks,

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