Due to accident of history I have several large iSCSI storage arrays. So of course the only thing to do is make a ZFS pool RAIDZ'ed across them. So I created several iSCSI shares on the arrays and gave permissions for my FreeBSD box to connect to them, created an /etc/iscsi.conf with the info on how to connect to them, issued the appropriate iscontrol commands to connect, added the resulting block devices to a ZFS RAIDZ pool, voila.
Here's the problem: On a reboot, how do I get my iSCSI initiators connected before ZFS comes up and tries to mount its pools? Thus far, the only way I can figure to do this is to hack the /etc/rc.d/zfs script at the very top of zfs_start to start up the initiators in via iscontrol (and pausing for five seconds or so to let the connects happen) before falling into the start routine proper. Otherwise my initiators don't start up before ZFS, ZFS doesn't find its pool, and ZFS says "eh, I'm just quitting" and gives up.
Am I just fundamentally misunderstanding something here, or is there really no way to get those iSCSI initiators auto-starting (other than via this hack) before ZFS tries to mount the pools on them?
Here's the problem: On a reboot, how do I get my iSCSI initiators connected before ZFS comes up and tries to mount its pools? Thus far, the only way I can figure to do this is to hack the /etc/rc.d/zfs script at the very top of zfs_start to start up the initiators in via iscontrol (and pausing for five seconds or so to let the connects happen) before falling into the start routine proper. Otherwise my initiators don't start up before ZFS, ZFS doesn't find its pool, and ZFS says "eh, I'm just quitting" and gives up.
Am I just fundamentally misunderstanding something here, or is there really no way to get those iSCSI initiators auto-starting (other than via this hack) before ZFS tries to mount the pools on them?