From owner-freebsd-geom@FreeBSD.ORG Wed Apr 21 18:15:44 2010 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3C341065675; Wed, 21 Apr 2010 18:15:43 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward8.mail.yandex.net (forward8.mail.yandex.net [77.88.61.38]) by mx1.freebsd.org (Postfix) with ESMTP id 9A7108FC19; Wed, 21 Apr 2010 18:15:43 +0000 (UTC) Received: from web84.yandex.ru (web84.yandex.ru [77.88.60.74]) by forward8.mail.yandex.net (Yandex) with ESMTP id C47DA16F058F; Wed, 21 Apr 2010 22:15:41 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1271873741; bh=gl+otgw+bX3LLfmPLZsknjWYAwgct3RIBOIQm/qKdGM=; h=From:To:Cc:In-Reply-To:References:Subject:MIME-Version:Message-Id: Date:Content-Transfer-Encoding:Content-Type; b=mKnoFCnAkiJZHa2CPN+hul5rJtqEZPojmZwu+o2jGjYIlUXADBJ9AJZ0CtZTY51nh 6f1iU3tq7sLxZvIatLL2nre78xvYo+zF1Y7WhRUN1JsnXPzirfEWKdJ/P7CBbS382O rtKiXZWRvsMeiuF7Xcp+kFziMkCgb3Hu36/tk99Q= Received: from localhost (localhost.localdomain [127.0.0.1]) by web84.yandex.ru (Yandex) with ESMTP id BFBCDCD0042; Wed, 21 Apr 2010 22:15:41 +0400 (MSD) X-Yandex-Spam: 1 X-Yandex-Front: web84.yandex.ru X-Yandex-TimeMark: 1271873741 Received: from [77.72.138.63] ([77.72.138.63]) by mail.yandex.ru with HTTP; Wed, 21 Apr 2010 22:15:41 +0400 From: Andrey V. Elsukov To: Marcel Moolenaar In-Reply-To: <75798832-C041-4796-8C10-5BE61FB7583A@mac.com> References: <4BCEE9E2.6010007@yandex.ru> <4BCEEC66.1080804@yandex.ru> <4BCEEF06.8010203@icyb.net.ua> <4BCEF5F8.6090102@yandex.ru> <4BCF04C7.1050701@icyb.net.ua> <50691271872096@web136.yandex.ru> <75798832-C041-4796-8C10-5BE61FB7583A@mac.com> MIME-Version: 1.0 Message-Id: <144661271873741@web84.yandex.ru> Date: Wed, 21 Apr 2010 22:15:41 +0400 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 Cc: Lister , Marcel Moolenaar , Andriy Gapon , freebsd-geom@freebsd.org Subject: Re: Re: OCE and GPT X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2010 18:15:44 -0000 21.04.10, 10:59, "Marcel Moolenaar" : > UEFI version 2.3, page 99 (paragraph 5.3.1): > "Two GPT Header structures are stored on the device: the primary and the > backup. The primary GPT Header must be located in LBA 1 (i.e., the second > logical block), and the backup GPT Header must be located in the last LBA > of the device." Hi, Marcel Ok, you are right, but: GPT Header, page 102 (paragraph 5.3.2): The following test must be performed to determine if a GPT is valid: • Check the Signature • Check the Header CRC • Check that the MyLBA entry points to the LBA that contains the GUID Partition Table • Check the CRC of the GUID Partition Entry Array If the GPT is the primary table, stored at LBA 1: • Check the AlternateLBA to see if it is a valid GPT So, in our case (when resizing is allowed) it can be more usable to check AlternateLBA (it can be not equal to last LBA) for correct primary header. IMHO. Marcel, what you think about recover and reinit verbs? -- WBR, Andrey V. Elsukov