{"id":421,"date":"2026-09-25T14:49:25","date_gmt":"2026-09-25T14:49:25","guid":{"rendered":"http:\/\/123.249.119.122\/Wordpress\/?p=421"},"modified":"2026-10-08T02:28:51","modified_gmt":"2026-10-08T02:28:51","slug":"clean-the-space-of-linux-cloud-server","status":"publish","type":"post","link":"http:\/\/123.249.119.122\/Wordpress\/index.php\/2026\/09\/25\/clean-the-space-of-linux-cloud-server\/","title":{"rendered":"Clean the Space of  Linux Cloud Server"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong><em>1.Check Spaces<\/em>.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Input <strong>&#8216;df -h&#8217;<\/strong> to check spaces of the cloud server.When the <strong>\/<\/strong> partition is full(100% used).The service(like mysql,httpd,and so on) of cloud server wouldn&#8217;t be operated.The business\/website of the cloud server can&#8217;t be visited normally.Filesystem can&#8217;t read-in any data.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"430\" height=\"135\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-1.png\" alt=\"\" class=\"wp-image-423\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-1.png 430w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-1-300x94.png 300w\" sizes=\"auto, (max-width: 430px) 100vw, 430px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In addition,<strong>&#8216;df -h&#8217;<\/strong> commmand can check system mounting and use ratio of disks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>2.Check spaces in the zabbix website.<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"388\" height=\"164\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-17.png\" alt=\"\" class=\"wp-image-461\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-17.png 388w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-17-300x127.png 300w\" sizes=\"auto, (max-width: 388px) 100vw, 388px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"238\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-18-1024x238.png\" alt=\"\" class=\"wp-image-462\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-18-1024x238.png 1024w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-18-300x70.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-18-768x179.png 768w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-18-1536x357.png 1536w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-18.png 1896w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>3.When the space is full,how to solve it?<\/em><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First,you can input <strong>&#8216;journalctl &#8211;disk-usage&#8217;<\/strong> to check size of journald log file.Input <strong>&#8216;journalctl &#8211;vacuum-time=7d&#8217;<\/strong> to clean logs.Input <strong>&#8216;dnf clean all&#8217;<\/strong> to clean cache of software packages.And you can clean abandoned documents in the <strong>\/opt<\/strong> directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then,input <strong>&#8216;du -sh \/* 2&gt;\/dev\/null | sort -hr | head -20&#8217;<\/strong> to check the biggest 20 directories.<br>If the <strong>\/var<\/strong> directory is the largest,check the <strong>\/var<\/strong> directory.Input <strong>&#8216;du -sh \/var\/* 2&gt;\/dev\/null | sort -hr | head -20&#8217;<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"606\" height=\"44\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-3.png\" alt=\"\" class=\"wp-image-425\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-3.png 606w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-3-300x22.png 300w\" sizes=\"auto, (max-width: 606px) 100vw, 606px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The largest directory of <strong>\/var<\/strong> is <strong>\/var\/lib<\/strong>,input <strong>&#8216;du -sh \/var\/lib\/* 2&gt;\/dev\/null | sort -hr | head -20&#8217;<\/strong> to go deep into it.After checking,the two largest directories are <strong>\/var\/lib\/docker<\/strong> and <strong>\/var\/lib\/mysql<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And then,clean spaces of docker and mysql.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>4.Space Cleaning of Docker.<\/em><\/strong><br>Input <strong>&#8216;docker system df&#8217;<\/strong> check data volumes managed by docker.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"774\" height=\"132\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-4.png\" alt=\"\" class=\"wp-image-427\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-4.png 774w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-4-300x51.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-4-768x131.png 768w\" sizes=\"auto, (max-width: 774px) 100vw, 774px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Check images and progress of docker.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"130\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-5-1024x130.png\" alt=\"\" class=\"wp-image-430\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-5-1024x130.png 1024w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-5-300x38.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-5-768x97.png 768w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-5.png 1027w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"326\" height=\"86\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-7.png\" alt=\"\" class=\"wp-image-432\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-7.png 326w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-7-300x79.png 300w\" sizes=\"auto, (max-width: 326px) 100vw, 326px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Delete docker images by <strong>&#8216;docker system prune -a -f&#8217;<\/strong>.Delete stopped containers by <strong>&#8216;docker container prune -f&#8217;<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Warning:unused or untagged images will be deleted.Stopped containers will be deleted too.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"391\" height=\"44\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-8.png\" alt=\"\" class=\"wp-image-433\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-8.png 391w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-8-300x34.png 300w\" sizes=\"auto, (max-width: 391px) 100vw, 391px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Check spaces of docker <strong>&#8216;du -sh \/var\/lib\/docker\/containers\/&#8217;<\/strong>.Check active local volumes by <strong>&#8216; docker ps -a &#8211;format &#8220;table {{.Names}}\\t{{.Mounts}}&#8221; | grep -v &#8220;NAMES&#8221; &#8216;<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Delete logs of docker by <strong>&#8216;sudo find \/var\/lib\/docker\/containers -name &#8220;*-json.log&#8221; -exec truncate -s 0 {} \\;&#8217;<\/strong>.Cleaning log files does not affect runnning containers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>5.Space Cleaning of Mysql.<\/em><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Input <strong>&#8216;du -sh \/var\/lib\/mysql&#8217;<\/strong> and <strong>&#8216;du -sh \/var\/lib\/mysql\/* 2&gt;\/dev\/null&#8217;<\/strong> to check spaces of <strong>\/var\/lib\/mysql<\/strong> directory.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"483\" height=\"280\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-9.png\" alt=\"\" class=\"wp-image-438\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-9.png 483w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-9-300x174.png 300w\" sizes=\"auto, (max-width: 483px) 100vw, 483px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">There are too many binlog files.Login mysql.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"330\" height=\"45\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-10.png\" alt=\"\" class=\"wp-image-439\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-10.png 330w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-10-300x41.png 300w\" sizes=\"auto, (max-width: 330px) 100vw, 330px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">There are too many binary logs in the database.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"363\" height=\"242\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-11.png\" alt=\"\" class=\"wp-image-440\" style=\"width:368px;height:auto\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-11.png 363w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-11-300x200.png 300w\" sizes=\"auto, (max-width: 363px) 100vw, 363px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Clean up binlogs from 3 days ago by <strong>&#8216;purge binary logs before date_sub(now(),interval 3 day);&#8217;<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Binary logs has been cleared up.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"373\" height=\"183\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-12.png\" alt=\"\" class=\"wp-image-441\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-12.png 373w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-12-300x147.png 300w\" sizes=\"auto, (max-width: 373px) 100vw, 373px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After cleaning,you can set automatic cleaning.Binary logs for 1 day will be automatically deleted.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"439\" height=\"52\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-13.png\" alt=\"\" class=\"wp-image-442\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-13.png 439w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-13-300x36.png 300w\" sizes=\"auto, (max-width: 439px) 100vw, 439px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can modify <strong>&#8216;\/etc\/my.cnf&#8217;<\/strong> to configure automatic cleaning.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"421\" height=\"155\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-14.png\" alt=\"\" class=\"wp-image-443\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-14.png 421w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-14-300x110.png 300w\" sizes=\"auto, (max-width: 421px) 100vw, 421px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>6.Space cleaning of Zabbix database.<\/em><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check databases in the mysql service.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"246\" height=\"271\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-16.png\" alt=\"\" class=\"wp-image-460\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Table &#8216;distory_text&#8217; occupied more than 22GB space of the table &#8216;zabbix&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"263\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-19-1024x263.png\" alt=\"\" class=\"wp-image-464\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-19-1024x263.png 1024w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-19-300x77.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-19-768x197.png 768w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-19.png 1507w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to clean all of space of &#8216;history_text&#8217;,input <strong>&#8216;truncate table history_text;&#8217;<\/strong> to clean it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"243\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-20-1024x243.png\" alt=\"\" class=\"wp-image-465\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-20-1024x243.png 1024w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-20-300x71.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-20-768x182.png 768w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-20-1536x364.png 1536w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-20.png 1879w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now the space is cleaned.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><strong>7.Strategy Adjustment of Zabbix<\/strong><\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"187\" height=\"768\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-21.png\" alt=\"\" class=\"wp-image-466\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-21.png 187w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-21-73x300.png 73w\" sizes=\"auto, (max-width: 187px) 100vw, 187px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"575\" height=\"966\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-22.png\" alt=\"\" class=\"wp-image-467\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-22.png 575w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2026\/09\/image-22-179x300.png 179w\" sizes=\"auto, (max-width: 575px) 100vw, 575px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Set &#8216;Data storgae period&#8217; in &#8216;History&#8217; option.Default 31 days.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before &#8216;Data storage period&#8217; setting,you should choose &#8216;Override item history period&#8217;. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.Check Spaces. Input &#8216;df -h&#8217; to check spaces of the cloud server.When the \/ partition is full(100% used).The service(like mysql,httpd,and so on) of cloud server wouldn&#8217;t be operated.The business\/website of the cloud server can&#8217;t be visited normally.Filesystem can&#8217;t read-in any data. In addition,&#8216;df -h&#8217; commmand can check system mounting and use ratio of disks. 2.Check [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-421","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts\/421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=421"}],"version-history":[{"count":12,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts\/421\/revisions"}],"predecessor-version":[{"id":469,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts\/421\/revisions\/469"}],"wp:attachment":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=421"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}