How do I fix disk space issues on my Rcs.is?
When the space on the Rcs.is’s disk is full, it can interfere with the Rcs.is’s functionality, such as causing database write issues, being unable to view application logs, Rcs.is resizing problems, and being unable to reset the Rcs.is’s root password. Clearing space on the Rcs.is’s hard disk will allow the Rcs.is to function normally.
To fix the problem, access the Rcs.is via SSH or log in using the Recovery Console.
You can check which folders are using the most space on the Rcs.is by using the disk utilization command, du
:
The command returns output similar to this:
In this example, the command lists the directories in the /var
directory and how much space they are using. The -h
flag returns the output in a human-readable format, and the --max-depth=1
flag outputs the disk usage only for the folders in the /vars
directory. Increasing the value of --max-depth
returns additional levels of subfolders. You can use the du
command to assess other directories and sub-directories by changing the path in the command.
Once you see which directories have high utilization, you can use the list command, ls, with the -larSh
flag to see which individual files are largest in the directory:
In the example above, this returns all of the files in /var/log
directory, sorted by size, in human-readable format.
Rapid increases in disk utilization are commonly caused by system or application log files being filled with errant entries in the /var
directory. When clearing out hard disk space on your Rcs.iss, we suggest you start by assessing the space usage of files in the /var
directory. The /var
directory also commonly houses website and database files making it a prime location for high disk utilization.
Based on the output, you can start deleting unwanted files. To delete a file, use the rm
command:
To remove a directory, use the rm
command with the directory flag (-d
):
After deleting old files, unwanted programs, log rotations, and removing extra packages, run the disk free command (df
) with the human-readable format (-h
) flag to verify that the disk space has been reduced:
df -h
The command returns output similar to this:
The output displays the size of each file system on the Rcs.is, the space used in each file system, and how much space is available. The /dev/vda1
represents your Rcs.is’s hard disk space.