Is it possible to get the iQSI initiator of the IQN of another Linux machine?

On a local machine, I can just do

cat /etc/iscsi/initiatorname.iscsi 

to get the IQN that is sent to the targets when creating an iSCSI session. I am trying to find out if it is possible to install another IQN machine initiator without ssh'ing. This is because, given the set of IP addresses or hostnames that I don’t control, I need to configure goals to allow ISCSI inputs from only these machines.

It seems that this is not possible, for example, iscsiadm. I suppose the answer is no, but I am not an expert in iSCSI, so I ask anyway. If the answer is β€œNo”, we will have to solve the problem in some other way, perhaps by requiring the initiators to be configured using the IQN from a known pool or even that the IQN is installed on all these machines the same way (I suspect that with the last workaround be adverse effects, but I'm not sure).

+4
source share
3 answers

There is no in-band way to get the IQN of the initiator of the remote machine until it tries to connect to your target. It’s best to assign them an IQN that you know about. Definitely do not give them the same IQN; it will only give you a headache later. If you cannot assign them, then:

  • Just ask the hosts to connect to your target and pull the IQN from the target logs when it rejects the login attempt.
  • Or, if you cannot ssh to them, maybe you have ssh hosts to drop their IP and IQNs in a centralized place where you have some control?
+1
source

Is it possible to install iSNS?

0
source

In this case, it seems that you will need clients to send their IQN ahead of time, so you can add it to the list of allowed initiators.

0
source

Source: https://habr.com/ru/post/1447460/


All Articles