Troubleshooting Cloud Server ECS Linux disk space full (including Innode full)

Source: Internet
Author: User

Problem description

When creating files within the ECS Linux system, there is a lack of space hint like the following:

    1. No space left on device …
Cause of the problem

Possible causes of this problem include:

    • Disk partition space usage reaches 100%.
    • The disk partition Inode utilization reaches 100%.
    • Zombie Files: Deleted files are not freed due to a handle being occupied without releasing the corresponding space.

Treatment methods

To resolve this issue, we recommend that you handle the following:

    • Full partition capacity
    • Inode capacity Full
    • Modify Inode Number
    • Zombie File Analysis Delete

Full partition capacity

Login to SSH, use df-h to view usage, mounted on refers to the mounted directory:

Loop to execute the following instructions to see which directory is large, enter the directory:

    1. cd /
    2. du -sh *

Until the most accurate file or directory is found, then the relevant files or directories are deleted, in combination with business conditions. or buy larger data disks to share the processing.

Inode capacity Full

Log in to SSH and run the following command to analyze how many files are under each directory under the root directory:

    1. for i in /*; do echo $i; find $i | wc -l; done

Then, step into the Inode occupies the highest directory, continue to execute the above instructions, gradually locate the file or directory that occupies too much space, and finally make corresponding cleanup.

Modify Inode Number

The inode node of ECS Linux records important information such as file type, size, permissions, owner, number of file connections, creation time and update time, and a more important content is a pointer to the data block. The general situation does not require special configuration, if the storage file a lot, need to configure. Sometimes there is a surplus of disk space but cannot store files, possibly due to inode exhaustion. df-i can query the usage of inode:

You can see the following steps to adjust the number of Inode nodes:

Note:The inode adjustment requires reformatting the disk, make sure that the data has been backed up effectively before doing the following.

1, uninstall the system files. Like what:

    1. umount /home

2. Re-establish the file system and specify the number of Inode nodes:

    1. mkfs.ext3 /dev/xvdb -N 1638400

3. Modify the Fstab file:

    1. vim /etc/fstab

4. View the number of Inode nodes after modification:

    1. dumpe2fs -h /dev/xvdb | grep node

Zombie File Analysis Delete

If there is no problem with the disk and the inode, you need to see if there is a zombie file that has not been cleared handle. These files have actually been deleted, but a service program is using these files, causing the files to remain occupied, unable to free up disk space, and using the following command to view the dead file occupancy:

    1. lsof |grep delete | more

If these files are too large, it can take up a lot of disk space. You can clear the zombie file by releasing the handle as follows:

    • Restart the server.
    • Gracefully stop or kill service processes that occupy these files.

Troubleshooting Cloud Server ECS Linux disk space full (including Innode full)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.