{"id":861,"date":"2024-06-19T17:38:36","date_gmt":"2024-06-19T17:38:36","guid":{"rendered":"https:\/\/vickistan.com\/?p=861"},"modified":"2026-02-25T21:04:29","modified_gmt":"2026-02-25T21:04:29","slug":"no-space-left-on-device","status":"publish","type":"post","link":"https:\/\/vickistan.com\/?p=861","title":{"rendered":"No space left on device"},"content":{"rendered":"\n<ol class=\"wp-block-list\">\n<li>Log into system:<code> ssh &lt;system&gt;<\/code><br \/><\/li>\n\n\n\n<li>Check for full filesystem: <code>df -h<\/code><br \/><\/li>\n\n\n\n<li>Determine the largest directories on the filesystem: <br \/><code>sudo du -ah \/ --exclude=\"\/proc\" | sort -h -r | head -n 5 2>\/dev\/null<\/code><br \/><\/li>\n\n\n\n<li>Determine the 5 largest files on the filesystem:<br \/><code>sudo find \/ -type f -exec ls -la {} + 2>\/dev\/null | sort -k5 -rn | head -5<\/code><br \/><\/li>\n\n\n\n<li>Determine the 5 largest files on the filesystem:<br \/><code>sudo find . -type f -printf '%s\\t%p\\n' 2>\/dev\/null | grep -v \"proc\" | sort -rn | head -5 | awk '{printf \"%.1fK\\t%s\\n\", $1\/1024, $2}'<\/code><br \/><\/li>\n\n\n\n<li>Check the output for something that can be deleted.<br \/><\/li>\n\n\n\n<li>If the <code>du<\/code> command doesn&#8217;t show anything, consider whether something that was running might have created a temporary file that exceeded the remaining space on the filesystem.<br \/><\/li>\n\n\n\n<li>If you find temporary files created at run-time that exceed the remaining drive space, you have 3 choices:<br \/>A. add more drive space<br \/>B. spread out the run times of jobs so that concurrent jobs don&#8217;t exceed the remaining drive space<br \/>C. consider adding compression to the temporary files before writing them to the filesystem<br \/><\/li>\n\n\n\n<li>Check the inode usage with this: <code>df -i<\/code><br \/><\/li>\n\n\n\n<li>If you find the issue is inode usage, you have 2 choices:<br \/>A. delete file s of directories that use a large number of inodes: <br \/>1. identify which files and directories are using the most inodes by running this: <code><br \/>for i in \/*; do echo $i; find $i | wc -l; done<\/code><br \/>2. examine the output for toplevel directories that are using a lot of inodes<br \/>3. re-run the command in step 1. replacing <code>\/*<\/code> with the toplevel directory to check<br \/>4. Once you determine where the issue is: delete expendable files or directories<br \/>B. increase the number of available inodes:<br \/>1. unmount the full filesystem: <code>umount &lt;filesystem mountpoint&gt;<\/code><br \/>2. update the number of inodes: <code>mkfs.ext3 \/dev\/&lt;device&gt; -N &lt;desired num of inodes&gt;<\/code><br \/>3. re-mount the filesystem: <code>mount -a<\/code><br \/> <\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-861","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/861","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=861"}],"version-history":[{"count":18,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/861\/revisions"}],"predecessor-version":[{"id":992,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/861\/revisions\/992"}],"wp:attachment":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=861"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=861"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}