中文字幕在线观看,亚洲а∨天堂久久精品9966,亚洲成a人片在线观看你懂的,亚洲av成人片无码网站,亚洲国产精品无码久久久五月天

Linux磁盤空間劇增引發(fā)故障怎么辦

2020-03-03    來(lái)源:愛站科技

容器云強(qiáng)勢(shì)上線!快速搭建集群,上萬(wàn)Linux鏡像隨意使用

在使用linux之后難免會(huì)因?yàn)?span style="color:#002FD9">磁盤空間的劇增而引起一系列問(wèn)題,那么Linux磁盤空間劇增引發(fā)故障怎么辦?大家是不是曾在故障的時(shí)候手足無(wú)措呢?那么接下來(lái)我們就一起去看看Linux磁盤空間劇增引發(fā)故障的解決方法。

1.下午,用戶反映,無(wú)法通過(guò)某臺(tái)服務(wù)器向網(wǎng)絡(luò)打印機(jī)打印文件.其它機(jī)器正常.
錯(cuò)誤現(xiàn)象:
lpr: error - unable to print file: client-error-request-value-too-long

2.錯(cuò)誤原因:
1. Are you trying to print a file >2GB? If so, that doesn't
work in CUPS 1.1.x and earlier.

2. Does the RequestRoot directory (/var/spool/cups by default)
exist? If not, "mkdir /var/spool/cups"

3. Does the TempDir directory (/var/spool/cups/tmp by default)
exist? If not, "mkdir /var/spool/cups/tmp"

4. Is the disk full? "df -k /var/spool/cups" will show if
this is the case. If the disk is full, delete files to
free up disk space.

3.判斷是第四點(diǎn)原因造成
df -h,
/var 100% used.

4.定位
cd /var
find . -maxdepth 1 -type d -print | xargs du -sk | sort -rn
定位找到文件
/var/log/bandwidth 占用了19g空間

5.刪除
rm -rf bandwidth

6.空間仍然沒(méi)有施放

7.看cpu,rotate進(jìn)程占用大量cpu,
kill -9

8.恢復(fù)正常,可以打印.

9.繼續(xù)找原因
find /home -type f -ls | perl -e 'while(<>;){$s+=(split)[6];};print "$s\n";'

This will count all hidden files, including the ones from lost+found.

The number should be close to what how much space is used on disk.

If df shows a something way different you may want to run something like:
lsof | grep home

Look for some suspicious applications.

The idea is that if an application opens a file and the file is removed
while the application keeps it open, the actual data is not removed from
disk until the program exits or close the file.

My advice:
1. boot in single mode, recommended from a rescue disk so you have a
'clean' kernel.
2. test du/find versus df output.
3. if different run fsck with -f and, if you can afford to wait, -c flags.
4. I think du/find should show similar numbers now (if it doesn't and
you booted with a 'clean' kernel then I'll be interested for details)
5. reboot with the normal kernel
6. if df shows different than du then most likely you've been hacked -
replace OS with a clean copy - try to find what programs are different
than the original, etc.

刪除文件,如果進(jìn)程在的話,空間是不會(huì)被釋放的.

10.檢查發(fā)現(xiàn)/etc/syslog.conf
中的一行配置
kern.=debug -/var/log/bandwidth
安裝webmin時(shí)候自動(dòng)配置的.

注釋掉,萬(wàn)事大吉了.

以上就是Linux磁盤空間劇增引發(fā)故障怎么辦的內(nèi)容,以上方法非常簡(jiǎn)單,希望能夠幫助大家解決問(wèn)題,更多精彩內(nèi)容就請(qǐng)關(guān)注我們愛站技術(shù)頻道吧。

標(biāo)簽: Linux 磁盤 故障

版權(quán)申明:本站文章部分自網(wǎng)絡(luò),如有侵權(quán),請(qǐng)聯(lián)系:west999com@outlook.com
特別注意:本站所有轉(zhuǎn)載文章言論不代表本站觀點(diǎn)!
本站所提供的圖片等素材,版權(quán)歸原作者所有,如需使用,請(qǐng)與原作者聯(lián)系。

上一篇:Linux下Telnet如何進(jìn)入Moto E6

下一篇:Linux apache啟動(dòng)失敗的解決方法