Can't use gpt labels re-importing pool

Scot Hetzel swhetzel at gmail.com
Thu Nov 26 08:40:18 UTC 2009


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


More information about the freebsd-stable mailing list