This is an old revision of the document!
sudo apt-get install open-iscsi
enable auto login
... node.startup = automatic ...
iscsiadm -m discovery -t st -p <IP>
iscsiadm -m node --targetname "<TARGET_NAME>" --login
killall -HUP istgt
or
/usr/local/etc/rc.d/istgt reload
[LogicalUnit<##>] TargetName "<NAME>" TargetAlias "<NAME>" Mapping PortalGroup1 InitiatorGroup1 AuthMethod Auto UseDigest Auto ReadOnly No UnitType Disk UnitInquiry "FreeBSD" "iSCSI Disk" "0123" "10000001" UnitOnline yes BlockLength 512 QueueDepth 32 LUN0 Storage <PATH> <SIZE>|auto LUN0 Option Serial 100000010
portal-group pg0 { discovery-auth-group no-authentication listen 0.0.0.0 listen [::] } target iqn.zfs1.bsdnet.us:fileTarget { auth-group no-authentication portal-group pg0 lun 0 { path /vol1/iscsi/fileTarget size 20G } }