From owner-freebsd-geom@FreeBSD.ORG Sat Nov 28 01:05:05 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25052106566C for ; Sat, 28 Nov 2009 01:05:05 +0000 (UTC) (envelope-from freebsd-geom@jrv.org) Received: from mail.jrv.org (rrcs-24-73-246-106.sw.biz.rr.com [24.73.246.106]) by mx1.freebsd.org (Postfix) with ESMTP id C8A8C8FC08 for ; Sat, 28 Nov 2009 01:05:04 +0000 (UTC) Received: from kremvax.housenet.jrv (kremvax.housenet.jrv [192.168.3.124]) by mail.jrv.org (8.14.3/8.14.3) with ESMTP id nAS0IPh3098601 for ; Fri, 27 Nov 2009 18:18:25 -0600 (CST) (envelope-from freebsd-geom@jrv.org) Authentication-Results: mail.jrv.org; domainkeys=pass (testing) header.from=freebsd-geom@jrv.org DomainKey-Signature: a=rsa-sha1; s=enigma; d=jrv.org; c=nofws; q=dns; h=message-id:date:from:user-agent:mime-version:to:subject: x-enigmail-version:content-type:content-transfer-encoding; b=szP0LyhwEeA98OWmPWbk4rsrF21ROiriEiWwhBiutw4ZguRxtteCCM+toYkTQ1VWQ Kyyos1CbnSRogDLwBdCbXyxbhQU4fOuoT3egcMzrUz712Q82fIbIzLPdsI7WV//WZ/1 1yGBUmHHs0Gs71l8Ym0YWkFKklYAEVYc6PENW/Q= Message-ID: <4B106C51.7070905@jrv.org> Date: Fri, 27 Nov 2009 18:18:25 -0600 From: "James R. Van Artsdalen" User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: freebsd-geom@freebsd.org X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: help adding device serial numbers to /dev namespace? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2009 01:05:05 -0000 Can anyone give me suggestions on how to implement putting disk driver serial numbers in the /dev namespace, much as UFS ID's are put there now? I want to propose adding the disk drive's hardware serial number, i.e., for this # camcontrol identify ada0 pass0: ATA/ATAPI-7 SATA 1.x device pass0: 150.000MB/s transfers protocol ATA/ATAPI-7 SATA 1.x device model ST3750640AS firmware revision 3.AAJ serial number 3QD0NWQT ... I would add a name like /dev/serialnum/3QD0NWQT. This differs from the current name schemes I know of in that it describes the whole disk and not any particular partition or region, and no on-disk storage is needed. I think this needs to be done in GEOM, as a result of disk_create() and using d_ident, but I'm getting lost and need some guidance to do an example patch to "formally" propose the idea. The immediate use today is for ZFS.