{"id":3270,"date":"2024-02-17T18:01:01","date_gmt":"2024-02-17T10:01:01","guid":{"rendered":""},"modified":"2024-02-17T18:01:01","modified_gmt":"2024-02-17T10:01:01","slug":"Linux No space left on device \u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3","status":"publish","type":"post","link":"https:\/\/mushiming.com\/3270.html","title":{"rendered":"Linux No space left on device \u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3"},"content":{"rendered":"

\n <\/path> \n<\/svg> <\/p>\n

\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3\u573a\u666f\uff1a<\/h2>\n

linux \u8fdb\u5165\u67d0\u4e2a\u76ee\u5f55 \u547d\u4ee4\uff0ccd \/+tab\uff0c\u4f7f\u7528tab\u81ea\u52a8\u8865\u5168\u76ee\u5f55\u65f6\uff0c\u62a5\u9519\u4e86\uff1a<\/p>\n

[<\/span>root@host-<\/span>*<\/span> ~<\/span>]<\/span>#  cd \/<\/span>-<\/span>bash:<\/span> cannot create temp file for<\/span> here-<\/span>document:<\/span> No space left on device\n<\/code><\/pre>\n

\u95ee\u9898\u6392\u67e5<\/h2>\n

df -h\u67e5\u770b\u78c1\u76d8\u4f7f\u7528\u60c5\u51b5\uff1a<\/p>\n

[<\/span>root@host-<\/span>*<\/span> ~<\/span>]<\/span># df -<\/span>h \nFilesystem                                  Size  Used Avail Use%<\/span> Mounted on\n\/<\/span>dev\/<\/span>mapper\/<\/span>centos-<\/span>root                      25<\/span>G   25<\/span>G   20<\/span>K 100<\/span>%<\/span> \/<\/span>\ndevtmpfs                                     32<\/span>G     0<\/span>   32<\/span>G   0<\/span>%<\/span> \/<\/span>dev\n<\/code><\/pre>\n

df -i \u67e5\u770binode\u4f7f\u7528\u60c5\u51b5\uff1a<\/p>\n

[<\/span>root@host-<\/span>*<\/span>]<\/span># du -<\/span>sh *<\/span>\n98<\/span>G\t \twhuser\n2.2<\/span>M\twhftp\n\n<\/code><\/pre>\n
\n

\u539f\u56e0\u5206\u6790\uff1a<\/h2>\n

\u6839\u636e\u4e0a\u9762\u95ee\u9898\u6392\u67e5\uff0c\/ \u6ee1\u4e86\uff0cuse 100%\uff0c\u8fd9\u4e2a\u65f6\u5019\u9700\u8981\u67e5\u4e00\u4e0b \/ \u6709\u6ca1\u6709\u67e5\u8fc7200M\u7684\u5927\u6587\u4ef6<\/p>\n

[<\/span>root@host-<\/span>*<\/span>]<\/span># find \/<\/span> -<\/span>type f -<\/span>size +<\/span>200<\/span>M -<\/span>print0 |<\/span> xargs -<\/span>0<\/span> du -<\/span>h\n598<\/span>M\t\/<\/span>home\/<\/span>123.<\/span>AVL\n421<\/span>M\t\/<\/span>mnt\/<\/span>123.<\/span>img\n0<\/span>\t\/<\/span>proc\/<\/span>kcore\n5.0<\/span>G\t\/<\/span>tmp\/<\/span>1.<\/span>tmp\n5.0<\/span>G\t\/<\/span>tmp\/<\/span>2.<\/span>tmp\n5.0<\/span>G\t\/<\/span>tmp\/<\/span>3.<\/span>tmp\n<\/code><\/pre>\n
\n

\u89e3\u51b3\u65b9\u6848\uff1a<\/h2>\n

\u4e0a\u9762\u53ef\u4ee5\u770b\u5230\u67093\u4e2a5.0G\u7684.tmp\u4e34\u65f6\u6587\u4ef6\uff0c\u8fdb\u5165\u8be5\u76ee\u5f55\u4e0b\uff0c\u5220\u6389\u5373\u53ef\u6062\u590d<\/p>\n

[<\/span>root@host-<\/span>*<\/span>]<\/span># cd \/<\/span>tmp\n[<\/span>root@host-<\/span>*<\/span>]<\/span># rm -<\/span>rf  1.<\/span>tmp  2.<\/span>tmp 3.<\/span>tmp\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"Linux No space left on device \u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3cd\/-bash:cannotcreatetempfileforhere-document:Nospaceleftondevice\u78c1\u76d8\u7a7a\u95f4\u4e0d...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/3270"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=3270"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/3270\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=3270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=3270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=3270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}