My host machine is a Macbook Pro 16-inch 2019. Initially, I gave 40GB to a Ubuntu virtual machine running on VMWare Fusion, and I used up the disk space, so I hope to enlarge the disk. I have done the following things:
Run fdisk /dev/sda as the root user. I deleted the partition /dev/sda2, create a new one that starts at the same position but ends at 70GB. Then create the logical device /dev/sda5, which almost have the same starting and ending position as /dev/sda2. The result of running fdisk is shown below.
I finally typed w to fdisk command, and it generates an error saying resources are taken by the kernel. I believe it is because that I resized the running part. So I rebooted the virtual machine. The problem is that
df -ahshows that the kernel is still not aware of the disk space change. It generates inconsistent output compared to fdisk.
I wonder what step I missed and how to fix it!