In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Http://blog.csdn.net/bobo0915/article/details/51980650
You can use the following command to find out which folder in the system has a problem, and then look at it layer by layer to find which file.
The order is
First change to the root directory
Cd /
Du-sh. / *
Du-sh. / * | sort
Then find the largest folder.
Layer by layer, you can find out which folder is the largest and whether it is problematic. In general, you can determine which one the target file is.
= =
Problem: only 56% of disk space is used and there is still space left, but creating files and folders is a reminder that the device is running out of space.
Analysis: two conditions are required to create a file on disk:
1. Disk space
two。 Need to have inode any one full will prompt the device that there is no space.
The specific reason here is that the disk is full because the inode of the disk has been allocated.
You can use df-ia to view disk details.
[root@~] # df-ia
File system Inode (I) used (I) available (I) used% mount point
/ dev/sda3 4928640 89934 4838706 2%
Proc 0 000-/ proc
Sysfs 0 000-/ sys
Devpts 0 000-/ dev/pts
/ dev/sda1 50200 35 50165 / boot
Tmpfs 35352 1 35351 1 per dev/shm
None 0 000-/ proc/sys/fs/binfmt_misc
/ dev/drbd0 251392 251392 0 / data
As you can see above, (I) 100% is used.
Solution: delete some useless files or folders and release inode.
There are still many problems about the full index nodes in disk space. I wanted to write about the solution, but I saw that the netizens had a good literary style, and the methods to deal with this problem were quite appropriate, so I borrowed it to share with you:
First, problems are found:
When creating files in the / data partition of a low-configured Linux server (with relatively small memory and hard disk), the system prompts you that there is insufficient disk space and uses the df-h command to check the disk usage. It is found that the / data partition only uses 66%, and there is still 12 GB of space left. In theory, this problem will not occur.
Second, analyze the problems:
Later, I looked at the index node (inode) of the / data partition with df-I and found that it was full (IUsed=100%), preventing the system from creating new directories and files.
Inode is translated into Chinese as an index node. After each storage device (such as a hard disk) or partition of a storage device is formatted as a file system, there should be two parts.
One part is inode, and inode is the information used to store these data, including file size, ownership, user group, read and write permissions, and so on.
The other part is that Block,Block is used to store data. Inode indexes the information for each file, so you have the value of inode. According to the instructions, the operating system can find the corresponding file with the fastest value of inode.
Although there is still some Block left on this server, the inode is full, so when creating a new directory or file, the system prompts you that there is not enough disk space.
Third, find out the reasons:
There are a large number of small byte cache files in the / data/cache directory, which do not take up much Block, but take up a large number of
Fourth, the solution:
1. Delete some files in the / data/cache directory and release part of the inode in the / data partition. Pay special attention to those spool files, which generally occupy more nodes because they are small and fragmented. At the same time, pay more attention to log file information.
2. Connect the newcache directory in the free partition / opt to / data/cache with a soft connection, and use the inode of the / opt partition to alleviate the problem of insufficient inode in the / data partition:
Ln-s / opt/newcache / data/cache
3. Replace the server and replace the low-configuration server with the high-configuration server. In many cases, using money to solve problems is more effective than using technology. Five brand new DELL PowerEdge 2950 servers piled on my desk are about to be shipped to the IDC computer room. It is generally not recommended.
About the disk inode full 100% Murmuri node explosion
Http://blog.sina.com.cn/s/blog_79d1f5e00100qywq.html
Reason:
It is usually found that the disk is not full but cannot write to the file. Prompt "no space left on device", check with df-I, you should find that the corresponding partition is 100%. Generally, there is a problem with the job of crontab, resulting in a lot of fragmentary files in / var/spool/clientmqueue.
Treatment method:
Use rm-rf * can not be deleted, and there will be a corresponding prompt, to the effect that there are too many parameters.
You can do it in a variety of ways. Here's a random one I wrote. Execute the command under / var/spool/clientmqueue/: "lsattr. / | awk-F" / "'{print $3}'| xargs-I rm-rf {}" list the attributes of the filename below with lsattr, take out the name with awk, and then rm-rf.
Another method is commonly used: "find / var/spool/clientmqueue/-type f-exec rm {}\;" or in the / var/spool/clientmqueue/ directory "find. /-exec rm {}\;"
Add "> / dev/null 2 > & 1" to the end of all lines in crontab that do not have directed output, and operate during deletion. Or stop crontab first, plus redirect.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.