1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/metadata
Heinz Mauelshagen de78e8eae7 lvconvert: position dedicated parity device in raid4 conversions porperly
On conversions between striped/raid0* and raid4, the kernel expects
the dedicated raid4 parity SubLVs in the first segment area rather than
in the last it's been allocated to, thus the data mapping ain't proper.

Enhance lvconvert (lib/metadata/raid_manip.c) to shift the dedicated
parity SubLVs on conversions from striped/raid0* to raid4 and vice-versa.

In case of raid0_meta -> raid4 where the MD raid0 personality already has
stored RAID array device positions in the superblocks, the MetaLVs have to
be cleared so that the kernel doesn't fail validating the array positions
after lvm has shifted them up by one.

Add more tests to lvconvert-raid-takeover.sh including one to check for
mapping flaws by converting a created raid4 with filesystem -> striped
and fsck it.

Whilst on it:
- add missing direct striped -> raid4 conversion to the takeover array
  to avoid an intermim conversion from striped -> raid0*
- clean up the takeover array
- allow lvconvert to actually call lv_raid_convert() on all takeover requests
  in order to check parameters and display messages provided by takeover
  functions rather than just "...not supported" from within lvconvert
- fix a typo

Resolves: rhbz1386148
2016-10-21 19:00:31 +02:00
..
cache_manip.c cache: introduce cache_pool_max_chunks 2016-08-29 20:47:31 +02:00
lv_alloc.h doc: change fsf address 2016-01-21 12:11:37 +01:00
lv_manip.c debug: cleanup backtrace after log_error 2016-09-19 14:00:56 +02:00
lv.c cleanup: remove unused variables 2016-09-21 15:53:50 +02:00
lv.h lv: introduce lvseg_percent_with_info_and_seg_status 2016-05-27 15:47:24 +02:00
merge.c lvcreate/lvconvert: fix validation of maximum mirrors/stripes 2016-08-12 19:14:28 +02:00
metadata-exported.h toollib: Record whether or not stripes/stripe_size args supplied. 2016-08-19 13:51:43 +01:00
metadata.c metadata: fix automatic updates of PV extension headers to newest version 2016-07-26 16:22:55 +02:00
metadata.h thin: enforce there is some free space in thin pool metadata 2016-09-19 14:00:56 +02:00
mirror.c metadata: also look at historical LVs when checking LV name availability 2016-03-03 13:50:59 +01:00
pool_manip.c debug: better verbose message 2016-08-29 20:51:16 +02:00
pv_alloc.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pv_manip.c lvmetad: two phase vg_update 2016-06-28 02:30:31 +01:00
pv_map.c doc: change fsf address 2016-01-21 12:11:37 +01:00
pv_map.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pv.c lvmcache: add optional dev arg to lvmcache_info_from_pvid 2016-06-07 15:15:47 -05:00
pv.h pv: add is_used_pv fn 2016-02-15 12:44:46 +01:00
raid_manip.c lvconvert: position dedicated parity device in raid4 conversions porperly 2016-10-21 19:00:31 +02:00
replicator_manip.c lvmetad: two phase vg_update 2016-06-28 02:30:31 +01:00
segtype.c segtypes: Further segtype macros. 2016-08-05 14:00:40 +01:00
segtype.h cache: report metadata percentage 2016-09-09 15:01:35 +02:00
snapshot_manip.c snapshot: check merging_cow is cow 2016-05-27 15:47:24 +02:00
takeover_matrix.h raid0: Add raid0_meta segment type. 2016-07-01 22:20:54 +01:00
thin_manip.c cleanup: drop assign before use 2016-10-03 17:49:55 +02:00
vg.c macros: Use is_power_of_2. 2016-06-30 17:59:44 +01:00
vg.h lvmetad: two phase vg_update 2016-06-28 02:30:31 +01:00