Ubuntu 18.04 high-performance disassembly

N
Netooze
September 26, 2019

When working with the cloud, often there are circumstances when there is inadequate free disk area To enhance the quantity, go to the admin panel as well as manually enter a new disk dimension. Currently let's go on to the web server settings to include volume to the configuration. Below is an instruction with screenshots on the example of an Ubuntu 18.04 web server.

How to increase disk space

1. Connect to Ubuntu Server as superuser (root) and check the current size of the disk space.
echo 1 > /sys/block/sda/device/rescan

The utility will certainly query the server arrangement as well as establish the modifications. In our situation, it relays to Ubuntu information concerning the brand-new quantity of disk space.

2. Let's use the built-in parted program - enter it into the terminal. Display a list of partitions using the p key:(parted) p

The following will appear on the monitor:

Screenshot #1. Example.

Factors that are remembered or written down are highlighted in red. The very first line shows the number of gigabytes that are readily available on the present partition.

The second is the existing size of the disk that will certainly be increased. It is easy to determine by the LVM tag.

3. The information is collected, we start the merge procedure using the following syntax:
(parted) resizepart 2 

Where "2" means the number of the quantity on which the disk area modification takes place:.

Screenshot #2. We change the size.

The utility will specify what value to add. Square brackets indicate the current partition size. We enter a new value - just add the required volume to the number.

In our example, it looks like this: 64.4 + 20 = 84.4 Gb

Exit the parted application with the quit command.
(parted) quit

4. After closing, a message will appear on the screen asking you to update the information:

Screenshot #3. Information text.

We manually broadcast information about the changes to the operating system. Enter:
pvresize /dev/sda2

, where /dev/sda2 is the number of the device and partition on which the changes occurred.

5. Change the value of the volume with the command:
lvextend -r -l +100%FREE /dev/mapper/vgroup1-root 

Adding disk space was successful, but to be sure, check the result.

In the terminal we type
df –h 

The screen will certainly display info concerning the changes made.

Start your cloud journey? Take the first step right now.