How to fix a case where partitions on Ubuntu are only getting 200GB of 2TB

Environment:

I have a 2TB drive running Ubuntu 20.04. Currently it says it is ~90% full 174GB/196GB.

Results of

parted -l /dev/sda

Model: ATA WDC WD20EZBX-00A (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2097kB  1049kB                     bios_grub
 2      2097kB  1076MB  1074MB  ext4
 3      1076MB  2000GB  1999GB


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 215GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:

Number  Start  End    Size   File system  Flags
 1      0.00B  215GB  215GB  ext4

df -h

Filesystem                         Size  Used Avail Use% Mounted on
udev                               7.7G     0  7.7G   0% /dev
tmpfs                              1.6G  1.5M  1.6G   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  196G  174G   13G  94% /
tmpfs                              7.7G  4.0K  7.7G   1% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              7.7G     0  7.7G   0% /sys/fs/cgroup
/dev/loop0                          43M   43M     0 100% /snap/certbot/1514
/dev/loop1                         100M  100M     0 100% /snap/core/11993
/dev/loop2                          56M   56M     0 100% /snap/core18/2128
/dev/loop4                          71M   71M     0 100% /snap/lxd/21029
/dev/loop5                          68M   68M     0 100% /snap/lxd/21545
/dev/loop6                          33M   33M     0 100% /snap/snapd/13640
/dev/loop3                          62M   62M     0 100% /snap/core20/1169
/dev/loop7                          33M   33M     0 100% /snap/snapd/13270
/dev/sda2                          976M  203M  707M  23% /boot
tmpfs                              1.6G     0  1.6G   0% /run/user/1000
/dev/loop8                          56M   56M     0 100% /snap/core18/2246

Question:

As you can see parted and df -h do not seem to agree. More importantly it says I only have 13GB of space remaining. How can I make the system actually use all of /dev/sda3? And where is df -h getting 200GB from?


Disclaimer: I don't have any experience with LVM!

You are comparing apples and pears. The file system only shows you the free space of devices that have been connected (mounted) to the file system tree. Imagine you have a 6 TB drive with one big partition formated as ext4 and it is completely empty but not mounted to your file system. df will not count the 6 TB of free space as it is not located in the file system tree that you showed us with df -h. => df -h is the wrong command for your needs here!

When talking about 200GB you are probably referring to this device:

/dev/mapper/ubuntu--vg-ubuntu--lv 196G 174G 13G 94% /

This seems to be a logical volume of the linux lvm (logical volume manager) that belongs to a volume group.

In lvm terms logical volumes are a part of a volume group. Volume groups are collections of physical storage like devices, partitions and loop devices.

Use the logical volume manager command "pvs" to learn to which volume group your volume belongs. If the volume group has enough free space, you can simply extend that logical volume. Otherwise you would need to add additional drives, partitions or loop devices to the volume group and then extend your logical volume.

Here is a description how to extend a logical volume: https://www.linuxtechi.com/extend-lvm-partitions/

Use the lsblk command to learn which physical volumes are available in your system.

There is not enough documented information about your individual setup to answer specifically to your remaining question:

How can I make the system actually use all of /dev/sda3?