Increasing Available Space on Your Disk in Ubuntu 14

Often there is not enough available on the server, you can increase the size of the disks without losing data. In the control panel, select the server, then Settings -> Configuration. Use the slider to select the desired volume:

Step 1

Once the drive has been enlarged in the control panel, you need to make available for 14.

Open a terminal with superuser rights (login and password are specified in the server status) and check.

echo 1 > /sys/block/sda/device/rescan

This command scans the current VPS hardware configuration and sends the new hard drive size to the OS.

Step 2

Run the parted utility:


Immediately after starting the utility, you will see the version and service information.

GNU Parted 2.3
Using //sda

Important : By default, our Ubuntu Server 14 VPS has version 2.3 of this installed. This manual is designed for GNU Parted below 3.0. For versions 3.0 and older, use the following algorithm .

Run the commands in the parted markup interface:

(parted) p

Model:  Virtual disk (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start      End        Size         Type       File system   Flags
1      1049kB    256MB     255MB        primary      ext2          boot
2      257MB     10.7GB    10.5GB       extended
5      257MB     3220MB    2963MB       logical                    lvm
6      3221MB    10.7GB    7516MB       logical                    lvm

You will receive brief information about the current settings of disks and their partitions. It is necessary to remember the size in the ZZ.ZGB format, in our example it is 21.5GB and the partition number, in our example it is 2 (see the image above).

We run the command to change the partition:

(parted) resize
Partition number? 2

We leave the value ” Start ” by default – press Enter.

Start? [XXXMB]?

Value ” End ” – enter a new size in gigabytes – the value that was remembered earlier. Thus, the system will use all possible space.


Exit the utility command line:

(parted) quit

The following information will be displayed:

Information: You may need to update /etc/fstab.

Step 3

Run fdisk with the name of the disk we fixed in memory as an argument:

fdisk /dev/sda

Next, assign the type and occupied sectors using the n option:

Command ( for help): n

We select the type of partition l – logical, remember the partition number X, created during the execution of the command. Next, we accept the default value – press Enter 2 times.

Select (default p): l
Adding logical partition X
First sector (XXX-YYY, default ZZZ):
Last sector, +sectors or +size{K,M,G} (XXX-YYY, default ZZZ):

We change the type, while indicating the number that we fixed – X:

Command (m for help): t
Partition number (1-X): X
Hex (type L to list codes): 8e

Note: 8e is a hexadecimal code.

Save changes:Command (m for help): w

Step 4

We inform the kernel of the Linux operating system about the changes:

partx -v -a /dev/sda

/dev/sda: partition #X added

The v key will display detailed information about the execution results, the a key will tell the utility which file to work with.

Step 5

We initialize the section, instead of X we again use the section number that we remembered earlier:

pvcreate /dev/sdaX

Add a physical partition to an existing volume group:

vgextend ubuntu-vg /dev/sdaX

Expanding the logical volume:lvextend -l +100%FREE /dev/ubuntu-vg/root

We expand the file system so that you can work with on the hard drive:

resize2fs /dev/ubuntu-vg/root

At this point, the disk is expanded and ready for use.


Welcome to the world of DomainRooster, where roosters (and hens) rule the roost! We're a one-stop shop for all your entrepreneurial needs, bringing together domain names and website hosting, and all the tools you need to bring your ideas to life. With our help, you'll soar to new heights and hatch great success. Think of us as your trusty sidekick, always there to lend a wing and help you navigate the sometimes-complex world of domain names and web hosting. Our team of roosters are experts in their fields and are always on hand to answer any questions and provide guidance. So why wait? Sign up today and join the ranks of the world's greatest entrepreneurs. With DomainRooster, the sky's the limit! And remember, as the saying goes, "Successful people do what unsuccessful people are not willing to do." So don't be afraid to take that leap of faith - DomainRooster is here to help you reach for the stars. Caw on!