Guide to regaining access to a Vultr instance when disk space is completely full, preventing logins and normal operation
If you’re unable to log in to your Vultr Compute Instance even after using the web console the issue may be caused by 100% disk usage. When disk space is full, services may fail to start, login sessions can be blocked, and even plan resizing may not succeed until space is freed.
Do not resize your instance before following this guide. When there is no remaining disk space, resizing the disk may not correctly update the filesystem, potentially making the issue worse.
Follow the steps below to mount the SystemRescue ISO and free up some space:
Follow these steps to manually mount the root disk and access your instance's file system:
List the attached block devices to identify the root partition.
Output:
Mount the root block device (e.g., /dev/vda2) to the /mnt directory.
Replace /dev/vda2 with the correct partition name from your instance if different.
Change the root path to enter your instance environment.
To identify which directories are consuming the most space, run.
Output:
Repeat the command in other directories (/home, /usr, etc.) to investigate space usage further.
Run the below command to list large files by size.
This shows all files in /var/log/, sorted in descending order of size.
After you have verified the large files and folders, use the below commands to remove then from the server.
To delete a file:
To delete a directory:
Avoid deleting essential system files. Focus on old logs, cache files, or temporary data in /var/log/, /var/cache/, or /tmp.
After you have freed up some disk space in your server, exit the chroot environment.
Reboot the server.
Detach the ISO from the instance in the Custom ISO section.
After the instance reboots, you should be able to log in normally via SSH or the web console.
0 Comments
Be the first to comment and share your perspective with the community.