How to deal with the full disk of linux server

1. df -h command: Check the usage of the hard disk through the df -h command: it is found that the vda3 mount point is almost full [this is still processed, it reached 49G before]

      2. Knowing that the hard disk is full, the next step of name is to start searching for large files in the server, starting from the root directory, through the du -h --max-depth=1 command, it is found that the home folder occupies more space many

cd ./home, and then use the du -h --max-depth=1 command to search down one by one, and finally found that Oracle takes up a lot of space

After searching carefully, I found that the log file and listener.org occupied a lot, and the problem was located. The following is to solve the problem:

Follow the steps to find large files above and find that there are more than 3G log files in the /home/oracle/app/oracle/diag/tnslsnr/WH-CS-116/listener/alert folder. The long-term log is generally not used. You can delete according to your own situation. Use the following command to delete the files in the folder that are the specified number of days ago (shown below is to delete the log files 5 days ago),

find . -mtime +5 -type f -name "*" -exec rm -f {} \;

After completing the above operations, some storage space is released,

But I checked and found that the file /home/oracle/app/oracle/diag/tnslsnr/WH-CS-116/listener/trace plus a listener.log file below, and it is very large

Online search found that this file is too big to cause the database sql speed to slow down, and it will also lead to the unsuccessful connection of visual tools such as plsql. The following is a record of the processing method:

1. Rename the file: mv listener.log listener.old20180917

2. Re-open the listener log, a new listener.log file will be automatically generated: lsnrctl set log_status on

3. After there is no problem, you can delete the file listener.old20180917

Guess you like

Origin blog.csdn.net/My_SweetXue/article/details/111247216