先日の結果からIntelのCTデスクトップアダプタでもWS2008がiSCSI起動可能
であることが実証できたので今度はWindows7をインストールしてみました。
今回は20100522版のターゲットを使って検証しました。
利用したターゲットの主な設定は以下の通り。
[Global]
MaxSessions 16
MaxConnections 4
MaxR2T 256
MaxOutstandingR2T 16
DefaultTime2Wait 2
DefaultTime2Retain 60
FirstBurstLength 262144
MaxBurstLength 1048576
MaxRecvDataSegmentLength 262144
[LogicalUnit80]
TargetName “iqn.2007-09.jp.ne.peach:artemis-boot”
Mapping PortalGroup1 InitiatorGroup80
AuthMethod Auto
UseDigest Auto
UnitType Disk
QueueDepth 64
LUN0 Storage /tank/isboot/artemis-boot 64GB
結論から言うと、インストールできません。(すみません・・・
追加したR2Tの処理にバグがありました。
TL>FB+MBの特殊な条件下で追加のR2Tを送信しないため、データ受信待ちが
タイムアウトしてしまいます。<再処理になりますが同じ場所で同様に略
不幸中の幸い?(皮肉にも?)、タイムアウトのエラー処理が正しく実行できる
と言う事が実証できたわけですが。
とりあえずの修正は以下のようにすると動きます。
Index: src/istgt_iscsi.c
===================================================================
--- src/istgt_iscsi.c (revision 36)
+++ src/istgt_iscsi.c (working copy)
@@ -4016,6 +4016,10 @@
ISTGT_WARNLOG("pending_pdus > 0\n");
}
if (offset < transfer_len) {
+ if (offset >= (first_burst_len + max_burst_len)) {
+ /* need more data */
+ r2t_flag = 0;
+ }
len = DMIN32(max_burst_len,
(transfer_len - offset));
memset(&data_pdu.bhs, 0, ISCSI_BHS_LEN);
ベンチマークの結果は以下の通りで、ほぼ期待通りのピーク性能が検証できました。
というわけで、今後の事もあるので、作業用マシンをXPからW7に移行しようと思いました。



istgt 20100522 (ports版)ですが、core dumpします。
環境は、FreeBSD 7.3 amd64
istgt.confの設定は
[Global]
Comment “Global section”
# node name (not include optional part)
NodeBase “適当”
# files
PidFile /var/run/istgt.pid
AuthFile /usr/local/etc/istgt/auth.conf
# syslog facility
LogFacility “local7″
# socket I/O timeout sec. (polling is infinity)
Timeout 30
# NOPIN sending interval sec.
NopInInterval 20
# authentication information for discovery session
DiscoveryAuthMethod Auto
#DiscoveryAuthGroup AuthGroup9999
# reserved maximum connections and sessions
# NOTE: iSCSI boot is 2 or more sessions required
#MaxSessions 32
#MaxConnections 8
MaxSessions 16
MaxConnections 4
# maximum number of sending R2T in each connection
# actual number is limited to QueueDepth and MaxCmdSN and ExpCmdSN
# 0=disabled, 1-256=improves large writing
MaxR2T 32
# iSCSI initial parameters negotiate with initiators
# NOTE: incorrect values might crash
FirstBurstLength 65536
MaxBurstLength 262144
MaxOutstandingR2T 16
DefaultTime2Wait 2
DefaultTime2Retain 60
FirstBurstLength 262144
MaxBurstLength 1048576
(ちょっと略)
# TargetName, Mapping, UnitType, LUN0 are minimum required
[LogicalUnit1]
Comment “Hard Disk Sample”
# full specified iqn (same as below)
#TargetName iqn.2007-09.jp.ne.peach.istgt:disk1
# short specified non iqn (will add NodeBase)
TargetName disk1
TargetAlias “Data Disk1″
# use initiators in tag1 via portals in tag1
Mapping PortalGroup1 InitiatorGroup1
# Mapping PortalGroup2 InitiatorGroup2
# accept both CHAP and None
AuthMethod Auto
AuthGroup AuthGroup1
UnitType Disk
# Queuing 0=disabled, 1-255=enabled with specified depth.
QueueDepth 32
#QueueDepth 0
LUN0 Storage /data/iSCSI/iscsi-target0 50GB
(gdb) bt
#0 0x0000000800bc7bc9 in free () from /lib/libc.so.7
#1 0x00000000004559ec in xfree (p=0x800faf000) at istgt_misc.c:101
#2 0x0000000000422d09 in istgt_lu_destroy_task (lu_task=0x800fa3260) at istgt_lu.c:2146
#3 0×0000000000418890 in worker (arg=0x800fa0000) at istgt_iscsi.c:4980
#4 0x0000000800a474d1 in pthread_getprio () from /lib/libthr.so.3
#5 0×0000000000000000 in ?? ()
Cannot access memory at address 0x7fffff5fc000
20100516版ではcoredumpせず、freeでcoredumpしているという事は、
20100521版の
8KB以下のショートパケットにデータ領域を作成しないようになりました。
あたりが怪しいのでしょうかね
とりあえず20100516で使用します。
nsby 様
報告ありがとうございます。
停止している付近のソースを見た所、
少なくとも以下のような修正がないとダメかと思われます。
このパッチを入れて試して頂けませんか?
その他の箇所に修正が必要かどうかはこれから調べます。
Index: istgt_lu.c
===================================================================
— istgt_lu.c (revision 36)
+++ istgt_lu.c (working copy)
@@ -2141,7 +2141,9 @@
if (lu_task->lu_cmd.pdu != NULL) {
if (lu_task->lu_cmd.pdu->copy_pdu == 0) {
xfree(lu_task->lu_cmd.pdu->ahs);
- xfree(lu_task->lu_cmd.pdu->data);
+ if (lu_task->lu_cmd.pdu->data != lu_task->lu_cmd.pdu->shortdata) {
+ xfree(lu_task->lu_cmd.pdu->data);
+ }
}
xfree(lu_task->lu_cmd.pdu);
}
nsbyです
パッチ当ててみました
コンパイルし接続してみた所、問題なく使用出来ています
(前は、接続時にいきなりこけていました)
長時間使用した訳ではないのですが、書き込み/読み込みも大丈夫そうです
すばやい対応有難うございます.
このバージョンで使用してみます