iSCSI and LVM storage relation

orosmannaro

Well-Known Member
Jan 6, 2013
54
3
48
Hi all.

I spent a lot of time on this question, without finding an answer.

In Proxmox 3.4 If I have several iSCSI and LVM storage, how can I know which one of the iSCI storage is related to a specific LVM?

Thanks for your help.
 
Hi,

The Storage tells you the LV and then you have to look where the LV resists.
Now you know the device and can look with iscsiadm how the dev are mapped.
 
I already tried this... I'm able to discover the device /dev/sdX or the Physical Volume, but I'm not able to relate this two data.

May be I don't know the correct iscsiadm parameter where to 'grep' desired output...

Would you be so kind to show me a practical example?


Thanks for your answer.
 
Code:
cat /proc/net/iet/volume

Nevermind, that's for target, sorry.

Code:
ls -l /dev/disk/by-path

Example:

Code:
$ ls -l /dev/disk/by-path/ip*-lun-0
lrwxrwxrwx 1 root root 9 Dec 15 17:37 /dev/disk/by-path/ip-10.129.30.41:3261-iscsi-iqn.cn02:brick1-lun-0 -> ../../sdm
lrwxrwxrwx 1 root root 9 Dec 15 17:40 /dev/disk/by-path/ip-10.129.30.42:3261-iscsi-iqn.cn03:brick1-lun-0 -> ../../sdn
lrwxrwxrwx 1 root root 9 Dec 15 17:44 /dev/disk/by-path/ip-10.129.30.43:3261-iscsi-iqn.cn04:brick1-lun-0 -> ../../sdo
lrwxrwxrwx 1 root root 9 Dec 15 17:46 /dev/disk/by-path/ip-10.129.30.44:3261-iscsi-iqn.cn05:brick1-lun-0 -> ../../sdp