From owner-freebsd-stable@FreeBSD.ORG Thu Nov 26 08:50:37 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A0C81065695 for ; Thu, 26 Nov 2009 08:50:37 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA12.westchester.pa.mail.comcast.net (qmta12.westchester.pa.mail.comcast.net [76.96.59.227]) by mx1.freebsd.org (Postfix) with ESMTP id D80EE8FC0A for ; Thu, 26 Nov 2009 08:50:36 +0000 (UTC) Received: from OMTA18.westchester.pa.mail.comcast.net ([76.96.62.90]) by QMTA12.westchester.pa.mail.comcast.net with comcast id 9knt1d0051wpRvQ5Ckqdg9; Thu, 26 Nov 2009 08:50:37 +0000 Received: from koitsu.dyndns.org ([98.248.46.159]) by OMTA18.westchester.pa.mail.comcast.net with comcast id 9kxD1d0043S48mS3ekxEkw; Thu, 26 Nov 2009 08:57:14 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id EFF1D1E3035; Thu, 26 Nov 2009 00:50:34 -0800 (PST) Date: Thu, 26 Nov 2009 00:50:34 -0800 From: Jeremy Chadwick To: freebsd-stable@freebsd.org Message-ID: <20091126085034.GA51998@icarus.home.lan> References: <4B0E3ABA.3030606@tzim.net> <790a9fff0911260040i1456d7c0j4f8327d24d2966cf@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <790a9fff0911260040i1456d7c0j4f8327d24d2966cf@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: Can't use gpt labels re-importing pool X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 08:50:37 -0000 On Thu, Nov 26, 2009 at 02:40:17AM -0600, Scot Hetzel wrote: > On 11/26/09, Arnaud Houdelette wrote: > > I just upgraded from 7.2 to 8.0. > > Under 7.2 the pool was like : > > NAME STATE READ WRITE CKSUM > > tank ONLINE 0 0 0 > > raidz1 ONLINE 0 0 0 > > ad6p1 ONLINE 0 0 0 > > ad10p1 ONLINE 0 0 0 > > ad8p1 ONLINE 0 0 0 > > ad4p1 ONLINE 0 0 0 > > > > I'd like to use gpt labels or gptids reimporting the pool. > > # ls /dev/gpt > > disk1 disk2 disk3 disk4 > > # ls /dev/gptid > > 0902db4e-d462-11de-96bd-001d923bc7a0 > > 9fb111f8-d426-11de-99bc-001d923bc7a0 > > 1be29091-d9dc-11de-9f4a-001d923bc7a0 > > ffb4e96a-d497-11de-96bd-001d923bc7a0 > > > > I did # zpool import -d /dev/gpt tank > > and I got > > tank ONLINE > > raidz1 ONLINE > > ada1p1 ONLINE > > ada3p1 ONLINE > > ada2p1 ONLINE > > gpt/disk4 ONLINE > > > > Now, how to force zpool import to only use gpt labels (or uuids) ? Or at > > least get back to coherent situation ( zpool export tank / zpool import > > gives the same now. and zpool import -d /dev, as zpool import -d /dev/gptid > > gives nothing ) ? > > > > Use 'zpool replace' to change the zfs pool to use the gpt names: > > zpool replace tank ada1p1 gpt/disk1 > zpool replace tank ada2p1 gpt/disk2 > zpool replace tank ada3p1 gpt/disk3 > > NOTE: make sure you use the correct gpt names for each partition, as > the above assumes that ada1p1 is labeled as disk1. I'm a bit curious about something, so maybe someone can help me understand: Why are people bothering with GPT labels (or in some cases, glabels) when AHCI (whether it be ataahci.ko or ahci.ko) is in use? Under what circumstance would the device name change dynamically in this situation? I've never witnessed this happening with AHCI, at least on Intel systems, and I've hot-swapped hard disks many times over. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |