- Documentation
Elastic Compute Service
Elastic Compute Service
Troubleshooting
High instance load issue
Troubleshooting and solution for high disk load of ECS instance with Linux system
High instance load issue
Troubleshooting and solution for high disk load of ECS instance with Linux system
Troubleshooting and solution for high disk load of ECS instance with Linux system
This topic describes how to troubleshoot and handle the No space left on device error that may occur due to high disk load (usage) when you create a file or application on a Linux instance.
Procedure
View details of current disk usage
- Execute the following command to view the current disk usage.
-
- View disk usage details for each directory level by level.
This topic starts from the root directory / as an example.
- Execute the following command to enter the root directory.
- Execute the following command to view the folder in the current directory that uses the most disk space.
-
- Execute the following command to enter the usr directory.
In the example provided in this topic, the large file is in the usr directory. Replace it with the actual directory path.
- Execute the following command to view the folder in the current directory that occupies the most disk space.
-
- Repeat steps c and d until you locate the file that uses a large amount of space. After this, confirm whether the target file is used by the system or for business purposes.
- File cleanup cannot be performed
- If the target large file is necessary for your business or system and cannot be cleaned up, you can upgrade your instance configuration, expand the volume capacity, or change the volume specification. This ensures that programs can run normally without being limited by the performance of the volume. For operation details, refer to Changing instance types, Expanding volumes, and Changing volume specifications.
- File cleanup can be performed
- If the target large file is not necessary, you can execute the following command to forcibly delete the file and free up disk space.
warning
- Deletion is irreversible. Please proceed with caution.
- Replace /usr/local/test_large_file in the command with the actual path of the target file.
View Inode usage of current disk
- Execute the following command to view the Inode usage.
-
- If the Inode usage rate reaches or is close to 100%, you need to clean up files or directories with high Inode usage.
- Execute the following commands to confirm the number of files in the root directory / .
-
- Execute the following command to enter the directory with the largest number of files.
tip
- A greater number of files indicates higher Inode usage.
- In the example provided in this topic, the usr directory stores the largest number of files.
- Execute the following command to view which directory in the current directory stores the largest number of files.
-
- Repeat steps b and c to enter the directory with the highest Inode usage (which indicates the largest number of files) level by level until you locate the files or directories with excessive space usage.
- Cleanup cannot be performed
- If the target file or directory is necessary for business or the system and cannot be cleaned up, you can expand the volume capacity or change the volume specification. This ensures that programs can run normally without being limited by the performance of the volume. For operation details, refer to Expanding volumes and Changing volume specifications.
- Cleanup can be performed
- If the target file or directory is not necessary, you can execute the following command to forcibly delete the target file and free up disk space.
warning
- Deletion is irreversible. Please proceed with caution.
- Replace /usr/local/test_large_file in the command with the actual path of the target file.
Last updated: 2026.06.18 17:49:51