open-iscsi & iscsitarget no auto login

306 views
Skip to first unread message

Norguhtar

unread,
Apr 27, 2006, 6:27:31 AM4/27/06
to open-iscsi
Hello. I'm install iscsitarget & open-iscsi on my Gentoo Linux box. All
work fine but... I'f i'm not run
scsiadm -m node -r 7fdb81 -l after run iscsid. I'm don't get my iSCSI
storage. Why automatic not work?
software version: open-iscsi-1.0.514 iscsitarget-0.4.13
kernel: gentoo-sources 2.6.16-gentoo-r3

iscsiadm -m node -r 7fdb81

node.name = iqn.2010-01.test.local:storage.video.disk1
node.transport_name = tcp
node.tpgt = 1
node.active_conn = 1
node.startup = automatic
node.session.initial_cmdsn = 1
node.session.auth.authmethod = None
node.session.auth.username = <empty>
node.session.auth.password = <empty>
node.session.auth.username_in = <empty>
node.session.auth.password_in = <empty>
node.session.timeo.replacement_timeout = 120
node.session.err_timeo.abort_timeout = 10
node.session.err_timeo.reset_timeout = 30
node.session.iscsi.InitialR2T = No
node.session.iscsi.ImmediateData = Yes
node.session.iscsi.FirstBurstLength = 262144
node.session.iscsi.MaxBurstLength = 16776192
node.session.iscsi.DefaultTime2Retain = 0
node.session.iscsi.DefaultTime2Wait = 0
node.session.iscsi.MaxConnections = 0
node.session.iscsi.MaxOutstandingR2T = 1
node.session.iscsi.ERL = 0
node.conn[0].address = 192.168.200.201
node.conn[0].port = 3260
node.conn[0].startup = automatic
node.conn[0].tcp.window_size = 524288
node.conn[0].tcp.type_of_service = 0
node.conn[0].timeo.login_timeout = 15
node.conn[0].timeo.auth_timeout = 45
node.conn[0].timeo.active_timeout = 5
node.conn[0].timeo.idle_timeout = 60
node.conn[0].timeo.ping_timeout = 5
node.conn[0].timeo.noop_out_interval = 0
node.conn[0].timeo.noop_out_timeout = 0
node.conn[0].iscsi.MaxRecvDataSegmentLength = 131072
node.conn[0].iscsi.HeaderDigest = None,CRC32C
node.conn[0].iscsi.DataDigest = None
node.conn[0].iscsi.IFMarker = No
node.conn[0].iscsi.OFMarker = No

My setting. What's wrong ?

Albert Pauw

unread,
Apr 27, 2006, 7:25:49 AM4/27/06
to open-iscsi
If you look with dmesg you probably see the new scsi disk (/dev/sda or
similar).
Then you have to partition it with fdisk and create a filesystem on it
(mkfs - ext3 /dev/sda1 for partition one).

Nou you can mount the disk:

mount /dev/sda1 /mnt/mydisk

Automatic in this case will not mount the disc automatically, that's a
bit more complicated. Automatic only means that when starting
open-iscsi it will log in automatically into the target. Which means
the target have to be started before the initiator.

Albert

Norguhtar

unread,
Apr 27, 2006, 7:33:12 AM4/27/06
to open-iscsi
After run iscsid I'm go in dmesg only:
iscsi: registered transport (tcp)

If i'm run:
iscsiadm -m node -r 7fdb81 -l

i'm got in dmesg:
scsi14 : iSCSI Initiator over TCP/IP, v.0.3
sess_param(173) 0 1 1 262144 8192 262144 65536 2 0 1 1 1 0 2 1
Vendor: IET Model: VIRTUAL-DISK Rev: 0
Type: Direct-Access ANSI SCSI revision: 04
SCSI device sda: 80293248 512-byte hdwr sectors (41110 MB)
sda: Write Protect is off
sda: Mode Sense: 77 00 00 08
SCSI device sda: drive cache: write back
SCSI device sda: 80293248 512-byte hdwr sectors (41110 MB)
sda: Write Protect is off
sda: Mode Sense: 77 00 00 08
SCSI device sda: drive cache: write back
sda: sda1 sda2 sda3 < sda5 sda6 sda7 > sda4
sd 14:0:0:0: Attached scsi disk sda
sd 14:0:0:0: Attached scsi generic sg0 type 0

But i'm think it's shuld doing automatic.

Albert Pauw

unread,
Apr 27, 2006, 2:03:35 PM4/27/06
to open-iscsi
Ah I see, well only the start/stop script for RedHat/Fedora and SuSE
use the automatic setting.

There is a start/stop script for Debian, which is close to Gentoo, but
it doesn't use the automatic setting. Anyway, even if a target is
logged in automatically it isn't mounted automatically (yet).

Albert

Norguhtar

unread,
Apr 27, 2006, 10:57:01 PM4/27/06
to open-iscsi
>Anyway, even if a target is logged in automatically it isn't mounted automatically (yet).
Target not logged automatic. :( About mount i'm know.

Albert Pauw

unread,
Apr 28, 2006, 12:00:28 AM4/28/06
to open-iscsi
If you want, you can change the startup script for your Gentoo using
the part which looks for automatic setting in the RedHat or SuSE
script. You can find them in etc/initd of the open-iscsi distribution.

It is actually this bit:

TARGETS=`$ISCSIADM -m node 2> /dev/null | sed 's@\[\(.*\)\]
.*@\1@g'`
for rec in $TARGETS
do
STARTUP=`$ISCSIADM -m node -r $rec | grep
"node.conn\[0\].startu
p" | cut -d' ' -f3`
if [ $STARTUP = "automatic" ]
then
$ISCSIADM -m node -r $rec -l
fi
done

where $ISCSIADM is /usr/sbin/iscsiadm

Albert

Albert Pauw

unread,
Apr 28, 2006, 12:01:34 AM4/28/06
to open-iscsi
P.S. Sorry about the terrible break ups in the lines. Just copy the bit
from the originals.

Norguhtar

unread,
Apr 28, 2006, 1:04:17 AM4/28/06
to open-iscsi
It's already enable. Read first post. Okey i'm repeat. iscsd not read
iscsid.conf & databases at start. It read this when i'm run iscsiadm -m
node -r [recordid] -l.

Reply all
Reply to author
Forward
0 new messages