{"id":685,"date":"2015-10-23T18:06:51","date_gmt":"2015-10-23T22:06:51","guid":{"rendered":"https:\/\/www.devolve.net\/blog\/?p=685"},"modified":"2015-10-23T23:08:22","modified_gmt":"2015-10-24T03:08:22","slug":"sometimes-you-dont-have-any-inodes-left","status":"publish","type":"post","link":"https:\/\/www.devolve.local\/sometimes-you-dont-have-any-inodes-left\/","title":{"rendered":"Sometimes, you don’t have any inodes left"},"content":{"rendered":"

You notice something is wrong with your system. I’ll just put this error message here for the sake of the Googles:<\/p>\n

postdrop: warning: mail_queue_enter: create file maildrop\/150730.14057: No space left on device<\/pre>\n

That stinks.
\n<\/p>\n

df -h<\/code> may show that you have free space on the filesystem in question, but do you have free inodes? Use df -i<\/code> to answer that question. The next question is, “Where did all my inodes go?” Thankfully, the good people in the stackexchange community are on the case<\/a>. Here’s a slight modification of the answer for readability:<\/p>\n

sudo find \/ -xdev -printf '%h\\n' | sort | uniq -c | sort -k 1 -nr | head<\/pre>\n

In my case, I had crazy numbers of small files in the postfix “defer” queue, and in the \/var\/lib\/php5 directory where a certain PHP app was creating a session file for every client who connects. In addition to the inodes, cleaning up all that stuff gave me back about a GB of space on my filesystem, probably due to the default 4K blocks used by several hundred thousand tiny files.<\/p>\n

I don’t actually know what the postfix defer queue is for, specifically how it differs from the deferred queue. At this point in time, I don’t really care. <\/p>\n

sudo postsuper -d ALL defer<\/pre>\n

That got rid of the mail junk.<\/p>\n

I had earlier reduced the number of times that the \/etc\/cron.d\/php5<\/code> script runs, because it’s pretty I\/O intensive. But since I have this one app running that actually creates those pesky session files, I increased its run frequency. By default it runs 09,39 * * * *<\/code> (every hour on the nines and thirty-nines), which should be plenty for most folks.<\/p>\n","protected":false},"excerpt":{"rendered":"

You notice something is wrong with your system. I’ll just put this error message here for the sake of the Googles: postdrop: warning: mail_queue_enter: create file maildrop\/150730.14057: No space left on device That stinks.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[34,26],"_links":{"self":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/685"}],"collection":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/comments?post=685"}],"version-history":[{"count":7,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/685\/revisions"}],"predecessor-version":[{"id":692,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/685\/revisions\/692"}],"wp:attachment":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/media?parent=685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/categories?post=685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/tags?post=685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}