From owner-freebsd-scsi@FreeBSD.ORG Sat Oct 8 10:07:46 2005 Return-Path: X-Original-To: scsi@freebsd.org Delivered-To: freebsd-scsi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 73B3416A41F; Sat, 8 Oct 2005 10:07:46 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 097D143D46; Sat, 8 Oct 2005 10:07:46 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1EOBcG-0006dr-CJ; Sat, 08 Oct 2005 13:07:44 +0300 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: "Kenneth D. Merry" In-reply-to: Your message of Fri, 7 Oct 2005 11:10:45 -0600 . Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 08 Oct 2005 13:07:44 +0300 From: Danny Braniss Message-ID: Cc: scsi@freebsd.org Subject: Re: 2048kb block size X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2005 10:07:46 -0000 > On Fri, Oct 07, 2005 at 15:42:04 +0300, Danny Braniss wrote: > > can the da(4) handle non 512 block size? im asking because at 512 all is ok, > > but 2048 does not get past geom. > > > > the iSCSI driver has no idea about blocksize, and seems to be doing the right > > thing: > > Oct 5 15:44:45 rnd kernel: da0: 10239MB (5242368 2048 byte sectors: 255H > > 63S/T 326C) > > That looks about right. The da(4) driver does work with optical disks that > have 2K sectors. (Or it has in the past.) > > > what am i missing? or in other words, is there something i have to do in the > > iscsi driver to fix this? > > If you want to eliminate the da(4) driver and GEOM, you can try sending a > read via the pass(4) driver. This should work: > > camcontrol cmd da0 -v -c "28 0 0 0 0 0 0 0 1 0" -i 2048 - > /tmp/da0.sec0 > > That will read one block from da0, starting at sector 0. > > You can increase the number of blocks or read from somewhere else on the > disk as well by changing the CDB around. > > That path doesn't go through the da(4) driver or GEOM, so you can eliminate > both of those as possible causes of the problem. I'm happy to report that both da(4) and geom work just fine with sector size = 2k, the problem is in sysinstall! (it did the fdisk ok, but label/newfs bombs). Using bsdlabel -w /dev/da0s1, all is ok! thanks Ken, danny