From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 26 15:07:59 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4107716A418 for ; Wed, 26 Sep 2007 15:07:59 +0000 (UTC) (envelope-from cb@severious.net) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.freebsd.org (Postfix) with ESMTP id 48EEA13C47E for ; Wed, 26 Sep 2007 15:07:59 +0000 (UTC) (envelope-from cb@severious.net) Received: by ion.gank.org (Postfix, from userid 1001) id E0055117A8; Wed, 26 Sep 2007 10:07:58 -0500 (CDT) Date: Wed, 26 Sep 2007 10:07:57 -0500 From: Craig Boston To: freebsd-hackers@FreeBSD.org Message-ID: <20070926150756.GA26578@nowhere> Mail-Followup-To: Craig Boston , freebsd-hackers@FreeBSD.org References: <46F98972.80403@datapipe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46F98972.80403@datapipe.com> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: iSCSI Target and raw devices X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Sep 2007 15:07:59 -0000 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