Disk-Usage
Ubuntu:bash:無法為此處文件創建臨時文件:設備上沒有剩餘空間
文件名選項卡完成後,我收到來自 bash 的錯誤 No space left on device。
正如在類似問題上所建議的那樣,當我試圖找出佔用我空間的東西時,我對 df -ah 結果感到困惑。我的電腦有 220GB 磁碟,似乎只使用了 66GB。
哪裡有問題?var/lib 中有很多 docker 鏡像?我應該把它們搬到別的地方嗎?
Filesystem Size Used Avail Use% Mounted on sysfs 0 0 0 - /sys proc 0 0 0 - /proc udev 7,8G 0 7,8G 0% /dev devpts 0 0 0 - /dev/pts tmpfs 1,6G 11M 1,6G 1% /run /dev/nvme0n1p7 34G 32G 0 100% / securityfs 0 0 0 - /sys/kernel/security tmpfs 7,8G 26M 7,8G 1% /dev/shm tmpfs 5,0M 4,0K 5,0M 1% /run/lock tmpfs 7,8G 0 7,8G 0% /sys/fs/cgroup cgroup 0 0 0 - /sys/fs/cgroup/systemd pstore 0 0 0 - /sys/fs/pstore efivarfs 0 0 0 - /sys/firmware/efi/efivars cgroup 0 0 0 - /sys/fs/cgroup/cpuset cgroup 0 0 0 - /sys/fs/cgroup/net_cls,net_prio cgroup 0 0 0 - /sys/fs/cgroup/pids cgroup 0 0 0 - /sys/fs/cgroup/rdma cgroup 0 0 0 - /sys/fs/cgroup/freezer cgroup 0 0 0 - /sys/fs/cgroup/devices cgroup 0 0 0 - /sys/fs/cgroup/memory cgroup 0 0 0 - /sys/fs/cgroup/blkio cgroup 0 0 0 - /sys/fs/cgroup/cpu,cpuacct 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 debugfs 0 0 0 - /sys/kernel/debug hugetlbfs 0 0 0 - /dev/hugepages configfs 0 0 0 - /sys/kernel/config fusectl 0 0 0 - /sys/fs/fuse/connections /dev/loop2 54M 54M 0 100% /snap/core18/677 /dev/loop3 148M 148M 0 100% /snap/skype/66 /dev/loop1 202M 202M 0 100% /snap/hiri/53 /dev/loop4 92M 92M 0 100% /snap/core/6259 /dev/loop6 43M 43M 0 100% /snap/gtk-common-themes/701 /dev/loop7 136M 136M 0 100% /snap/chromium/490 /dev/loop5 227M 227M 0 100% /snap/pycharm-community/83 /dev/loop8 165M 165M 0 100% /snap/noson/160 /dev/loop10 142M 142M 0 100% /snap/skype/51 /dev/loop12 139M 139M 0 100% /snap/skype/54 /dev/loop13 91M 91M 0 100% /snap/core/6350 /dev/loop9 202M 202M 0 100% /snap/hiri/56 /dev/loop11 271M 271M 0 100% /snap/pycharm-community/108 /dev/loop16 477M 477M 0 100% /snap/libreoffice/100 /dev/loop14 179M 179M 0 100% /snap/noson/175 /dev/loop20 478M 478M 0 100% /snap/libreoffice/80 /dev/loop19 144M 144M 0 100% /snap/chromium/566 /dev/loop23 54M 54M 0 100% /snap/core18/594 /dev/loop21 35M 35M 0 100% /snap/gtk-common-themes/818 /dev/loop25 271M 271M 0 100% /snap/pycharm-community/112 /dev/loop26 193M 193M 0 100% /snap/hiri/42 /dev/nvme0n1p9 173G 16G 149G 10% /home /dev/nvme0n1p1 496M 64M 433M 13% /boot/efi binfmt_misc 0 0 0 - /proc/sys/fs/binfmt_misc tmpfs 1,6G 0 1,6G 0% /run/user/0 tmpfs 1,6G 60K 1,6G 1% /run/user/1000 gvfsd-fuse 0 0 0 - /run/user/1000/gvfs /dev/loop27 54M 54M 0 100% /snap/core18/719 /dev/loop24 91M 91M 0 100% /snap/core/6405 /dev/loop0 35M 35M 0 100% /snap/gtk-common-themes/1122 /dev/loop22 94M 94M 0 100% /snap/noson/179 /dev/loop17 147M 147M 0 100% /snap/chromium/595 /dev/loop18 484M 484M 0 100% /snap/libreoffice/104 overlay - - - - /var/lib/docker/overlay2/0d3c09bca9a7835f9c9b51114c9c15d08b127dbf7eacc53f7dccaa9f79c9885e/merged overlay - - - - /var/lib/docker/overlay2/085ba20c74d4078feda19d9a71ce2b04810ea22ac1e074f451a81a6d60d80c10/merged overlay - - - - /var/lib/docker/overlay2/08de193cf78bd7284cd8b2254c727a859039b34bfc1288c579d964f4b2029f45/merged shm - - - - /var/lib/docker/containers/b32add46586fc18218271486f137687430272cabed1e8090be8d4301d7cb3368/mounts/shm shm - - - - /var/lib/docker/containers/d8c1e0688afd134667083c1fcf467ec2b252fc8e6457ed1635a70642ce536f77/mounts/shm shm - - - - /var/lib/docker/containers/80982ee282be06f4dd5cc8e3fbad5ebe215e9257db61f9e1cac87bbc6543f058/mounts/shm nsfs - - - - /run/docker/netns/4b8d6fe23d4c nsfs - - - - /run/docker/netns/43a0f6dd8034 nsfs - - - - /run/docker/netns/9e2e1b56b0de overlay - - - - /var/lib/docker/overlay2/71d932f5ea853341431835774f3ecd4d7ab909020fdef3343048fcdf75401ebc/merged shm - - - - /var/lib/docker/containers/2aa2003301c5e4e63182376b1bce08e34188835c59794214070b6cc6a576e8e7/mounts/shm nsfs - - - - /run/docker/netns/9eb16a7792ab tracefs - - - - /sys/kernel/debug/tracing du -shc /* | sort -h 3,9M /lib32 11M /run 13M /bin 13M /sbin 16M /etc 161M /root 214M /boot 761M /lib 5,4G /usr 16G /home 17G /snap 28G /var 66G total
好吧,看看名單。您擁有的基本分區是以下兩個:
Filesystem Size Used Avail Use% Mounted on /dev/nvme0n1p7 34G 32G 0 100% / /dev/nvme0n1p9 173G 16G 149G 10% /home
即,您有一個單獨
/home
的 ~170 GB,但其他所有內容(包括/var
)都在 中/
,並且只有 34 GB。重新分區已安裝的系統可能很困難(除非您使用的是 LVM,但您不是),但您可以嘗試查看是否有一些可以移動到的大型數據集
/home
,例如那些圖像。您還可以執行從/var/whatever
到的符號連結,例如/home/var/whatever
, (或類似的綁定掛載),以便數據在 . 下的預期位置仍然可見/var
。