iSCSI boot driver version 0.1.1 for iBFT
Daisuke Aoyama
aoyama at peach.ne.jp
Thu Jun 24 18:13:39 UTC 2010
Hello,
I made small device driver for the first time. It is published on my blog.
Because it is written in Japanese, I try to write here.
This module provides initial connection of the iSCSI target with setting
via iBFT (iSCSI Boot Firmware Table). Currently, it is intended to use
Intel NIC and istgt (iSCSI target). Any other cards, targets may not work.
Also, I'm developing under FreeBSD 7.3. (build check under 8.1)
Please refer to Microsoft website about iBFT:
http://www.microsoft.com/whdc/system/platform/firmware/ibft.mspx
I did't use iscsi_initiator.ko within kernel module. So, I'm creating
a small version of initiator based on iscsi-2.2.4 and istgt-20100606.
Now it have only one cmd holding space in the iSCSI session and use
polling. It should be added the queuing/asynchronous operation :)
After loading it via /boot/loader.conf, you can install to/boot from the
iSCSI target as same as a local SCSI harddisk. Complex settings such as
TFTP, NFS, DHCP and PXE are no longer needed. Just use /dev/da0 and so on.
How to compile:
isboot is a stand alone iSCSI initiator, but source code is depend on
the header file of iscsi-2.2.4. You need to extract iscsi-2.2.4 before
compiling isboot.
# cd /usr/src
# tar xvf /path/to/iscsi-2.2.4.tar.gz
# tar xvf /path/to/isboot-0.1.1.tar.gz
# make buildkernel
# make installkernel
or
# cd /usr/src/sys/modules/iscsi/isboot
# make obj
# make depend
# make all
# make install
After above install, you have /boot/kernel/isboot.ko.
Using as module:
Add isboot_load="YES" to /boot/loader.conf.
Setup iSCSI target. (recommend istgt-20100407 or later)
Configure NIC BIOS to connect the target.
Try to boot the server.
If the NIC find the target, iBFT can be found by isboot.
Then, isboot create own bus for CAM device with iBFT parameters.
All LUNs in the target are appeared in the bus.
Once FreeBSD + isboot is booted, you can handle it by camcontrol and
other normal way as same as SCSI HDD.
If you want full install and boot demo, please download
FreeNAS 0.7.2 5226 p4 from my blog and try it without local harddisk.
FYI: FreeNAS 0.7.1 5127 (stable) includes istgt-20100407.
FYI: FreeNAS 0.7.2 5226 p3 includes istgt-20100606.
FYI: FreeNAS 0.7.2 5226 p4 includes istgt-20100606 + isboot-0.1.1.
sysctl MIBs (read only):
net.isboot.version
net.isboot.nic
net.isboot.device
hw.ibft.nic_gateway
hw.ibft.nic_prefix
hw.ibft.target_lun
hw.ibft.target_port
hw.ibft.target_address
hw.ibft.target_name
hw.ibft.initiator_address
hw.ibft.initiator_name
Performance (read from the target):
All using Intel PRO/1000 PT Server Adapter.
istgt 20100606 + isboot 0.1 with header/data digest(CRC32C):
# dd if=/dev/da6 of=/dev/null bs=1m count=1k
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 20.452429 secs (52499477 bytes/sec)
istgt 20100606 + isboot 0.1 with header digest:
# dd if=/dev/da6 of=/dev/null bs=1m count=1k
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 17.684945 secs (60715022 bytes/sec)
istgt 20100606 + isboot 0.1 without digest:
# dd if=/dev/da6 of=/dev/null bs=1m count=1k
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 17.508400 secs (61327239 bytes/sec)
Notes/Known Issues/Limitations:
bootup/reconnect time might be a little long.
ifconfig(8),route(8),etc should not change booted NIC and critical path.
Unload the module will cause to panic.
IPv6 is not tested.
DNS is not configured.
Queuing is not supported at this time.
CHAP is not supported at this time.
Can't configure iSCSI parameter without modifing soure code.
Can't reject running XPT command when the socket is lost.
Can't exchange the session to iscsi_initiator.ko.
The source code depend on iscsi initiator's structure.
(first I tried to use it, but finally gave up)
The controller such as iscontrol(8) is not provided.
Documentation is not written.
I'm new to the kernel land. If you have any suggestion, please tell me.
Download here (the page is Japanese only):
isboot-0.1.1
http://shell.peach.ne.jp/aoyama/archives/1179
FreeNAS 0.7.2 5226 p4
http://shell.peach.ne.jp/aoyama/archives/1181
FYI: danny's iscsi initiator:
ftp://ftp.cs.huji.ac.il/users/danny/freebsd/iscsi-2.2.4.tar.gz
Regards,
Daisuke Aoyama
More information about the freebsd-scsi
mailing list