Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Nov 2009 11:29:47 -0600
From:      Robert Noland <rnoland@FreeBSD.org>
To:        Jeremy Thornhill <jeremy.thornhill@gmail.com>
Cc:        freebsd-current@freebsd.org, Stefan Bethke <stb@lassitu.de>
Subject:   Re: "corrupt or invalid GPT" when attempting to import Solaris ZFS pool (8.0-RC3)
Message-ID:  <1258478987.2303.62.camel@balrog.2hip.net>
In-Reply-To: <b77635950911170454w78ffae07t12ef27c1634ccbe9@mail.gmail.com>
References:  <b77635950911162010t511ca570v32880acb5e3e25a3@mail.gmail.com> <1DE2E5E5-B6A4-4870-A346-ABC1CD20EE34@lassitu.de> <b77635950911170454w78ffae07t12ef27c1634ccbe9@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2009-11-17 at 07:54 -0500, Jeremy Thornhill wrote:
> On Tue, Nov 17, 2009 at 1:57 AM, Stefan Bethke <stb@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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
-- 
Robert Noland <rnoland@FreeBSD.org>
FreeBSD




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