From owner-freebsd-fs@FreeBSD.ORG Fri Jun 12 23:40:04 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A47881065670 for ; Fri, 12 Jun 2009 23:40:04 +0000 (UTC) (envelope-from morganw@chemikals.org) Received: from warped.bluecherry.net (unknown [IPv6:2001:440:eeee:fffb::2]) by mx1.freebsd.org (Postfix) with ESMTP id 440FE8FC14 for ; Fri, 12 Jun 2009 23:40:04 +0000 (UTC) (envelope-from morganw@chemikals.org) Received: from volatile.chemikals.org (adsl-67-124-141.shv.bellsouth.net [98.67.124.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by warped.bluecherry.net (Postfix) with ESMTPSA id 24ED68BDF515; Fri, 12 Jun 2009 18:40:02 -0500 (CDT) Received: from localhost (morganw@localhost [127.0.0.1]) by volatile.chemikals.org (8.14.3/8.14.3) with ESMTP id n5CNdwni065160; Fri, 12 Jun 2009 18:39:59 -0500 (CDT) (envelope-from morganw@chemikals.org) Date: Fri, 12 Jun 2009 18:39:58 -0500 (CDT) From: Wes Morgan To: Peter Jones In-Reply-To: <86ljnxyy01.fsf@pmade.com> Message-ID: References: <86ljnxyy01.fsf@pmade.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-fs@freebsd.org Subject: Re: Logical Disk to Physical Drive Mapping X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2009 23:40:05 -0000 On Fri, 12 Jun 2009, Peter Jones wrote: > Given the situation where you have several identical physical drives, > what is the best way to turn logical labels such as da5 into a physical > identifier like "the drive in slot 4"? > > It looks like I could use dmesg, some assumptions, and glabel to label > the logical disks. However, I plan to use ZFS and as far as I can tell > glabel doesn't support ZFS. > > What is the de facto way of doing this? I'll be using FreeBSD-CURRENT > for this, btw. Use ATA_STATIC_ID for the ATA subsystem to prevent unit numbers from changing when devices are added or removed. For SCSI devices, you can wire down the naming scheme with something like this in /boot/device.hints: hint.scbus.0.at="mpt0" hint.da.0.at="scbus0" hint.da.0.target="0" hint.da.1.at="scbus0" hint.da.1.target="1" hint.da.2.at="scbus0" hint.da.2.target="2" hint.da.3.at="scbus0" hint.da.3.target="3"