I have googled this topic for a while now, and also found a lot of information, but just not the final information that I was comfortable using. The problem is that I’m really not a Linux guy – far from it actually (I'm more of a Windows guy). I can use basic commands, update the OS (when needed), install stuff, and get going on basic things, like running a Minecraft server using MineOS (with guides and help) 😉. That was actually the main purpose of the VM which I created a long time ago (I know there is a docker for that now, but other stuff is also running on the server, so I would like to keep it, only extending the disc).
But I can’t figure out how to extend the disk in the VM. I need some expertise help, guiding me in a simple understandable way (Like how space invader makes everything easy too undestand in his videos, for instance. Unfortunately he does not have a video on how to extend a Ubuntu Server disk, only Windows).
Some details about the VM (I don’t know if it’s relevant, but here it is):
Original Disk size: 20GB
Updated size: 50GB
Ubuntu Server: 18.04.4 LTS (Bionic Beaver)
Machine: Q35-3.1
Bios: OVMF
Primary vDisk location: Auto
Primary vDisk Bus: VirtIO
Some commands:
fdisk –list
Disk /dev/loop0: 110.8 MiB, 116178944 bytes, 226912 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
GPT PMBR size mismatch (41943039 != 104857599) will be corrected by w(rite).
Disk /dev/vda: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9E82BAD1-20A4-4CC3-8A21-E461E54CFF53
Device Start End Sectors Size Type
/dev/vda1 2048 1050623 1048576 512M EFI System
/dev/vda2 1050624 41940991 40890368 19.5G Linux filesystem
fdisk /dev/vda2
Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
The old ext4 signature will be removed by a write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xfa79545c.
Command (m for help): p
Disk /dev/vda2: 19.5 GiB, 20935868416 bytes, 40890368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xfa79545c
So, it seems the system can see that there is 50GB of space. But the two partitions only use the original 20GB.
How do I proceed from here?
Please be specific, because - as I said my Linux skills are limited 😳
Thanks in advance!
Trek