我一整天都遇到随机故障,一些 php 脚本说没有足够的空间。我有 1 TB 驱动器,已使用约 200 GB,所以我有足够的空间。我检查了日志和目录似乎一切正常。我该怎么做才能确保这种情况不再发生?
[(01:44 PM)] [(~)] $ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 63G 0 63G 0% /dev
tmpfs 63G 120K 63G 1% /dev/shm
tmpfs 63G 106M 63G 1% /run
tmpfs 63G 0 63G 0% /sys/fs/cgroup
/dev/mapper/rl-root 70G 70G 668M 100% /
/dev/mapper/rl-home 856G 121G 736G 15% /home
/dev/nvme0n1p2 1014M 294M 721M 29% /boot
/dev/nvme0n1p1 599M 5.8M 594M 1% /boot/efi
tmpfs 13G 0 13G 0% /run/user/0
然后当我测试 php 脚本时,这就是我得到的
[(12:14 PM)] [(/home/virtual/sites/)] $ php test.php
Fatal error: Uncaught mysqli_sql_exception: Error writing file '/tmp/MLfd=71' (OS errno 28 - No space left on device)
这是一些包含最多数据的目录大小
[(01:58 PM)] [(/)] $ du -sh * | sort -h
4.0K tmp
108K root
120K dev
312K opt
27M etc
106M run
260M boot
2.8G usr
66G var
114G home
[(01:59 PM)] [(/var)] $ du -sh * | sort -h
4.0K tmp
32K spool
44K www
68K named
4.9M cache
2.9G log
64G lib
[(01:59 PM)] [(/var/lib)] $ du -sh * | sort -h
4.0K chrony
4.0K logrotate
4.0K unbound
12K NetworkManager
12K setroubleshoot
36K alternatives
148K systemd
592K php
676K shorewall
1.2M pear
5.6M dnf
27M selinux
30M mlocate
33M sss
240M rpm
63G mysql