LVM strange behavior


(Mikola Zakobrezki) #1

hi ppl! :slight_smile:

I wish to tell you a strange story about using LVM volumes inside LVM system storage.

I have 2 virtual hypervisor hosts with SAN LUN connected to each. Call them 1st and 2nd.
Some tech specs:
OS Centos 7.5
QEMU emulator version 2.10.0(qemu-kvm-ev-2.10.0-21.el7_5.7.1)
Multipathd installed on hosts

For using live migration and other beautiful features i maded a shared LUN of volume mounted at 2nd and conect it to 1st.
Ofcourse fo detection new volume with multipath i’ve execute following commands
echo “1” > /sys/class/fc_host/host2/issue_lip
echo “1” > /sys/class/fc_host/host3/issue_lip

Before it i haved only these PVS on my LVM, it was:
/dev/sda3
/dev/mapper/mpatha1

after shared LUN installed, situation changes and it looks like(pvs command was used):
File descriptor 4 (/dev/pts/1) leaked on pvs invocation. Parent PID 22629: bash
File descriptor 8 (pipe:[39551202]) leaked on pvs invocation. Parent PID 22629: bash
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr on /dev/mapper/vg–one–112-lv–one–45–0p2 was already found on /dev/mapper/vg–one–112-lv–one–52–0p2.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr on /dev/mapper/vg–one–112-lv–one–51–0p2 was already found on /dev/mapper/vg–one–112-lv–one–52–0p2.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr on /dev/mapper/vg–one–112-lv–one–44–0p2 was already found on /dev/mapper/vg–one–112-lv–one–52–0p2.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr on /dev/mapper/vg–one–112-lv–one–50–0p2 was already found on /dev/mapper/vg–one–112-lv–one–52–0p2.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr on /dev/mapper/vg–one–112-lv–one–46–0p2 was already found on /dev/mapper/vg–one–112-lv–one–52–0p2.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr on /dev/mapper/vg–one–112-lv–one–47–0p2 was already found on /dev/mapper/vg–one–112-lv–one–52–0p2.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr prefers device /dev/mapper/vg–one–112-lv–one–52–0p2 because device was seen first.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr prefers device /dev/mapper/vg–one–112-lv–one–52–0p2 because device was seen first.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr prefers device /dev/mapper/vg–one–112-lv–one–52–0p2 because device was seen first.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr prefers device /dev/mapper/vg–one–112-lv–one–52–0p2 because device was seen first.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr prefers device /dev/mapper/vg–one–112-lv–one–52–0p2 because device was seen first.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr prefers device /dev/mapper/vg–one–112-lv–one–52–0p2 because device was seen first.
PV VG Fmt Attr PSize PFree
/dev/mapper/mpatha1 vg-one-112 lvm2 a-- <6.00t <804.00g
/dev/mapper/mpathb1 vg-one-113 lvm2 a-- <10.00t <10.00t
/dev/mapper/vg–one–112-lv–one–44–2p1 elastic lvm2 a-- <2.50t 0
/dev/mapper/vg–one–112-lv–one–45–2p1 elastic lvm2 a-- <2.50t 0
/dev/mapper/vg–one–112-lv–one–46–2p1 vg01-data lvm2 a-- <80.00g <80.00g
/dev/mapper/vg–one–112-lv–one–52–0p2 vg00 lvm2 a-- <19.00g 4.00m
/dev/sda3 vg01 lvm2 a-- <184.11g <76.30g

Same situation happens in logical volumes. I see all volumes which must be inside of virtual machine!!!
(lvs command used)
File descriptor 4 (/dev/pts/1) leaked on lvs invocation. Parent PID 22629: bash
File descriptor 8 (pipe:[39551202]) leaked on lvs invocation. Parent PID 22629: bash
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr on /dev/mapper/vg–one–112-lv–one–45–0p2 was already found on /dev/mapper/vg–one–112-lv–one–52–0p2.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr on /dev/mapper/vg–one–112-lv–one–51–0p2 was already found on /dev/mapper/vg–one–112-lv–one–52–0p2.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr on /dev/mapper/vg–one–112-lv–one–44–0p2 was already found on /dev/mapper/vg–one–112-lv–one–52–0p2.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr on /dev/mapper/vg–one–112-lv–one–50–0p2 was already found on /dev/mapper/vg–one–112-lv–one–52–0p2.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr on /dev/mapper/vg–one–112-lv–one–46–0p2 was already found on /dev/mapper/vg–one–112-lv–one–52–0p2.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr on /dev/mapper/vg–one–112-lv–one–47–0p2 was already found on /dev/mapper/vg–one–112-lv–one–52–0p2.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr prefers device /dev/mapper/vg–one–112-lv–one–52–0p2 because device was seen first.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr prefers device /dev/mapper/vg–one–112-lv–one–52–0p2 because device was seen first.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr prefers device /dev/mapper/vg–one–112-lv–one–52–0p2 because device was seen first.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr prefers device /dev/mapper/vg–one–112-lv–one–52–0p2 because device was seen first.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr prefers device /dev/mapper/vg–one–112-lv–one–52–0p2 because device was seen first.
WARNING: PV oSzgLk-M8O2-7pbQ-cIuj-j3hZ-uxtV-Kct2kr prefers device /dev/mapper/vg–one–112-lv–one–52–0p2 because device was seen first.
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
01 elastic -wi------- <2.50t
01 elastic -wi------- <2.50t
lv-one-44-0 vg-one-112 -wi-ao---- 20.00g
lv-one-44-2 vg-one-112 -wi-ao---- 2.50t
lv-one-45-0 vg-one-112 -wi-ao---- 20.00g
lv-one-45-2 vg-one-112 -wi-ao---- 2.50t
lv-one-46-0 vg-one-112 -wi-ao---- 20.00g
lv-one-46-2 vg-one-112 -wi-ao---- 80.00g
lv-one-47-0 vg-one-112 -wi-ao---- 20.00g
lv-one-50-0 vg-one-112 -wi-ao---- 20.00g
lv-one-51-0 vg-one-112 -wi-ao---- 20.00g
lv-one-52-0 vg-one-112 -wi-ao---- 20.00g
root vg00 -wi------- 17.00g
swap vg00 -wi------- 1.99g
root vg01 -wi-ao---- 100.00g
swap vg01 -wi-ao---- 7.81g

Is it normal? Why this happens???

Regards,
Michaelikus


(Mikola Zakobrezki) #2

So… its normal behavior.
The key to solve this problem is global_filter = [ “r|one–.|","r|vg.|”, “r|dm-.|", "a/./” ] in /etc/lvm/lvm.conf

Regards…

PS. Thanks for your help…