0

My server has a 40GB HDD and runs Ubuntu 18.04. The output for the command:

sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL

returns:

NAME   FSTYPE    SIZE MOUNTPOINT      LABEL
loop0  squashfs 91.3M /snap/core/8592
loop1  squashfs 91.4M /snap/core/8689
sda             37.3G
├─sda1             1M
└─sda2 ext4     37.3G /

The command df -h returns:

Filesystem      Size  Used Avail Use% Mounted on
udev            962M     0  962M   0% /dev
tmpfs           199M  1.1M  198M   1% /run
/dev/sda2        15G   13G  633M  96% /
tmpfs           993M     0  993M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           993M     0  993M   0% /sys/fs/cgroup
/dev/loop0       92M   92M     0 100% /snap/core/8592
/dev/loop1       92M   92M     0 100% /snap/core/8689
tmpfs           199M     0  199M   0% /run/user/1000

The partition root is only using 15GB, how I do I make Ubuntu use the remaining free space?

SidS
  • 145
  • 5

1 Answers1

0

Someone resized the /dev/sda2 partition, without resizing the underlying ext4 filesystem. Use:

resize2fs /dev/sda2

to fix it (as user root). Since you need to grow, not shrink the filesystem, you don't need to unmount it first.

Piotr P. Karwasz
  • 5,748
  • 2
  • 11
  • 21