There could be multiple scenarios where you would need to resize the primary partition and
extend non lvm root partition space.
Create a data backup (just to be safe).
Let's start with listing our available partitions:
fdisk commands:
Now we will resize a swap partition. Run the following command and use an option p to double check a partition:
Enter d to delete a /dev/vda2 partition;
pick a partition number (from a partition table), in our case, it will be 2;
Enter n to create a new partition and pick a partition type p;
Select a partition number (2-4)
Pick a first sector (we will use a default option);
Pick a partition size - 500M;
Enter N to keep a swap signature;
Use a p command to double check the outcome:
And finally, enter a w command to write the changes to the partition table: