문제

On a local machine, I can just do

cat /etc/iscsi/initiatorname.iscsi

to get the IQN that is sent to targets when establishing an ISCSI session. What I am trying to find out is whether it is possible to establish another machine's initiator IQN without ssh'ing to it. This is because, given a set of IPs or hostnames of machines I have no control over, I need to set up targets to allow ISCSI logins from those machines only.

It doesn't seem to be possible using, e.g., iscsiadm. I'm assuming the answer is No, but I'm no expert in ISCSI, so asking anyway. If the answer is No, we'll have to deal with the problem in some other way, perhaps by requiring the initiators to be set up with IQNs from a known pool, or even that the IQN is set to the same on all those machines (I suspect there might be adverse consequences with the latter workaround, but I'm not sure).

도움이 되었습니까?

해결책

There's no in-band way to get the initiator IQN of a remote machine, until it tries to connect to your target. It's best to assign them IQN's you know about. Definitely don't give them the same IQN; that'll just give you headaches later. If you can't assign them, then:

  1. Just have the hosts attempt to connect to your target and get the IQN out of the target's logs when it rejects the login attempt.
  2. Or, if you can't ssh to them, perhaps have the hosts ssh out to drop their IP's and IQNs in a centralized place you have some control over?

다른 팁

Is it possible for you to set up an iSNS?

In this case, it sounds like you will need the clients to submit their IQN ahead of time so you can add it to your list of allowed initiators.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top