Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Nov 2009 02:40:17 -0600
From:      Scot Hetzel <swhetzel@gmail.com>
To:        Arnaud Houdelette <arnaud.houdelette@tzim.net>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Can't use gpt labels re-importing pool
Message-ID:  <790a9fff0911260040i1456d7c0j4f8327d24d2966cf@mail.gmail.com>
In-Reply-To: <4B0E3ABA.3030606@tzim.net>

index | next in thread | previous in thread | raw e-mail

On 11/26/09, Arnaud Houdelette <arnaud.houdelette@tzim.net> 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


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0911260040i1456d7c0j4f8327d24d2966cf>