Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Sep 2007 10:07:57 -0500
From:      Craig Boston <cb@severious.net>
To:        freebsd-hackers@FreeBSD.org
Subject:   Re: iSCSI Target and raw devices
Message-ID:  <20070926150756.GA26578@nowhere>
In-Reply-To: <46F98972.80403@datapipe.com>
References:  <46F98972.80403@datapipe.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 25, 2007 at 06:19:30PM -0400, Mark Saad wrote:
> Does anyone know off hand if this works in FreeBSD or NetBSD?

The last time (about 1.5 months ago) I tried the iSCSI target from
ports -- net/iscsi-target, it had some issues.

The first was that it didn't work with raw devices.  The cause was that
in a couple places it tries to read a single byte from the device, but
on FreeBSD where everything is a character device you have to read using
the block size.  I suspect that NetBSD still has buffered block devices
so it isn't an issue there.

I hacked it locally to read 512 (at mediasize-512 instead of
mediasize-1) for its test and that seemed to work, but it was pretty
ugly.  The right way would be to use an ioctl to get the block size I
think.

The other thing was that it was listening on a different port number
than the FreeBSD initiator was trying to connect to.  For some reason
even though iscsi-target claims to have a "-p" option to specify the
port number, after reading the code it was clear that it doesn't
actually use that value for anything and instead is hardcoded to use
whatever is in /etc/services.

I checked the NetBSD cvs and the same issue existed there.  Reading the
code gave me the distinct impression that it was incomplete.

>  The second question what iscsi initiators are out there ? Along time 
> ago Lucent had iscsi software for FreeBSD 4.x which has initiator 
> support but this has a restrictive license and does not support anything 
> newer then 4.9-RELEASE .  Does anyone know what else could possibly be 
> used on 6-STABLE ?

I'm not sure about 6-STABLE, though a kernel initiator was added to 7
not too long ago.

Craig



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070926150756.GA26578>