Starting maybe a month ago I started having iscsi errors and failures to mount. This roughly coincided with the update of 20.04.3. Trying to cut to the chase I issued the following commands:
root@cor8910:~# iscsiadm -m discovery -t sendtargets -p readynas2
172.16.7.2:3260,1 iqn.2011-09.nas-8B-3E-60:thunderbird
172.16.7.2:3260,1 iqn.2011-09.nas-8B-3E-60:vmguests
root@cor8910:~# iscsiadm -m discovery -t sendtargets -p readynas1
172.16.0.2:3260,1 iqn.1994-11.com.netgear:readynas1:7f8962cc:ubuntu18.04.5
The above output is correct
However when issuing
iscsiadm -m node -o show I get 4 records
BEGIN RECORD 2.0-874
node.name = iqn.2011-09.nas-8B-3E-60:thunderbird
.
.
.
node.conn[0].address = 172.16.7.2
node.conn[0].port = 3260
#end record
#Begin record 2.0-874
node.name = iqn.2011-09.nas-8B-3E-60:vmguests
.
.
node.conn[0].address = readyNAS1
#END RECORD
That one is BAD as connection addr is readyNAS2 not 1, and should be dotted decimal
BEGIN RECORD 2.0-874
node.name = iqn.2011-09.nas-8B-3E-60:vmguests
.
.
.
node.conn[0].address = 172.16.7.2<
br/> node.conn[0].port = 3260
#END RECORD
This one is correct but why is the address dotted decimal and why was previous hosts synomym?
BEGIN RECORD 2.0-874
node.name = iqn.1994-11.com.netgear:readynas1:7f8962cc:ubuntu18.04.5
...
node.conn[0].address = 172.16.0.2
END RECORD
BEGIN RECORD 2.0-874
node.name = iqn.1994-11.com.netgear:readynas1:7f8962cc:ubuntu18.04.5
...
node.conn[0].address = readynas1
#end record
Last one is fine as well.
I cannot get rid of that bad node record
Doc I have googled indicates a /var/lib/iscsi which ubuntu does not have.
root@cor8910:~# ls -al /etc/iscsi/nodes/ total 20
drw------- 4 root root 4096 Oct 9 15:31 iqn.1994-11.com.netgear:readynas1:7f8962cc:ubuntu18.04.5
drw------- 3 root root 4096 Oct 9 15:31 iqn.2011-09.nas-8B-3E-60:thunderbird
drw------- 4 root root 4096 Oct 9 15:31 iqn.2011-09.nas-8B-3E-60:vmguests
I think the problem may have been in defaults subfolder which I moved to a safer place. However, the thunderbird folder still does not get logged in and mounted via fstab. the others do. Once booted I can issue an iscsiadm to login all and manually mount the thunderbird lun where the Thunderbird profile is pointing to it.
I'd like to be able to correct whatever is wrong but in the absence of discovering what is wrong if I purged open-iscsi and re-installed it would that resolve the problem? How does the configuration know in the case of 'readyNAS2' Netgear's ultra 4 NAS unit to refer to it by dotted decimal where 'readyNAS1' Netgear's 214 NAS is picking up the host file synonym for it's address?
After having thought through the pros/cons I purged iscsiadm and re installed it. This actually worked fine, static targets were found and login proceeded speedily. However, upon reboot, post reinstall, the problem reoccurred and I discovered there is something in the startup that creates the static nodes incorrectly. According to man iscsiadm the only type of discovery is sendtarget, isns. NO STATIC, yet it appears to build and use and fail.