From owner-freebsd-geom@FreeBSD.ORG Thu Jul 9 13:33:59 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 034EA1065676 for ; Thu, 9 Jul 2009 13:33:59 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id 99F018FC15 for ; Thu, 9 Jul 2009 13:33:58 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: by fxm24 with SMTP id 24so143246fxm.43 for ; Thu, 09 Jul 2009 06:33:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.174.18 with SMTP id b18mr405098mup.129.1247144730553; Thu, 09 Jul 2009 06:05:30 -0700 (PDT) In-Reply-To: References: Date: Thu, 9 Jul 2009 15:05:30 +0200 Message-ID: From: =?ISO-8859-1?Q?Marius_N=FCnnerich?= To: Ivan Voras Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-geom@freebsd.org Subject: Re: glabel and real disk IDs 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: Thu, 09 Jul 2009 13:33:59 -0000 On Thu, Jul 9, 2009 at 13:52, Ivan Voras wrote: > Hi, > > I've been working with glabels for a time and just remembered that ATA (a= d) > drives do in fact export the drive ID, for example: > > # diskinfo -v ad4 > ad4 > =A0 =A0 =A0 =A0512 =A0 =A0 =A0 =A0 =A0 =A0 # sectorsize > =A0 =A0 =A0 =A0320072933376 =A0 =A0# mediasize in bytes (298G) > =A0 =A0 =A0 =A0625142448 =A0 =A0 =A0 # mediasize in sectors > =A0 =A0 =A0 =A0620181 =A0 =A0 =A0 =A0 =A0# Cylinders according to firmwar= e. > =A0 =A0 =A0 =A016 =A0 =A0 =A0 =A0 =A0 =A0 =A0# Heads according to firmwar= e. > =A0 =A0 =A0 =A063 =A0 =A0 =A0 =A0 =A0 =A0 =A0# Sectors according to firmw= are. > =A0 =A0 =A0 =A0ad:9QF4H15Y =A0 =A0 # Disk ident. > > # diskinfo -v ad6 > ad6 > =A0 =A0 =A0 =A0512 =A0 =A0 =A0 =A0 =A0 =A0 # sectorsize > =A0 =A0 =A0 =A0320072933376 =A0 =A0# mediasize in bytes (298G) > =A0 =A0 =A0 =A0625142448 =A0 =A0 =A0 # mediasize in sectors > =A0 =A0 =A0 =A0620181 =A0 =A0 =A0 =A0 =A0# Cylinders according to firmwar= e. > =A0 =A0 =A0 =A016 =A0 =A0 =A0 =A0 =A0 =A0 =A0# Heads according to firmwar= e. > =A0 =A0 =A0 =A063 =A0 =A0 =A0 =A0 =A0 =A0 =A0# Sectors according to firmw= are. > =A0 =A0 =A0 =A0ad:9QF4EP7A =A0 =A0 # Disk ident. > > # diskinfo -v ad8 > ad8 > =A0 =A0 =A0 =A0512 =A0 =A0 =A0 =A0 =A0 =A0 # sectorsize > =A0 =A0 =A0 =A0320072933376 =A0 =A0# mediasize in bytes (298G) > =A0 =A0 =A0 =A0625142448 =A0 =A0 =A0 # mediasize in sectors > =A0 =A0 =A0 =A0620181 =A0 =A0 =A0 =A0 =A0# Cylinders according to firmwar= e. > =A0 =A0 =A0 =A016 =A0 =A0 =A0 =A0 =A0 =A0 =A0# Heads according to firmwar= e. > =A0 =A0 =A0 =A063 =A0 =A0 =A0 =A0 =A0 =A0 =A0# Sectors according to firmw= are. > =A0 =A0 =A0 =A0ad:9QF4H16L =A0 =A0 # Disk ident. > > I don't think it would be hard to add a label parser to gather this > information and export it as a label. > > The purpose of this would be to have a unique disk ID without explicitly > setting a label (e.g. as is commonly advised for ZFS and drive swapping). > > Any objections? I like the idea. If one should use it in which situation is something diffe= rent.