Starting iSCSI Initiator At Boot

Status
Not open for further replies.

Ed Blackmond

Cadet
Joined
Nov 17, 2014
Messages
3
I am using FreeNAS and iSCSI to aggregate storage from different systems creating a hyper-converged storage/compute environment. Each system with storage runs an iSCSI target server and exports each of its drives as a different LUN. The FreeNAS server runs the iSCSI initiator to load all the LUNs. This works just fine when I issue:
iscsictl -Aa
manually after boot, then import all the volumes. I would like to set this up to load automatically when the system boots. If I place:
iscsictl_enable=“YES”
iscsictl_flags=“-Aa”
into
/conf/base/etc/rc.conf
all the drives get loaded, but the system hangs in a loop with the iSCSI initiator attempting to “login” to the target servers. It does not get past this point, so the ssh daemon doesn’t get started and there is no way into the machine.

However, if I rename:
/conf/base/etc/rc.d/iscsictl
to
/conf/base/etc/rc.d/yyiscsictl
the iSCSI LUNs get loaded about 25 seconds after the FreeNAS menu gets displayed on the console. The ZFS volumes still must be imported manually. If I delete
/conf/base/etc/rc.d/iscsictl
rather than rename it, no iSCSI LUNs get loaded.

Question:
What is the best way to get the iSCSI LUNs loaded on boot so that they will be seen when FreeNAS looks at the drives and imports all the pools?

Configuration
In the interest of full disclosure, FreeNAS is running on a virtual machine using linux KVM as a hypervisor. I have read the posts on not doing this and don’t believe they apply here. The FreeNAS VM is assigned multiple cores and gets at least 1GB of RAM for each TB of storage.

I am running:
FreeNAS-9.3-STABLE-201501162230

The hardware running the FreeNAS VM is a SuperMicro X9DRT-IBFF motherboard with 256GB ECC-DRAM, two Intel E5-2658v2 (10 cores each), two on-board 1Ge ports, one on-board Mellanox Connect-X3 port configured as 40Ge and a two port Mellanox Connect-X3 card configured as 40Ge ports. The network interfaces are passed through to the FreeNAS VM using virtio. Two 25GB drive partitions (from different systems) are passed through to the FreeNAS VM using virtio for use as the mirrored ZFS root partition. The iSCSI traffic is on a dedicated 40be network interface. The other 40Ge interfaces are for accessing FreeNAS from other VMs and passing data between VMs.

The
/base/conf/etc/iscsi.conf
file contains:
hds8right {
InitiatorName = iqn.1992-05.com.themis.freenas
TargetAddress = 192.168.15.160
TargetName = iqn.1992-05.com.themis.iscsi.hds8right
}
hds8left {
InitiatorName = iqn.1992-05.com.themis.freenas
TargetAddress = 192.168.15.161
TargetName = iqn.1992-05.com.themis.iscsi.hds8left
}
 
J

jpaetzel

Guest
I think the FreeBSD handbook is wrong. Try adding iscsid_enable="YES" to /conf/base/etc/rc.conf
 

Ed Blackmond

Cadet
Joined
Nov 17, 2014
Messages
3
Yes, I have the iscsid_enable="YES" in /conf/base/etc/rc.conf. `iscsictl` does not work if `iscsid` is not running.

I haven't had a chance to look at this for a while, but it does work in FreeBSD10. FreeBSD10 boots, all the iSCSI LUNs get attached, zfs finds them and mounts all the pools.

In FreeNAS 9.3 it has to be done manually. It then works fine.
 
D

dlavigne

Guest
If you create a bug report at bugs.freenas.org, post the issue number here.
 

jianmoto

Dabbler
Joined
Jan 25, 2015
Messages
28
Yes, I have the iscsid_enable="YES" in /conf/base/etc/rc.conf. `iscsictl` does not work if `iscsid` is not running.

I haven't had a chance to look at this for a while, but it does work in FreeBSD10. FreeBSD10 boots, all the iSCSI LUNs get attached, zfs finds them and mounts all the pools.

In FreeNAS 9.3 it has to be done manually. It then works fine.
I met the same problem as you. And did you find a solution for this now? I don't want to use freenas 10 because i have change a lot of things with freenas9.3.
If you find the solution of this,please post to this forum.
thank you very much.
 
D

dlavigne

Guest
Did anyone create a bug report? If not, someone should and post the issue number here so that the underlying issue can get fixed.

Noone wants to be running FreeNAS 10 for at least another 6 months, it is still very much in pre-alpha stage.
 

nanopete

Dabbler
Joined
Nov 20, 2014
Messages
47
Are we up to where this is working on the latest 9.3?
(guess I will try if no one says it doesn't)
 
Status
Not open for further replies.
Top