{"id":5851,"date":"2015-03-23T10:23:42","date_gmt":"2015-03-23T02:23:42","guid":{"rendered":"https:\/\/kyle.ai\/blog\/?p=5851"},"modified":"2015-03-23T10:23:42","modified_gmt":"2015-03-23T02:23:42","slug":"mongodb%e5%8f%91%e7%94%9fcant-take-a-write-lock-while-out-of-disk-space%e9%94%99%e8%af%af%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/5851.html","title":{"rendered":"MongoDB\u53d1\u751fCan&#8217;t take a write lock while out of disk space\u9519\u8bef\u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"<p>\u5148\u505c\u6b62mongodb\u670d\u52a1<br \/>\nservice mongodb stop<br \/>\n\u5c31\u53bb\/etc\/\/mongodb.conf<br \/>\n\u4fee\u6539<br \/>\nnojournal = true<br \/>\nsmallfiles = true<br \/>\nnoprealloc = true <\/p>\n<p>\u5c06lock\u6587\u4ef6\u5220\u9664<br \/>\nrm \/var\/lib\/mongodb\/mongod.lock<\/p>\n<p>\u6700\u597d\u4e5f\u628ajournal\u65e5\u5fd7\u5220\u9664\uff0c\u90a3\u73a9\u610f\u4e5f\u5f88\u5360\u786c\u76d8<br \/>\nrm -rf \/var\/lib\/mongodb\/journal\/*<\/p>\n<p>\u91cd\u542fmongodb\u670d\u52a1<br \/>\nservice mongodb start<\/p>\n<p>mongodb \u5220\u9664\u6570\u636e\u5e93<br \/>\nuse test;    \/\/\u8981\u5220\u9664\u7684\u5e93\uff0c\u5148\u8981\u8fdb\u5165<br \/>\ndb.dropDatabase();       \/\/\u5220\u9664\u5e93\u547d\u4ee4<\/p>\n<p>mongodb\u5220\u9664\u8868<br \/>\ndb.mytable.drop();<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5148\u505c\u6b62mongodb\u670d\u52a1 service mongodb stop \u5c31\u53bb\/etc\/\/mongodb.conf  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-5851","post","type-post","status-publish","format-standard","hentry","category-skill"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/5851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=5851"}],"version-history":[{"count":1,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/5851\/revisions"}],"predecessor-version":[{"id":5852,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/5851\/revisions\/5852"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=5851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=5851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=5851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}