系统突然报错:fatal error: can’t write PCH file: 设备上没有空间,然后df -h查看原因:
root@ubuntu18-Slave-server:~# df -ih
文件系统| 索引节点号(已用)|可用I|已用I|百分比|挂载点
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 976K 529 975K 1% /dev
tmpfs 982K 1.8K 980K 1% /run
/dev/sda1 1.5M 20K 1.5M 2% /
/dev/sda5 1.5M 155K 1.4M 11% /usr
tmpfs 982K 1 982K 1% /dev/shm
tmpfs 982K 5 982K 1% /run/lock
tmpfs 982K 18 982K 1% /sys/fs/cgroup
/dev/sda4 550K 21 550K 1% /tmp
/dev/sda2 62K 313 61K 1% /boot
/dev/sda6 917K 12K 906K 2% /var
/dev/sda3 1.2M 229 1.2M 1% /home
/dev/sda8 747K 11 747K 1% /opt
/dev/loop0 463 463 0 100% /snap/snapd/8542
/dev/loop1 61K 61K 0 100% /snap/gtk-common-themes/1506
/dev/loop2 24K 24K 0 100% /snap/gnome-3-34-1804/36
/dev/loop4 784 784 0 100% /snap/gnome-system-monitor/148
/dev/loop5 230 230 0 100% /snap/gnome-characters/550
/dev/loop3 1.4K 1.4K 0 100% /snap/gnome-calculator/748
/dev/loop6 355 355 0 100% /snap/gnome-logs/100
/dev/loop7 11K 11K 0 100% /snap/core18/1885
tmpfs 982K 12 982K 1% /run/user/0
如上所示:snap占用/dev/loop0-/dev/loop7占用100% !
这时,我们只要清理掉一下就可以了.
sudo apt autoremove --purge snapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
gnome-software-plugin-snap* snapd*
0 upgraded, 0 newly installed, 2 to remove and 334 not upgraded.
After this operation, 97.8 MB disk space will be freed.
Do you want to continue? [Y/n] y
.....省略....
然后在查看,可以看见已经清理完毕:
root@ubuntu18-Slave-server:~
文件系统| 索引节点号(已用)|可用I|已用I|百分比|挂载点
Filesystem Inodes IUsed IFree IUse% Mounted on
sysfs 0 0 0 - /sys
proc 0 0 0 - /proc
udev 976K 529 975K 1% /dev
devpts 0 0 0 - /dev/pts
tmpfs 982K 1.8K 980K 1% /run
/dev/sda1 1.5M 19K 1.5M 2% /
/dev/sda5 1.5M 155K 1.4M 11% /usr
securityfs 0 0 0 - /sys/kernel/security
tmpfs 982K 1 982K 1% /dev/shm
tmpfs 982K 5 982K 1% /run/lock
tmpfs 982K 18 982K 1% /sys/fs/cgroup
cgroup 0 0 0 - /sys/fs/cgroup/unified
cgroup 0 0 0 - /sys/fs/cgroup/systemd
pstore 0 0 0 - /sys/fs/pstore
cgroup 0 0 0 - /sys/fs/cgroup/net_cls,net_prio
cgroup 0 0 0 - /sys/fs/cgroup/cpu,cpuacct
cgroup 0 0 0 - /sys/fs/cgroup/freezer
cgroup 0 0 0 - /sys/fs/cgroup/memory
cgroup 0 0 0 - /sys/fs/cgroup/cpuset
cgroup 0 0 0 - /sys/fs/cgroup/blkio
cgroup 0 0 0 - /sys/fs/cgroup/pids
cgroup 0 0 0 - /sys/fs/cgroup/rdma
cgroup 0 0 0 - /sys/fs/cgroup/devices
cgroup 0 0 0 - /sys/fs/cgroup/perf_event
cgroup 0 0 0 - /sys/fs/cgroup/hugetlb
systemd-1 - - - - /proc/sys/fs/binfmt_misc
mqueue 0 0 0 - /dev/mqueue
nfsd 0 0 0 - /proc/fs/nfsd
debugfs 0 0 0 - /sys/kernel/debug
sunrpc 0 0 0 - /run/rpc_pipefs
hugetlbfs 0 0 0 - /dev/hugepages
configfs 0 0 0 - /sys/kernel/config
fusectl 0 0 0 - /sys/fs/fuse/connections
/dev/sda4 550K 21 550K 1% /tmp
/dev/sda2 62K 313 61K 1% /boot
/dev/sda6 917K 11K 906K 2% /var
/dev/sda3 1.2M 229 1.2M 1% /home
/dev/sda8 747K 11 747K 1% /opt
tmpfs 982K 12 982K 1% /run/user/0
binfmt_misc 0 0 0 - /proc/sys/fs/binfmt_misc
You know you can do anything you set your mind to. 有志者,事竟成。 本篇完_
|