kdt Asked: 2011-03-15 07:02:20 +0800 CST2011-03-15 07:02:20 +0800 CST 2011-03-15 07:02:20 +0800 CST Query iSCSI ID of a device node on Linux? 772 I have some iSCSI targets mounted on a linux host as /dev/sd*. How can I query the iSCSI ID from the device node? This is on CentOS 5, using the iscsi-initiator-utils package. linux iscsi 3 Answers Voted Best Answer Daniel 2011-03-15T07:36:57+08:002011-03-15T07:36:57+08:00 If you look into /dev/disk/by-path/ you should see links to your devices sciurus 2011-03-15T14:50:58+08:002011-03-15T14:50:58+08:00 iscsiadm --mode session -P 3 That will produce lots of extraneous output. You care about the Target line that comes before the Attached scsi disk line for the device in question. weeheavy 2011-03-15T07:06:53+08:002011-03-15T07:06:53+08:00 I'm pretty sure you can get the ID by issuing iscsiadm -m discovery -t st -p <target-ip>.
If you look into
you should see links to your devices
That will produce lots of extraneous output. You care about the Target line that comes before the Attached scsi disk line for the device in question.
I'm pretty sure you can get the ID by issuing
iscsiadm -m discovery -t st -p <target-ip>
.