1

My 10.1.1.100 have 10 Targets. I'm initially connected to single Target by running

iscsiadm --mode node --targetname iqn.2005-06.com.drobo:b800i.1112.id5 --portal 10.1.1.100:3260 --login

It only shows one drive connected when I type fdisk -l (example /dev/sdb ). The problem is if I restart the iscsid service and again run fdisk -l, it shows all the targets. /dev/sdb, /dev/sdc, /dev/sdd ....etc.

How do I avoid this problem? I only want to connect to the target I wanted.

1
  • Which distro and release of Linux? Oct 7, 2014 at 13:57

2 Answers 2

3

It sounds like you have discovered all these targets and they will have been populated into the client database. Depending on your OS, the node.startup could be set to automatic in (/etc/iscsi/iscsid.conf), so iscsid will log into each of them upon initialisation.

To check, run the command:

iscsiadm -m node

If this shows all 10 targets and you only want one specific one, then you could delete the targets that you do not want to log into on the client by using the --op=delete argument.
Using the target that you want to keep as an example:

iscsiadm --mode node --targetname iqn.2005-06.com.drobo:b800i.1112.id5 --portal 10.1.1.100:3260 --op=delete

If you just want to connect to the first available target on that host and then not log into any more, then that is slightly different. In that case you will need to set node.leading_login to Yes which will login on each iface available until it succeeds then stop.

1

You can identify loged-in iSCSI targets by their path. In your case it will be -

/dev/disk/by-path/ip-10.1.1.100:3260-iscsi-iqn.2005-06.com.drobo:b800i.1112.id5-lun-0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .