Insufficient disk space in linux
What to do when linux disk space is insufficient? Let’s come together to understand it.
The first step, first use df-h to view the disk space usage, as shown in the figure /home/zhang directory disk space reached 100%.
Step 2, go to each partition you want to clean up, and roughly check the directories that may be taking up more space
Use cd and ls-lXXX
Step 3, if you can’t find it visually, then you can only find it with the command find
Use find-sizeXXb
< /p>
Step 4, delete the data that you think you don’t need
with rm-rfXXX
This article is based on Dell Spirit Vault 5000 brand, Ubuntu 18.04 system.
What happens when disk space gets small when the load on a linux server is high
1.When there is not enough disk space on the server, it will lead to problems such as not being able to write data, not being able to create new files, and so on.
2. This is a security policy of the Linux file system, which by default reserves 5% of the disk space for the root user, reserved for emergencies.
linux disk space is insufficient how to do, disk cleaning methods
Solution (to /home space is full as an example):
1. Regularly on the important file system scanning, and make comparisons, and analyze those files often read and write
#IS-IR/home>;files.txt
# difffilesold.txtfiles.txt
By analyzing the predicted space growth, you can also consider compressing infrequently read and written files to reduce the footprint.
2. Check the space file system inodes consumption
#df-i/home
If there is still a large number of inpde available, it means that the large files take up space, otherwise the thief may be a large number of small files take up space.
3. Find out which directories take up more space
See how much space /home takes up
#-hs/home
See how /home takes up more than 1,000m
#/awk’$1>;2000′
4.
#find/home-size+2000K
5. Find out which files have been recently modified or created
First TOUCH a file at the time you want as follows
#TOUCH-t08190800test
#find/home-newertest- print
6. Delete logs
#rm-rf/var/log/*
7. Make connections to partitions
In the case of a partition that has space, make a connection to the partition that does not have any empty space
#in-s/home/use/home
8. Find out the processes that are using a lot of space
9. p>
Find out the corresponding processes according to different applications and analyze the reasons.
9. Check and repair the file system
#fsck-y/home
10. Reboot the machine
With the above ten tricks, you should be able to solve most of the problems, but the key is still to plan the partitioning when installing. In addition, when you find the disk brute, you can not rush, careful operation, carefully analyze the cause, and then carefully respond. It should be noted that the above ten strokes do not need to be performed in sequence, some may be a move to seal the throat, some may require several strokes and remove the operation must be careful. If it does not work, you can only take additional hard disk, reinstall the system and other “hard” way
Also:
cd/
–h—max-depth=q/grepM/sort-n
Find the largest directory and then go to that directory.
Run -h-max-depth=1/grepM/sort-n
Find the largest directory and see if there are any useful files
Delete them if not.
linux installation rpm remaining space is insufficient how to
In the process of using linux, sometimes because of the installation of the system when the partition improperly lead to some partition space is insufficient, the following example shows how to adjust the partition.
Suppose: root (/) partition is not enough, /home partition space to free up some.
Principle: resize the /home filesystem with resize2fs, resize the partition with fdisk.
Operation steps:
1. fdisk to root (/dev/sda3) partition deletion, note that before deletion of the record of the beginning of the column surface number, the specific command:
fdisk/dev/sda, p command shown in the Start column)
2. With the same beginning of the column surface number, the establishment of the (fdisk/). Command n
3. Then use resize2fs to re-modify the size of the partition, command: resize2fs/dev/sda3.
4. Reboot the system, there is a failure to mount the /home partition, follow the prompts: mount-oremount,rw/, and at the same time, delete the line containing / under /etc/fstab. home line.
5. Reboot the system again.
thinkpad in the installation of dual-system, install linux display disk space is insufficient, has
Disk space is insufficient, either in the display of this prompt to delete a disk and then formatted, or first in windows to delete a disk. Of course the latter is recommended because your data should be backed up and transferred in time.
Linux does not support the NTFS file system of windows, even though your windows disk has space left but linux can not use it, you need to get a free space, such as in windows to split the disk, and then split out the blank disk, delete it. Delete it is to make it “nothing format”, because windows should still be NTFS format by default, linux need ext4 format, you let it first nothing format, linux can make it into ext4 format.
I’m a beginner in linux, and I’m installing fedora9 on top of xp, but the partition mount step always says “insufficient disk space”, but it’s clearly enough.
To install this, you can download a virtual machine software installation, such as vm or Microsoft’s virtual machine MicrosoftVirtualPC2007 or VirtualBox3.2.12Final, and then deployed to install linux, there will be no problem
.