]> sourceware.org Git - lvm2.git/commit - tools/lvresize.c
Fix mirrored stripe reduction.
authorMilan Broz <mbroz@redhat.com>
Thu, 9 Jun 2011 19:38:56 +0000 (19:38 +0000)
committerMilan Broz <mbroz@redhat.com>
Thu, 9 Jun 2011 19:38:56 +0000 (19:38 +0000)
commitf4ba9c5d1ee087710f76ce628f40d6cfb81c8461
tree0cff5c34815597e3101806e0d432c769d1c6c90f
parent4fb39ae074ae4ef60f76b988497c59ef656d4b0f
Fix mirrored stripe reduction.

Patch adds check for stripe not only in direct
LV segment but also in mirror image segment.

This prevents bugs like:

# lvcreate -i2 -l10 -n lv vg_test
# lvconvert -m1 -i1 vg_test/lv

# lvreduce -f -l1 vg_test/lv
  WARNING: Reducing active logical volume to 4.00 MiB
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
  Reducing logical volume lv to 4.00 MiB
  Segment extent reduction 9 not divisible by #stripes 2
  Logical volume lv successfully resized

# lvremove -f vg_test
  Segment extent reduction 1 not divisible by #stripes 2
  LV segment lv:0-4294967295 is incorrectly listed as being used by LV lv_mimage_0
  Internal error: LV segments corrupted in lv_mimage_0.
WHATS_NEW
test/t-lvconvert-mirror.sh
tools/lvresize.c
This page took 0.030597 seconds and 5 git commands to generate.