From owner-freebsd-stable@FreeBSD.ORG Thu Jun 10 09:33:48 2010 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFC9B1065689 for ; Thu, 10 Jun 2010 09:33:48 +0000 (UTC) (envelope-from sdupille@nospam.fr.eu.org) Received: from mail.nospam.fr.eu.org (galadriel.nospam.fr.eu.org [88.191.16.109]) by mx1.freebsd.org (Postfix) with ESMTP id 893008FC13 for ; Thu, 10 Jun 2010 09:33:47 +0000 (UTC) Received: from galadriel.nospam.fr.eu.org (localhost [127.0.0.1]) (Authenticated sender: dust) by mail.nospam.fr.eu.org (Postfix) with ESMTP id 68EA3440817 for ; Thu, 10 Jun 2010 11:33:46 +0200 (CEST) From: Stephane Dupille To: stable@freebsd.org References: <4C0FD8A2.3070307@yandex.ru> Organization: Home Mail-copies-to: never Date: Thu, 10 Jun 2010 11:33:45 +0200 In-Reply-To: <4C0FD8A2.3070307@yandex.ru> (Andrey V. Elsukov's message of "Wed, 09 Jun 2010 22:08:34 +0400") Message-ID: User-Agent: Gnus/5.090024 (Oort Gnus v0.24) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Cc: Subject: Re: Resizing GPT partitions X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2010 09:33:48 -0000 "Andrey V. Elsukov" écrit : Hi, > Stephane Dupille wrote: > Currently there is no easy way to do it. GPT holds information about > first and last usable sectors. You can see them in your output: >> last: 20971486 >> first: 34 I had the opportunity to boot that machine from network (a linux), and parted fix GPT tables correctly. Now, I have in FreeBSD the right last usable sector : last: 312581774 first: 34 And dmesg does not say anymore that the secondary GPT table is corrupt or invalid. (yeah, one problem fixed) Unfortunatly, parted does not allow me to resize the last partition because it does not know the type of the partition. > You can look at freebsd-geom's mail list archive. There was a topic > "OCE and GPT" with similar problem. Yep, seen it. I applied your patch to resize partition, but I didn't manage to use it correctly. # cd /usr/src # patch < /root/patch # cd sbin/geom/class/part/ # make # make install Did I applied the patch correctly ? It seems not working : # gpart resize -i 3 ad0 gpart: param 'size': Invalid argument Thanks for your reply.