From owner-freebsd-stable@FreeBSD.ORG Thu Nov 26 08:40:17 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 EFC26106568D for ; Thu, 26 Nov 2009 08:40:17 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from mail-iw0-f198.google.com (mail-iw0-f198.google.com [209.85.223.198]) by mx1.freebsd.org (Postfix) with ESMTP id B8F368FC1C for ; Thu, 26 Nov 2009 08:40:17 +0000 (UTC) Received: by iwn36 with SMTP id 36so323239iwn.3 for ; Thu, 26 Nov 2009 00:40:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=hd/FDKfAl6mpNLhy9EQmDlxcF4DUpZ6U2rZr8QIzjdU=; b=B9yqgToZ9KewEn1J713IRURb928n+tddb9r609g29rXP6qEHmxXj+euR/2ITWj2PGf ZFHDgNTEBhqdwJoLHAebtVG7NFKPkYvFqhKW9O83RcKiLF3muC7bfUQ8BfUkA/iU8WKZ j8HQDU7CkU3RyfJrwb0WIyviGPk8kZKgaxFtI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=XR5eClL7ahOUnlegsMJ97nYYkrNK+FeMgdCzQQ+vGpnnmc/fWBF+cUkn0J8XWGHFSQ pORFMNuc7ISN3vN6+VRyoog5c1iLH7ZFN1tJYCdaUKgI3b7XBbYug/Cd3nQd1sWOdN9w ThRXJjbGngIcg0JJf1Fscw8vBosBCuzJZXr5c= MIME-Version: 1.0 Received: by 10.231.29.149 with SMTP id q21mr2344438ibc.35.1259224817198; Thu, 26 Nov 2009 00:40:17 -0800 (PST) In-Reply-To: <4B0E3ABA.3030606@tzim.net> References: <4B0E3ABA.3030606@tzim.net> Date: Thu, 26 Nov 2009 02:40:17 -0600 Message-ID: <790a9fff0911260040i1456d7c0j4f8327d24d2966cf@mail.gmail.com> From: Scot Hetzel To: Arnaud Houdelette Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-stable@freebsd.org 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:40:18 -0000 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. Scot