ZFS iscsi LUN not mounting from the iscsi initiator

I set up 2 data sets from my zpool:

zfs create -V 8T zroot/vol1
zfs create -V 8T zroot/vol2


Code:
zroot/vol1          8.25T  11.7T   136K  -
zroot/vol2          8.25T  11.7T   136K  -

I tweaked my istgt.conf

Code:
[Global]
  Comment "Global section"
  NodeBase "iqn.2015-06.local.mydomain.san"

  PidFile /var/run/istgt.pid
  AuthFile /usr/local/etc/istgt/auth.conf

  MediaDirectory /var/istgt

  LogFacility "local7"

  Timeout 30
  NopInInterval 20

  DiscoveryAuthMethod Auto

  MaxSessions 16
  MaxConnections 4

  MaxR2T 32
  MaxOutstandingR2T 16
  DefaultTime2Wait 2
  DefaultTime2Retain 60
  FirstBurstLength 262144
  MaxBurstLength 1048576
  MaxRecvDataSegmentLength 262144

  InitialR2T Yes
  ImmediateData Yes
  DataPDUInOrder Yes
  DataSequenceInOrder Yes
  ErrorRecoveryLevel 0

[UnitControl]
  Comment "Internal Logical Unit Controller"
  #AuthMethod Auto
  AuthMethod CHAP Mutual
  AuthGroup AuthGroup10000
  Portal UC1 127.0.0.1:3261
  Netmask 127.0.0.1

[PortalGroup1]
  Comment "SINGLE PORT TEST"
  Portal DA1 192.168.13.76:3260

[InitiatorGroup1]
  Comment "Initiator Group1"
  InitiatorName "ALL"
  Netmask 192.168.13.0/24

[LogicalUnit1]
  Comment "esx volume 1"
  TargetName vol1
  TargetAlias "vol1"
  Mapping PortalGroup1 InitiatorGroup1
  AuthMethod Auto
  AuthGroup AuthGroup1
  UseDigest Auto
  UnitType Disk
  LUN0 Storage /dev/zvol/zroot/vol1 Auto

[LogicalUnit2]
  Comment "esx volume 2"
  TargetName vol2
  TargetAlias "vol2"
  Mapping PortalGroup1 InitiatorGroup1
  AuthMethod Auto
  AuthGroup AuthGroup1
  UseDigest Auto
  UnitType Disk
  LUN0 Storage /dev/zvol/zroot/vol2 Auto

auth.conf
Code:
[AuthGroup1]
  Comment "Auth Group1"
  Auth "iscsi" "test123!"

[AuthGroup10000]
  Comment "Unit Controller's users"
  Auth "testuser" "secret" "mutual user" "mutual secret"
  Auth "onlysingle" "secret"

istgtcontrol.conf
Code:
[Global]
  Comment "sample configuration"
  Timeout 60

  AuthMethod CHAP Mutual
  Auth "testuser" "secret" "mutual user" "mutual secret"

  Host localhost
  Port 3261

Everything looks fine:

Code:
istgt version 0.5 (20121028)
normal mode
using kqueue
using host atomic
LU1 HDD UNIT
LU1: LUN0 file=/dev/zvol/zroot/vol1, size=8796093022208
LU1: LUN0 17179869184 blocks, 512 bytes/block
LU1: LUN0 8192.0GB storage for iqn.2015-06.local.mydomain.san:vol1
LU1: LUN0 serial 10000001
LU1: LUN0 read cache enabled, write cache enabled
LU1: LUN0 command queuing enabled, depth 32
LU2 HDD UNIT
LU2: LUN0 file=/dev/zvol/zroot/vol2, size=8796093022208
LU2: LUN0 17179869184 blocks, 512 bytes/block
LU2: LUN0 8192.0GB storage for iqn.2015-06.local.mydomain.san:vol2
LU2: LUN0 serial 10000002
LU2: LUN0 read cache enabled, write cache enabled
LU2: LUN0 command queuing enabled, depth 32

$ sudo istgtcontrol list
Code:
iqn.2015-06.local.mydomain.san:vol1
iqn.2015-06.local.mydomain.san:vol2
DONE LIST command

My initiator finds the target but it will not mount the volumes? Did I miss a zfs step?

Thanks
 
Turns out it was a problem with my port binding setup in vmware under storage adapters-> iscsi adapter -> network config.

Thanks
 
If you're on FreeBSD 10.0 or higher is there a reason you're using the istgt port rather than the built in kernel iSCSI target (ctld)? There's some pretty interesting work going on with the built in target and I think it's what most users are expected to use these days unless there's a specific reason not to.

ctld in the manual:
https://www.freebsd.org/doc/handbook/network-iscsi.html
BSDcan slides showing some pretty awesome performance optimisation by supporting vmware (VAAI) extensions:
https://www.bsdcan.org/2015/schedule/events/537.en.html
 
To be honest I've had very little experience with either and done no serious testing. Although fairly new, ctld should perform better as it's not having to move data between userspace/kernel.

The main concern really is that pretty much all effort these days is on CTL and the subsystems around it. I expect support for the various iSCSI ports (which has never been that good) to wane, from both the community and developers as everyone puts their attention towards the native iSCSI stack.
 
I will definitely look at switching to ctl then as its a new deployment. Thanks for your input.
 
Back
Top