From owner-freebsd-current@FreeBSD.ORG Tue Nov 17 17:20:02 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B5671065695 for ; Tue, 17 Nov 2009 17:20:02 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id DEA9B8FC23 for ; Tue, 17 Nov 2009 17:20:01 +0000 (UTC) Received: from [192.168.1.4] (adsl-241-172-215.bna.bellsouth.net [74.241.172.215]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id nAHHJpMZ010375 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 17 Nov 2009 12:19:59 -0500 (EST) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Stefan Bethke In-Reply-To: <1DE2E5E5-B6A4-4870-A346-ABC1CD20EE34@lassitu.de> References: <1DE2E5E5-B6A4-4870-A346-ABC1CD20EE34@lassitu.de> Content-Type: text/plain Organization: FreeBSD Date: Tue, 17 Nov 2009 11:19:43 -0600 Message-Id: <1258478383.2303.57.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RDNS_DYNAMIC,SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: freebsd-current@freebsd.org, Jeremy Thornhill Subject: Re: "corrupt or invalid GPT" when attempting to import Solaris ZFS pool (8.0-RC3) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Nov 2009 17:20:02 -0000 On Tue, 2009-11-17 at 07:57 +0100, Stefan Bethke wrote: > Am 17.11.2009 um 05:10 schrieb Jeremy Thornhill: > > > I've been testing the procedure with a USB drive which was allocated > > as a single pool under Solaris. It's the correct filesystem version > > (13). I export the pool from the Solaris box, and then attempt to > > import it on the FreeBSD box. Unfortunately, I get the following > > error, and the pool is not able to be imported: > > > > GEOM: da0: corrupt or invalid GPT detected. > > GEOM: da0: GPT rejected -- may not be recoverable. > > What error are you getting from zpool import? zpool import won't do anything until GEOM is able to probe the disks. > 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. Incorrect, Both primary and secondary headers are present, the above GEOM error is stating that ALL copies of GPT headers have been deemed invalid. > 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 Bad advice. This will will destroy your partition table and you likely won't be able to recover the disk. It is possible to hex edit the existing solaris headers to make this work on FreeBSD, though I have committed a proper fix to -CURRENT. > However, I'd expect this to have no effect on zpools ability to import the pool. If GEOM can't figure out the disk structure, zpool / zfs are useless. robert. > > HTH, > Stefan -- Robert Noland FreeBSD