Hi all,
I have a 5.4-6 proxmox installation. I have connected an iscsi LUN by hand with multipathd.
I have given the iscsi disk to LVM and the LVM to proxmox. I used it to transfer a few VMs on it (that was the purpose) and then I needed to disconnect the iscsi from proxmox and migrate the whole LUN to another host.
Thats where the problems started.
I removed the storage from the proxmox GUI, then I did the VG inactive (vgchange -a n) and then I vgexported the VG. I also disconnected the iscsi target.
The problem is that LVM did not really forget the VG and devmapper did not unount the device (dm-xx).
Here you are:
root@px2:~# multipath -l
Aug 18 18:10:31 | 65:16: cannot find block device
Aug 18 18:10:31 | Invalid device number 1
Aug 18 18:10:31 | 1: cannot find block device
mpatha (360014053e849b29d38e41c1847f3a98a) dm-6 ##,##
size=4.9T features='1 retain_attached_hw_handler' hwhandler='1 alua' wp=rw
`-+- policy='round-robin 0' prio=0 status=enabled
Aug 18 18:10:31 | 8:240: cannot find block device
Aug 18 18:10:31 | Invalid device number 1
Aug 18 18:10:31 | 1: cannot find block device
testmigration2 (36001405d3e7535f34e341a19f6a58f0f) dm-7 ##,##
size=120G features='1 retain_attached_hw_handler' hwhandler='1 alua' wp=rw
`-+- policy='round-robin 0' prio=0 status=enabled
Aug 18 18:10:31 | 8:208: cannot find block device
Aug 18 18:10:31 | Invalid device number 1
Aug 18 18:10:31 | 1: cannot find block device
testmigration (3600140502c5bbe0d8db49beb1f39bd2c) dm-5 ##,##
size=100G features='1 retain_attached_hw_handler' hwhandler='1 alua' wp=rw
`-+- policy='round-robin 0' prio=0 status=enabled
root@px2:~# ls -l /dev/mapper/
total 0
crw------- 1 root root 10, 236 May 28 12:56 control
lrwxrwxrwx 1 root root 7 Aug 18 16:41 mpatha -> ../dm-6
lrwxrwxrwx 1 root root 7 May 28 12:56 pve-data -> ../dm-4
lrwxrwxrwx 1 root root 7 May 28 12:56 pve-data_tdata -> ../dm-3
lrwxrwxrwx 1 root root 7 May 28 12:56 pve-data_tmeta -> ../dm-2
lrwxrwxrwx 1 root root 7 May 28 12:56 pve-root -> ../dm-1
lrwxrwxrwx 1 root root 7 May 28 12:56 pve-swap -> ../dm-0
lrwxrwxrwx 1 root root 7 Aug 18 16:41 testmigration -> ../dm-5
lrwxrwxrwx 1 root root 7 Aug 18 16:41 testmigration2 -> ../dm-7
lrwxrwxrwx 1 root root 7 Aug 18 16:40 testmigration2-part1 -> ../dm-9
lrwxrwxrwx 1 root root 7 Aug 18 16:40 testmigration-part1 -> ../dm-8
sdp,sdr, dm-5,dm-7 etc should not exist... They are all stale and they are causing problems to proxmox GUI.
Any ideas, what I can do to convince devmapper to destroy the devices?
Is this a bug or expected behaviour?
Sp
I have a 5.4-6 proxmox installation. I have connected an iscsi LUN by hand with multipathd.
I have given the iscsi disk to LVM and the LVM to proxmox. I used it to transfer a few VMs on it (that was the purpose) and then I needed to disconnect the iscsi from proxmox and migrate the whole LUN to another host.
Thats where the problems started.
I removed the storage from the proxmox GUI, then I did the VG inactive (vgchange -a n) and then I vgexported the VG. I also disconnected the iscsi target.
The problem is that LVM did not really forget the VG and devmapper did not unount the device (dm-xx).
Here you are:
root@px2:~# multipath -l
Aug 18 18:10:31 | 65:16: cannot find block device
Aug 18 18:10:31 | Invalid device number 1
Aug 18 18:10:31 | 1: cannot find block device
mpatha (360014053e849b29d38e41c1847f3a98a) dm-6 ##,##
size=4.9T features='1 retain_attached_hw_handler' hwhandler='1 alua' wp=rw
`-+- policy='round-robin 0' prio=0 status=enabled
Aug 18 18:10:31 | 8:240: cannot find block device
Aug 18 18:10:31 | Invalid device number 1
Aug 18 18:10:31 | 1: cannot find block device
testmigration2 (36001405d3e7535f34e341a19f6a58f0f) dm-7 ##,##
size=120G features='1 retain_attached_hw_handler' hwhandler='1 alua' wp=rw
`-+- policy='round-robin 0' prio=0 status=enabled
Aug 18 18:10:31 | 8:208: cannot find block device
Aug 18 18:10:31 | Invalid device number 1
Aug 18 18:10:31 | 1: cannot find block device
testmigration (3600140502c5bbe0d8db49beb1f39bd2c) dm-5 ##,##
size=100G features='1 retain_attached_hw_handler' hwhandler='1 alua' wp=rw
`-+- policy='round-robin 0' prio=0 status=enabled
root@px2:~# ls -l /dev/mapper/
total 0
crw------- 1 root root 10, 236 May 28 12:56 control
lrwxrwxrwx 1 root root 7 Aug 18 16:41 mpatha -> ../dm-6
lrwxrwxrwx 1 root root 7 May 28 12:56 pve-data -> ../dm-4
lrwxrwxrwx 1 root root 7 May 28 12:56 pve-data_tdata -> ../dm-3
lrwxrwxrwx 1 root root 7 May 28 12:56 pve-data_tmeta -> ../dm-2
lrwxrwxrwx 1 root root 7 May 28 12:56 pve-root -> ../dm-1
lrwxrwxrwx 1 root root 7 May 28 12:56 pve-swap -> ../dm-0
lrwxrwxrwx 1 root root 7 Aug 18 16:41 testmigration -> ../dm-5
lrwxrwxrwx 1 root root 7 Aug 18 16:41 testmigration2 -> ../dm-7
lrwxrwxrwx 1 root root 7 Aug 18 16:40 testmigration2-part1 -> ../dm-9
lrwxrwxrwx 1 root root 7 Aug 18 16:40 testmigration-part1 -> ../dm-8
sdp,sdr, dm-5,dm-7 etc should not exist... They are all stale and they are causing problems to proxmox GUI.
Any ideas, what I can do to convince devmapper to destroy the devices?
Is this a bug or expected behaviour?
Sp
Last edited: