centos 7 -- Disk Requirements: At least 134MB more space needed on the / filesystem.

用了幾年的centos7,今天執行yum update時,彈出一行有錯誤的提示:
Disk Requirements:   At least 134MB more space needed on the / filesystem.

df -hl查看,/dev/mapper/centos-root 顯示100%,
/dev/mapper/centos-root空間為零??!!


......
改用du -h -x --max-depth=1  查看/ 下哪个目录占用过高,
0               ./proc
132K         ./root
2.2G          ./usr
48G          ./mnt
763M        ./var
16.6G       ./opt
...
 可以看出mnt目录占用过大,仔細檢查后發現mnt的某一個文件夾掛載遠程失敗,
結果將要複製的數據都寫到本機,rm這個文件夾的數據,用df -hl再查看,
/dev/mapper/centos-root 正常啦!yum update順利執行。

***du -h -x --max-depth=1 /XXXX --exclude=/????

原文地址:https://www.cnblogs.com/k98091518/p/9099216.html