]> sourceware.org Git - lvm2.git/commit
lvconvert: position dedicated parity device in raid4 conversions porperly
authorHeinz Mauelshagen <heinzm@redhat.com>
Fri, 21 Oct 2016 16:59:59 +0000 (18:59 +0200)
committerHeinz Mauelshagen <heinzm@redhat.com>
Fri, 21 Oct 2016 17:00:31 +0000 (19:00 +0200)
commitde78e8eae73cb155fdb906ef2b8ddc9ca1a918c4
tree5742fc496df009b5d7d2fe74251dacd7f76d3ee7
parent34da83d729436d245e91e24e30b6996862fe7725
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
WHATS_NEW
lib/metadata/raid_manip.c
test/shell/lvconvert-raid-takeover.sh
tools/lvconvert.c
This page took 0.041327 seconds and 5 git commands to generate.