On 2010-May-03 23:59:17 +0800, Diogo Franco <diogomfra...@gmail.com> wrote:
>I managed to get a livefs cd that had zfs14, but it was unable to import
>the zpool ("internal error: Illegal byte sequence"). The zpool does
>appear if I try to run `zpool import` though, as "tank FAULTED corrupted
>data", and ad6s1d is ONLINE.

That's not promising.

> There is no -F option on bsd's zpool import.

It was introduced around zfs20.  I feared it might be needed.

>
>> This is almost certainly the problem.  ad6s1 may be the same as c5d0p1
>> but OpenSolaris isn't going to understand the FreeBSD partition label
>> on that slice.  All I can suggest is to (temporarily) change the disk
>> slicing so that there is a fdisk slice that matches ad6s1d.
>How could I do just that? I know that my label has a 1G UFS, 1G swap,
>and the rest is ZFS; but I don't know how to calculate the correct
>offset to give to 'format'. I can just regenerate the UFS later after
>the ZFS is fixed since it was only used for its /boot.

In FreeBSD, "bsdlabel ad0s1" will report the size and offset of the
'd' partition in sectors.  The offset is relative to the start of that
slice - which would normally be absolute block 63 ("fdisk ad0" will
confirm that).

Adding the offset of 's1' to the offset of 'd' will give you a sector
offset for your ZFS data.  I haven't tried using OpenSolaris on x86
so I'm not sure if format allows sector offsets (I know format on
Solaris/SPARC insists on cylinder offsets).  Since cylinders are a
fiction anyway, you might be able to kludge a cylinder size to suit
your offset if necessary.  The FreeBSD fdisk(8) man page implies
that slices start at a track boundary and and at a cylinder boundary
but I'm not sure if this is a restriction on LBA disks.

Note that if you keep a record of your existing c5d0 format and
restore it later, this will recover your existing boot and swap so you
shouldn't need to restore them.

-- 
Peter Jeremy

Attachment: pgpHLIUCADaBM.pgp
Description: PGP signature

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to