# ESXi iscsi storage failing to update after 10->13 upgrade



## ilemur (Mar 2, 2022)

Was running successfully a single server of ESXi. Inside was FreeBSD machine with a pass-through LSI2308 controller with 4 disks in a zfs volume. Everything was fine. This storage was passed to ESXi via iSCSI (ctld(8)). Everything was working excellent until I upgraded to 12 (and then 13) version. Now upon restart the FreeBSD storage is not detected in ESXi. I have to rescan, rescan, edit iscsi setting and something in between it works...

ctl.conf is unchanged

```
portal-group pg0 {
        discovery-auth-group no-authentication
        listen 172.xxx
        listen [::]
}

target iqn.2022.local.xxx:target0 {
        auth-group no-authentication
        portal-group pg0

        lun 0 {
        path /dev/zvol/istorage/iscsi

}
}
```


----------



## ilemur (Mar 3, 2022)

grahamperrin said:


> Is configuration file validity tested? <https://www.freebsd.org/releases/13.0R/relnotes/#storage-general> option `-t`


If it wouldn't be valid it wouldn't have worked at all )
Once again it works. But it takes quite an effort to rescan everything several several times.


----------



## grahamperrin@ (Mar 3, 2022)

Thanks. Which version of FreeBSD, exactly? `uname -aKU`

<https://cgit.freebsd.org/src/log/?qt=grep&q=iscsi>, <https://cgit.freebsd.org/src/log/?qt=grep&q=iscsi&h=stable/13>, at a glance, is anything relevant?


----------



## ilemur (Mar 3, 2022)

grahamperrin said:


> Thanks. Which version of FreeBSD, exactly? `uname -aKU`
> 
> <https://cgit.freebsd.org/src/log/?qt=grep&q=iscsi>, <https://cgit.freebsd.org/src/log/?qt=grep&q=iscsi&h=stable/13>, at a glance, is anything relevant?


Believe the latest as the switch was 5 days ago


----------



## ilemur (Mar 13, 2022)

grahamperrin said:


> Thanks. Which version of FreeBSD, exactly? `uname -aKU`
> 
> <https://cgit.freebsd.org/src/log/?qt=grep&q=iscsi>, <https://cgit.freebsd.org/src/log/?qt=grep&q=iscsi&h=stable/13>, at a glance, is anything relevant?


Ok finally got to this machine
uname -aKU
FreeBSD eve.lemurs.local 13.0-RELEASE-p7 FreeBSD 13.0-RELEASE-p7 #0: Mon Jan 31 18:24:03 UTC 2022     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64 1300139 1300139


Looking through the buds you posted not much i can see
In syslogs of esx47i i seee this

[FONT=Calibri]2022-03-13T15:43:32Z iscsid: connection login retries (reopen_max) 5 exceeded
2022-03-13T15:43:32Z iscsid: discovery_sendtargets::Completed discovery on IFACE iscsi_vmk@vmk1(iscsi_vmk) target addr=172.16.xxx.15:3260 transport=iscsi_vmk UniqueTgt=0 DuplicateTgt=0
2022-03-13T15:43:32Z iscsid: Login Target: iqn.2022.localxxx:target0 if=iscsi_vmk@vmk1 addr=172.16.xxx.15:3260 (TPGT:257 ISID:0x1)
2022-03-13T15:43:32Z iscsid: Notice: Assigned (H37 T0 C0 session=13, target=3/3)
2022-03-13T15:43:32Z iscsid: Notice: Setting NODELACK for target=iqn.2022.local.xxx:target0 (host=172.16.xxx.15)
2022-03-13T15:43:32Z iscsid: DISCOVERY: transport_name=iscsi_vmk Pending=1 Failed=0
2022-03-13T15:43:32Z iscsid: DISCOVERY: transport_name=iscsi_vmk Pending=1 Failed=0
2022-03-13T15:43:32Z iscsid: DISCOVERY: transport_name=iscsi_vmk Pending=1 Failed=0
2022-03-13T15:43:32Z iscsid: connect failed (111,Connection refused)
2022-03-13T15:43:32Z iscsid: Login Failed: iqn.2022.local.xxx:target0 if=iscsi_vmk@vmk1 addr=172.16.xxx.15:3260 (TPGT:257 ISID:0x1) Reason: 00040000 (Initiator Connection Failure)
2022-03-13T15:43:32Z iscsid: Notice: Reclaimed Channel (H37 T0 C0 oid=3)
2022-03-13T15:43:32Z iscsid: Notice: Reclaimed Target (H37 T0 oid=3)
2022-03-13T15:43:33Z iscsid: DISCOVERY: transport_name=iscsi_vmk Pending=0 Failed=1[/FONT]


----------



## ilemur (Mar 14, 2022)

Ok this is it. as simple as that. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254432 How could such a bug get into the production release?!


----------

