From owner-freebsd-scsi@FreeBSD.ORG Wed May 7 23:20:36 2008 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1CBB1065677 for ; Wed, 7 May 2008 23:20:36 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 590BA8FC0A for ; Wed, 7 May 2008 23:20:36 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id m47NKWfL056343; Wed, 7 May 2008 17:20:32 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <48223940.5090109@samsco.org> Date: Wed, 07 May 2008 17:20:32 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Sean Bruno References: <48222930.2010808@miralink.com> In-Reply-To: <48222930.2010808@miralink.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-scsi@freebsd.org Subject: Re: USB drive serial numbers 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: Wed, 07 May 2008 23:20:36 -0000 Sean Bruno wrote: > Can someone send me the output of "camcontrol inquiry daX" where daX is > a usb attached hard drive? I'm interested to know if the USB external > hard drives report a serial number as the USB flash drives I currently > have in my possession do not report one. > > eg: SCSI hard drive: > sudo camcontrol inquiry da0 > pass0: Fixed Direct Access SCSI-3 device > pass0: Serial Number 3KT17YJL > pass0: 320.000MB/s transfers (160.000MHz, offset 63, 16bit), Tagged > Queueing Enabled > > > eg: USB flash drive: > sudo camcontrol inquiry da3 > pass4: Removable Direct Access SCSI-0 device > pass4: Serial Number > pass4: 40.000MB/s transfers > CAM used to assume that all DA devices supported the serial number EVPD page. I recently changed it to query the device for the list of pages it does support, and only ask for the serial number page if it does (which in turns cuts down on a whole lot of kernel printf noise). My experience is that some devices do, but most devices don't. If you want to check your devices manually, do: camcontrol cmd pass0 -v -c "12 01 00 00 255 00" -i 255 "-" | hd If 0x80 appears after the 4th byte, the device claims support for querying the serial number. The serial number can then be fetched with camcontrol cmd pass0 -v -c "12 01 80 00 255 00" -i 255 "-" | hd Or via camcontrol inq pass0 -S Scott