Resizing GPT partitions

Stephane Dupille stephane at dupille.org
Thu Jun 10 09:33:48 UTC 2010


"Andrey V. Elsukov" <bu7cher at yandex.ru> é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.


More information about the freebsd-stable mailing list