[linux-lvm] LVM mirror logic bug?
Robert
namibianer at gmail.com
Wed Feb 6 11:43:05 UTC 2013
Hi,
Today I created a mirror due to some data migrations I am doing, and
the funny thing is that two mirror legs ended up on the same physical
volume:
# lvs -a -o +devices
LV VG Attr LSize Origin Snap% Move Log Copy%
Convert Devices
oraarch sapvg -wi-ao 20.00G
/dev/dm-18(0)
oracle sapvg -wi-ao 5.00G
/dev/dm-18(5120)
orapta sapvg mwi-ao 299.12G
100.00 orapta_mimage_0(0),orapta_mimage_1(0)
[orapta_mimage_0] sapvg iwi-ao 299.12G
/dev/dm-5(11520)
[orapta_mimage_0] sapvg iwi-ao 299.12G
/dev/dm-3(12800)
[orapta_mimage_0] sapvg iwi-ao 299.12G
/dev/dm-3(30002)
[orapta_mimage_0] sapvg iwi-ao 299.12G
/dev/dm-4(0)
[orapta_mimage_0] sapvg iwi-ao 299.12G
/dev/dm-4(9913)
[orapta_mimage_0] sapvg iwi-ao 299.12G
/dev/dm-6(0)
[orapta_mimage_1] sapvg iwi-ao 299.12G
/dev/dm-6(34249)
[orapta_mimage_1] sapvg iwi-ao 299.12G
/dev/dm-16(0)
[orapta_mimage_1] sapvg iwi-ao 299.12G
/dev/dm-17(0)
...
...
Here you can see /dev/dm-6 contains part of both mirror legs.
I have to admit I just used the command:
lvconvert -m1 --corelog sapvg/orapta
not specifying the target pv's as I thought LVM would calculate it for itself.
There should be a rule in place to never use the same PV for the
second leg of a mirror that is used by the first shoudln't there?
I am using a statically compiled version of LVM so I can use it on
different machines that are older than SLES11SP2 as the older distro
won't allow me to mirror multi segmented LV's.
# /tmp/lvm.static version
LVM version: 2.02.98(2) (2012-10-15)
Library version: 1.02.77 (2012-10-15)
Driver version: 4.15.0
Thanks!
Robert
More information about the linux-lvm
mailing list