Linux system inode full fault handling

Source: Internet
Author: User

Linux system inode full fault handling

As we all know, the Inode code in the file system is the unique number that points to the disk block, if the server is compromised or the log file runs out of the disk Inode resource number, the new data cannot obtain the inode number resulting in no The method store. Example: viewing an existing Inode resource on disk in the/boot standalone partition and creating a large number of file consumption depleted inode numbers through a for loop, causing the disk to not write to the content and finally processing the failure.

[Email protected] ~]# df-i/boot/#查看inode编号

Filesystem inodes iused IFree iuse% mounted on

/DEV/SDA1 1024064 1024026 1%/boot

[[Email protected] ~] for i in {358..1024500}; Do Touch File$i;done

[Email protected] ~]# df-i/boot #发现inode占满

Filesystem inodes iused IFree iuse% mounted on

/DEV/SDA1 1024064 1024064 0 100%/boot

[Email protected] ~]# Cd/boot

[email protected] boot]# Touch 123.txt #创建文件无法成功

Touch:cannot Touch ' 123.txt ': No space left on device

Method One: Use the For loop to delete files in a traditional way, but slowly

[[Email protected] ~] for i in {950000..1024500}; Do RM-RF File$i;done #一点的删除

Method Two: Using the method of transmitting parameters to delete files quickly and efficiently

[[email protected] boot]# LS File{400000..500000}|xargs rm the most effective method for transmitting parameters

[[email protected] boot]# LL File{600000..700000}|xargs RM ll lists too many parameters to pass to RM

Ls:cannot access file600000:no Such file or directory, RM is not recognized, so the

Rm:invalid option--' W ' ls displays a separate file name in the

Try ' rm--help ' for more information. Line delivery.

Rm:invalid option--' W '



This article is from the "11831715" blog, please be sure to keep this source http://11841715.blog.51cto.com/11831715/1958467

Linux system inode full fault handling

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.