resizing disk partitions on Linux

A bird's eye view - does not cover creating disk partitions.

Recommended tools to view your current partitions:

gparted - launches a GUI

parted - begin this command line program, and type 'print'

The partition addresses you're looking for will most likely be in the format: /dev/sda[X]

basically:

First allocate the space for the partitions, and then resize the partitions. gparted has a "Move/Resize" option, but this is not in fact resizing, it is just allocating.

Important: Assuming you want to keep existing data, you should resize the parameters in such a way that existing allocations do not move. I believe this is otherwise known as leaving the original "cylinders" in place.

1) re-allocating your partitions:

gparted

fdisk fancier command line tool

quick check to see that all is ok:

e2fsck [device]

2) resizing your partitions

Lastly, you should be able to run:

[sudo] resize2fs [/dev/sda[X]]

And it should automatically resize the underlying drives to your allocations.

So what is the difference between resizing and reallocating you ask?

That is a very good question! And one that I have yet to find an answer to.

Leave a Reply

Your email address will not be published. Required fields are marked *

oko
friend