This question already has an answer here:
I'm doing this with VMs. I'm using virtualbox and I made the mistake of creating a server with a dynamic disk. I then proceeded to create another virtual disk, a fixed one, into which I cloned the server OS. This because sda1 would not grow in size as it's supposed to in a dynamic disk, instead creating an extended partition and some other.
Having the server on a fixed disk did not help as sda1 remained the same size, only the extended partition got bigger.
So, I added that disk to a desktop version VM I had so I could comfortably use gparted and make the partition bigger manually.
Now, the extended partition and the other one (sda5) I don't remember the filesystem of, had these key symbols, and even running gparted with root privileges wouldn't let me delete or change those in any way.
So I turned to fdisk. I was able to easily delete sda2 and sda5, and then use gparted to make sda1 bigger. I left 1Mb at the end.
The problem I'm having now comes in here. The server will still say it doesn't have enough space to do this or that, even though it does.
server@ubuntu:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 2.5G 0 2.5G 0% /dev tmpfs 508M 7.3M 501M 2% /run /dev/sda1 2.8G 2.7G 0 100% / tmpfs 2.5G 0 2.5G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 2.5G 0 2.5G 0% /sys/fs/cgroup /dev/sdb1 15G 47M 14G 1% /home/server/sxtngig tmpfs 508M 0 508M 0% /run/user/1000 server@ubuntu:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 8G 0 disk └─sda1 8:1 0 8G 0 part / sdb 8:16 0 15G 0 disk └─sdb1 8:17 0 15G 0 part /home/server/sxtngig sr0 11:0 1 1024M 0 rom
As you can see, it has 8Gb but df can't see it. Is there a way I can make the server refresh the disk space? Maybe something in a file I need to change?