PDA

View Full Version : [ubuntu] Increasing the size of the Ubuntu partition


Johnsie
December 2nd, 2009, 08:04 AM
I had a virtual machine that had 20gb hard disk space allocated to it.

I've now increased that available space so that 30gb is available on the machine. That leaves me with about 10gb of unused space on the VM which I want to add to the existing ext3 partition. How do I go about increasing the size of the partition to use this unused space? I'm doing this in Server Edition so need to do this using the command line. Normally I would use GPARTED. I don't have physical access to the server.

fouadatmeh
December 2nd, 2009, 11:29 AM
Hello,

If the extra space is added to the ext3 partition (sda1 for example), then you can simply do something like:

resize2fs /dev/sda1 30G

** I only did this once in a test enviroment, so please be careful with it.

dcstar
December 3rd, 2009, 01:15 AM
I had a virtual machine that had 20gb hard disk space allocated to it.

I've now increased that available space so that 30gb is available on the machine. That leaves me with about 10gb of unused space on the VM which I want to add to the existing ext3 partition. How do I go about increasing the size of the partition to use this unused space? I'm doing this in Server Edition so need to do this using the command line. Normally I would use GPARTED. I don't have physical access to the server.

VM resizing depends on the VM you are using.