Mick -
This was recently reported in:
6362672 Can''t import exported raidz pool
Basically, what''s happening is that the import code always tries to
''fixup'' any path names, as they may have changed since the
original host
system. Unfortunately, if you have overlapping slices (as is often the
case with the backup slice), it can erroneously pick up the labels when
it reads ''s2'', and then ''fixes'' the path for
you. The result is rather
disastrous, for obvious reasons.
I have a few ideas on how to fix this, though I''m not sure which is the
best plan of action, yet. Thanks for the report.
- Eric
On Fri, Dec 09, 2005 at 01:47:25PM -0800, Mick Hosegood
wrote:> I have been experimenting with ZFS, and used a spare drive sliced up into
equal partitions.
> (Having originally used a whole blank drive, and lost the original Sun disk
label - to get it back, boot the Solaris 9 CD (boot cdrom -s) and run format
which automatically puts back a conventional Sun disk label!)
>
> Anyway, I created a pool from 4 slices in a 2 by 2 way mirror:-
> # zpool status
> pool: lake
> state: ONLINE
> scrub: none requested
> config:
>
> NAME STATE READ WRITE CKSUM
> lake ONLINE 0 0 0
> mirror ONLINE 0 0 0
> c0t2d0s0 ONLINE 0 0 0
> c0t2d0s1 ONLINE 0 0 0
> mirror ONLINE 0 0 0
> c0t2d0s3 ONLINE 0 0 0
> c0t2d0s4 ONLINE 0 0 0
>
> I then exported this pool, then tried to re-import it:-
> # zpool export lake
> # zpool import
> pool: lake
> id: 11360384179187939295
> state: ONLINE
> action: The pool can be imported using its name or numeric identifier.
> config:
>
> lake ONLINE
> mirror ONLINE
> c0t2d0s2 ONLINE <-- Device changed from c0t2d0s0 to
c0t2d0s2
> c0t2d0s1 ONLINE
> mirror ONLINE
> c0t2d0s3 ONLINE
> c0t2d0s4 ONLINE
> #
>
> Now actually import it:-
> # zpool import lake
> # zpool status
> pool: lake
> state: ONLINE
> scrub: none requested
> config:
>
> NAME STATE READ WRITE CKSUM
> lake ONLINE 0 0 0
> mirror ONLINE 0 0 0
> c0t2d0s2 ONLINE 0 0 0 <--- imports with
incorrect slice name
> c0t2d0s1 ONLINE 0 0 0
> mirror ONLINE 0 0 0
> c0t2d0s3 ONLINE 0 0 0
> c0t2d0s4 ONLINE 0 0 0
>
> I suppose the reason is that both c0t2d0s2 and c0t2d0s0 start at the same
position, so the problem is minor, but it''s conceivable that ZFS may be
used in this way, so the developers may wish to get this feedback
> Regards
> Mick
> This message posted from opensolaris.org
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
--
Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock