iSCSI inconsistency in 3-node cluster

tomgibson

Member
Dec 24, 2020
3
1
8
35
I have a 3-node cluster to which I have been attempting to add some iSCSI shared storage. The iSCSI target is on a FreeNAS host and I've configured it for Mutual CHAP. Two of the nodes in the cluster connect fine but the third just shows the storage as 'Active: No'. I have verified using diff that the contents of /etc/iscsid/iscsid.conf doesn't differ between working and non-working machines. FreeNAS is currently set to 'Allow All Initiators' for the target, although previously it listed the two working initiators in the 'Connected Initiators' list, so it definitely is set to support multiple connections. Both working and non-working nodes are updated to the same package versions (Proxmox 6.3-3). What else could I try to debug this?
 
Code:
iscsiadm -m discovery -t st -p freenas:3260 -l

What does that show
Running the above revealed that the host was trying to connect to the wrong IP - I had a different DNS server configured for the non-working host so the FreeNAS hostname was being resolved incorrectly. Fixed the DNS issue and it all started working immediately, thanks for enabling me to reveal my blunder!
 
Never ever rely on DNS for iscsi.
It adds a service dependency you don't want!
If you really want to use hostnames to connect to your iscsi target make sure to maintain them in the local hosts file.
 
Never ever rely on DNS for iscsi.
It adds a service dependency you don't want!
If you really want to use hostnames to connect to your iscsi target make sure to maintain them in the local hosts file.
You make an excellent point, there isn't really an advantage to using DNS for my use case as I don't plan on changing the target IP anyway. I'll switch it to IP to avoid this recurring :D
 
  • Like
Reactions: apoc