Fixing Missing Memory on a Cloud Server
1 min read
This page was translated by AI
Last week, Tencent Cloud had a server promotion, so I bought a server with 2 CPU cores and 4 GB of memory. After starting it and installing the panel, however, I found that only 3.3 GB of memory was available.
So I ran:
free -hIt confirmed that only 3.3 GB was available, which left me puzzled.
After searching online, I found that Linux had reserved space for kdump. Here is the original article.
The solution is to disable kdump:
-
Run:
Terminal window sudo vim /etc/default/grubto edit the GRUB file.
-
Find the lines starting with
GRUB_CMDLINE_LINUX=orGRUB_CMDLINE_LINUX_DEFAULT=.Remove
crashkernel=2G-16G:512M,16G-:768M. -
Then enter:
Terminal window :wq //意思是保存并退出 -
Then run:
Terminal window sudo grub-mkconfig -o /boot/grub/grub.cfgto regenerate the GRUB configuration file.
-
Restart the server, and the issue should be resolved.