I am running out of space on the hard drive I am using for an AWS Ubuntu instance.
df -h
Filesystem Size Used Avail Use% Mounted on
udev 488M 0 488M 0% /dev
tmpfs 100M 12M 88M 12% /run
/dev/xvda1 7.7G 7.3G 439M 95% /
tmpfs 496M 0 496M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 496M 0 496M 0% /sys/fs/cgroup
tmpfs 100M 0 100M 0% /run/user/1000
The lsblk command shows that I have a partition of 8gb on a 20gb volume.
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 20G 0 disk
└─xvda1 202:1 0 8G 0 part /
When I try to extend the partition, I get an error saying it is already max size (2096891 * 4096 = 8.5gib).
sudo resize2fs /dev/xvda1
resize2fs 1.42.13 (17-May-2015)
The filesystem is already 2096891 (4k) blocks long. Nothing to do!
I don't think I need to extend the physical volume, but do I need to extend the logical volume? How can I get the partition to use more of the 20 gb volume?