[ale] Resizing GPT Partitions Online

Michael B. Trausch mike at trausch.us
Mon Nov 1 23:22:41 EDT 2010


On Mon, 2010-11-01 at 20:05 -0400, Brian Pitts wrote:
> With MBR partitions, I've always used fdisk to delete the partition
> and then created a new, larger one with the same starting sector. Then
> I would use resize2fs to grow the filesystem online. fdisk doesn't
> understand GPT-labeled disks, so I'm trying GNU parted. However, its
> 'resize' and 'delete' commands fail with a message that I can't use
> them on an active device. 

You might want to try GPT fdisk (gdisk).  There is an Ubuntu package
(gdisk).  The Web site is available online at
http://www.rodsbooks.com/gdisk/ which appears to be exactly what you're
looking for.  I have not used GPT-partitioned media yet, so I cannot say
for sure.  But, here is the second paragraph from the Web site:

> FreeBSD users: The FreeBSD version of GPT fdisk can't normally save
> changes to your partition table if any partition from the disk is
> mounted. If you want to modify your FreeBSD boot disk, the safest way
> to do so is from an emergency system or from a dual boot to another
> OS. Alternatively, you can typesysctl kern.geom.debugflags=16 at a
> shell prompt to enable FreeBSD to write to active disks. This
> limitation is shared by at least some other FreeBSD partitioning
> tools, such as gpt and FreeBSD's fdisk. This limitation does not exist
> in the Linux, Mac OS X, or Windows versions of the software.

So, it looks like services your requirement rather nicely.

Nothing against the GNU package, but it is mostly intended to be a
higher-level tool and so my guess is that is why it goes "the extra
mile" to make sure that its users do not accidentally shoot themselves
in the foot (though I should think that could be made into an option...)

	--- Mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://mail.ale.org/pipermail/ale/attachments/20101101/53fbbee3/attachment.bin 


More information about the Ale mailing list