Lately I wanted to bring the advantages of ZFS (on Solaris 11 Express) to a Linux box using iSCSI. After following the Oracle guide, I’ve noticed an unexpected behaviour when discovering the iSCSI targets (from a CentOS host):

[root@zimbra ~]# iscsiadm -m discovery -t sendtargets -p,1,1 ... [root@zimbra ~]#

That is, the iSCSI target was bound to all the avaible interfaces (including ip addresses of zones).

To avoid this behavior it’s enough to create a “target portal group”, assign a specific interface to it and then bind targets to the tpg. Follows an example:

root@scytale:~# itadm create-tpg tpg-scytale root@scytale:~# itadm list-target TARGET NAME STATE SESSIONS online 1 root@scytale:~# itadm modify-target -t tpg-scytale Target successfully modified root@scytale:~#