From owner-freebsd-geom@FreeBSD.ORG Sat Nov 28 16:29:12 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 E896B1065670 for ; Sat, 28 Nov 2009 16:29:12 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: from mail-ew0-f221.google.com (mail-ew0-f221.google.com [209.85.219.221]) by mx1.freebsd.org (Postfix) with ESMTP id 8CBF38FC14 for ; Sat, 28 Nov 2009 16:29:12 +0000 (UTC) Received: by ewy21 with SMTP id 21so2924663ewy.13 for ; Sat, 28 Nov 2009 08:29:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.85.68 with SMTP id t46mr727040wee.114.1259425751196; Sat, 28 Nov 2009 08:29:11 -0800 (PST) In-Reply-To: <4B106C51.7070905@jrv.org> References: <4B106C51.7070905@jrv.org> From: =?ISO-8859-1?Q?Marius_N=FCnnerich?= Date: Sat, 28 Nov 2009 17:28:51 +0100 Message-ID: To: "James R. Van Artsdalen" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-geom@freebsd.org Subject: Re: 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 16:29:13 -0000 On Sat, Nov 28, 2009 at 01:18, James R. Van Artsdalen wrote: > 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 =A0 =A0 =A0 =A0 =A0 =A0 =A0ATA/ATAPI-7 SATA 1.x > device model =A0 =A0 =A0 =A0 =A0ST3750640AS > firmware revision =A0 =A0 3.AAJ > serial number =A0 =A0 =A0 =A0 3QD0NWQT > ... > > I would add a name like /dev/serialnum/3QD0NWQT. =A0This 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. If I remember correctly ivoras@ already proposed a patch like this.