I am trying to increase the disk size of a VM that I initially set up with 4 GB memory to 10 GB. I successfully increased it to 8 GB (by getting rid of lv_swap
and running lvextend
after updating it in the VirtualBox GUI) earlier, but have been unable to further increase it. I increased the memory through VirtualBox' GUI to 10 G, and if I run cat /proc/meminfo
I get the following output:
MemTotal: 10905472 kB
MemFree: 10387160 kB
...
However, if I run df -h
I get
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/lv_root 7.4G 6.2G 853M 89% /
tmpfs 5.3G 272K 5.2G 1% /dev/shm
/dev/sda1 485M 58M 402M 13% /boot
If I run sudo gparted
it only lists boot and root; boot with ~500M and root with just under 8G and I can't expand root using that. I tried doing it from a LiveDVD and ended up with the same result. If I just run sudo lvextend ...
, it says there isn't enough unallocated to add it. Since tmpfs looks overly large, I tried remounting tmpfs with a smaller size but the extra memory didn't show up and when I rebooted the machine it had the same size as before.
Does anyone have any idea how to allocate that extra memory to root rather than tmpfs or wherever it's now floating around? Any ideas on why it's not usable?
Update: The root cause of the confusion was due to confusion between memory/disk space on my part as well as SO and other community-based resources I searched. I am leaving the question mostly as asked (shortening the meminfo output) because when I was trying to find answers, I found a lot that confused the two and not a lot that ended up clarifying the answer, and it would have been helpful for me to find something in this format.