disk size smaller than partition
I just set up a VM with Ubuntu 20.04.1, after setting up everything I realized that somehow the Disk Size is smaller than what I attached to it.
output of lsblk:
NAME FSTYPE SIZE MOUNTPOINT LABEL
fd0 4K
loop0 squashfs 71.3M /snap/lxd/16099
loop1 squashfs 55M /snap/core18/1880
loop2 squashfs 29.9M /snap/snapd/8542
sda 500G
├─sda1 1M
├─sda2 ext4 1G /boot
└─sda3 LVM2_member 499G
└─ubuntu--vg-ubuntu--lv ext4 200G /
sr0 1024M
sda provides 500GB of Space, but only assigns 200 to /. How can I solve this?
Solution 1:
It looks like you have 500 GB of space but you assigned 200 GB. You can easily assign the rest of the disk to another partition. Firstly elevate to a root shell. Then execute fdisk /dev/sda3
. That will open that device in fdisk shell session. Then type n
and press enter in order to create a new partition. You can keep pressing enter for the question it prompts you. If you do that fdisk will automatically assign the rest of the disk to a new partition. Then type w
and press enter to write the changes to the disk. After that you can quit the program, build a file system on it with the command mkfs.ext4 /dev/sda4
(it will be probably sda4 but if the partition name is something else, you have to put it there instead of sda4) and mount that new partition to your main file system