From owner-freebsd-geom@FreeBSD.ORG Thu Jul 9 11:53:09 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 187281065676 for ; Thu, 9 Jul 2009 11:53:09 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id CB0DE8FC23 for ; Thu, 9 Jul 2009 11:53:08 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MOsBV-000374-1e for freebsd-geom@freebsd.org; Thu, 09 Jul 2009 11:53:05 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Jul 2009 11:53:05 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Jul 2009 11:53:05 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-geom@freebsd.org From: Ivan Voras Date: Thu, 09 Jul 2009 13:52:53 +0200 Lines: 42 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.21 (X11/20090615) Sender: news Subject: 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 11:53:09 -0000 Hi, I've been working with glabels for a time and just remembered that ATA (ad) drives do in fact export the drive ID, for example: # diskinfo -v ad4 ad4 512 # sectorsize 320072933376 # mediasize in bytes (298G) 625142448 # mediasize in sectors 620181 # Cylinders according to firmware. 16 # Heads according to firmware. 63 # Sectors according to firmware. ad:9QF4H15Y # Disk ident. # diskinfo -v ad6 ad6 512 # sectorsize 320072933376 # mediasize in bytes (298G) 625142448 # mediasize in sectors 620181 # Cylinders according to firmware. 16 # Heads according to firmware. 63 # Sectors according to firmware. ad:9QF4EP7A # Disk ident. # diskinfo -v ad8 ad8 512 # sectorsize 320072933376 # mediasize in bytes (298G) 625142448 # mediasize in sectors 620181 # Cylinders according to firmware. 16 # Heads according to firmware. 63 # Sectors according to firmware. ad:9QF4H16L # 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?