title: Why getting error mongod dead but subsys locked and Insufficient free space for journal files on Linux?
body: <p>I have installed <strong>mongo-10gen mongo-10gen-server</strong> on Linux CentOS server.</p>
  
  <p>I followed the steps from <a href="http://docs.mongodb.org/manual/tutorial/install-mongodb-on-redhat-centos-or-fedora-linux/"><strong>Link</strong></a>.</p>
  
  <p>I have configured <strong>/etc/mongod.conf</strong> as - </p>
  
  <pre><code>logpath=/var/log/mongo/mongod.log
  port=27017
  dbpath=/var/lib/mongo
  </code></pre>
  
  <p>I have set port 27017 for mongo in <strong>iptables</strong>.
  To start mongo I used commands - </p>
  
  <pre><code>service mongod start and
  mongo
  </code></pre>
  
  <p>It get started well, but after few days I am getting the error - </p>
  
  <pre><code>Tue Jan 29 08:41:54 [initandlisten] ERROR: Insufficient free space for journal files
  Tue Jan 29 08:41:54 [initandlisten] Please make at least 3379MB available in /var/lib/mongo/journal or use --smallfiles
  Tue Jan 29 08:41:54 [initandlisten]
  Tue Jan 29 08:41:54 [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
  Tue Jan 29 08:41:54 dbexit:
  Tue Jan 29 08:41:54 [initandlisten] shutdown: going to close listening sockets...
  Tue Jan 29 08:41:54 [initandlisten] shutdown: going to flush diaglog...
  Tue Jan 29 08:41:54 [initandlisten] shutdown: going to close sockets...
  Tue Jan 29 08:41:54 [initandlisten] shutdown: waiting for fs preallocator...
  Tue Jan 29 08:41:54 [initandlisten] shutdown: lock for final commit...
  Tue Jan 29 08:41:54 [initandlisten] shutdown: final commit...
  Tue Jan 29 08:41:54 [initandlisten] shutdown: closing all files...
  Tue Jan 29 08:41:54 [initandlisten] closeAllFiles() finished
  Tue Jan 29 08:41:54 [initandlisten] journalCleanup...
  Tue Jan 29 08:41:54 [initandlisten] removeJournalFiles
  Tue Jan 29 08:41:54 [initandlisten] shutdown: removing fs lock...
  Tue Jan 29 08:41:54 dbexit: really exiting now
  </code></pre>
  
  <p>When I execute the command - </p>
  
  <pre><code>service mongod status
  </code></pre>
  
  <p>It gives Error - </p>
  
  <pre><code>mongod dead but subsys locked
  </code></pre>
  
  <p>Please help me to solve the problem of <strong><em>mongod dead but subsys locked</em></strong> and <strong><em>Insufficient free space for journals, terminating</em></strong></p>