Re: "corrupt or invalid GPT" when attempting to import Solaris ZFS pool (8.0-RC3)

From: Robert Noland <rnoland_at_FreeBSD.org>
Date: Tue, 17 Nov 2009 11:29:47 -0600
On Tue, 2009-11-17 at 07:54 -0500, Jeremy Thornhill wrote:
> On Tue, Nov 17, 2009 at 1:57 AM, Stefan Bethke <stb_at_lassitu.de> wrote:
> >
> > What error are you getting from zpool import?
> >
> 
> Interestingly enough, no error. The pool itself just doesn't seem to exist:
> 
> $ zpool import freeagent
> cannot import 'freeagent': no such pool available
> 
> > I believe the GEOM error is due to Solaris adding the GPT partition table to the start of the device, but not the end.  GEOM requires both copies to be present and identical, IIRC.  Since the pool fills the device, there's no space at the end, so adding the second copy is not an option.
> >
> > You could try destroying the first GPT copy by zeroing the first 34 blocks.  I'm not sure what Solaris will make of the pool after this, though:
> > # dd if=/dev/zero of=/dev/da0 count=34
> >
> > However, I'd expect this to have no effect on zpools ability to import the pool.
> >
> 
> I attempted this and, as you expected, I was still unable to import
> the pool. It still reports 'no such pool', although the GEOM messages
> *seem* to be gone. Taking this drive back to my Solaris system now
> results in the following output in dmesg when it is attached (though
> it still seems to function):
> 
> primary label corrupt; using backup

Sigh, yes... you have now trashed you primary gpt table.  PLEASE do not
go using dd to write stuff to your disks unless you a) know what your
doing or b) don't care if you trash your disks...

> Oddly the disk doesn't appear in the Solaris 'format' utility so I
> can't restore the label from backup (or at least, I don't know how
> to).

If is important... I can help you restore the primary header...

robert.

> Thanks,
> Jeremy
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
-- 
Robert Noland <rnoland_at_FreeBSD.org>
FreeBSD
Received on Tue Nov 17 2009 - 16:30:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:58 UTC