Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux prompt how to solve the problem of insufficient space

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains the "linux prompt space shortage how to solve", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "linux prompt space shortage how to solve" it!

Solution: 1. If the space utilization of disk partition "block" or "inode" reaches "100%", it can be solved by expanding the capacity of cloud disk; 2. If the deleted file is not released because the handle is occupied and not released, you can use the "kill-9 process number" command to free disk space at the end of the process.

The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

Problem description

Insufficient space when creating files in Linux operating system CVM: No space left on device

Possible reasons

Disk partition block space usage reached 100%.

Disk partition inode space usage reached 100%.

The deleted file did not release the corresponding space because the handle was occupied and not released.

Fs.inotify.max_user_ watches value depletion

Block usage of disk partitions reaches 100%

Execute the following command to view disk space.

Df-h

The block space usage is 100% as shown in the echo message below.

Solution: expand the capacity of cloud disk.

Inode usage of disk partitions reaches 100%

Execute the following command to view disk space.

Df-I

The inode space usage is 100% as shown in the echo message below.

Solution: expand the capacity of cloud disk.

Deleted file the corresponding space is not released because the handle is occupied and not released.

Log in to the server and execute df-h to see that the disk block space usage is 100%.

Execute df-I to check that the disk inode space utilization is low. As shown in the screenshot below, the inode space utilization in this example is 1%.

There is a big difference between the space occupied by performing du-sh to view files and the available disk space.

Solution:

Execute the following command to find out if there are files in the current partition that have not been cleared.

Lsof | grep delete

Execute the following command to end the process to free disk space.

Kill-9 process number

Fs.inotify.max_user_ watches value depletion

Linux operating system CVM prompt space is insufficient: No space left on device

Solution:

Execute the following command to edit the / etc/sysctl.conf file.

Vi / etc/sysctl.conf

Add the following information:

Fs.inotify.max_user_watches = 524288

Execute the following command to make the changes take effect.

Sysctl-p

Inotify is used to monitor file system events. By default, the maximum number of files created by each real user ID is 8192, and the current inotify file monitoring limit can be obtained by executing the following command.

Cat / proc/sys/fs/inotify/max_user_watches

If this limit is not sufficient to monitor all files, you must increase the limit to make it work properly.

Thank you for your reading, the above is the content of "linux prompt space shortage how to solve". After the study of this article, I believe you have a deeper understanding of how to solve the problem of linux prompt space shortage. The specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report