title: Unable to start mongod process on redhat
body: <p>I try to start mongod process from /etc/init.d folder with command <code>mongod</code>,but I get the following error : </p>
  
  <pre><code>2016-11-14T16:26:55.264+0530 I CONTROL  [initandlisten] MongoDB starting : pid=16092 port=27017 dbpath=/data/db 64-bit host=xyz
  2016-11-14T16:26:55.264+0530 I CONTROL  [initandlisten] db version v3.0.12
  2016-11-14T16:26:55.264+0530 I CONTROL  [initandlisten] git version: 33934938e0e95d534cebbaff656cde916b9c3573
  2016-11-14T16:26:55.264+0530 I CONTROL  [initandlisten] build info: Linux ip-10-93-197-138 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 BOOST_LIB_VERSION=1_49
  2016-11-14T16:26:55.264+0530 I CONTROL  [initandlisten] allocator: tcmalloc
  2016-11-14T16:26:55.264+0530 I CONTROL  [initandlisten] options: {}
  2016-11-14T16:26:55.289+0530 I STORAGE  [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
  2016-11-14T16:26:55.289+0530 I CONTROL  [initandlisten] dbexit:  rc: 100
  </code></pre>
  
  <p>The above error says that it is unable to find dbpath, but mongod script file should pick configuration from /etc/mongod.conf file where I have mentioned the dbpath, Here I am putting some contents from mongod script file by which we come to know that  it is suppose to pick the configuration from /etc/mongod.conf file :</p>
  
  <pre><code>#!/bin/bash
  # mongod - Startup script for mongod
  # chkconfig: 35 85 15
  # description: Mongo is a scalable, document-oriented database.
  # processname: mongod
  # config: /etc/mongod.conf
  # pidfile: /var/run/mongodb/mongod.pid
   . /etc/rc.d/init.d/functions
  # things from mongod.conf get there by mongod reading it
  # NOTE: if you change any OPTIONS here, you get what you pay for:
  # this script assumes all options are in the config file.
  CONFIGFILE="/etc/mongod.conf"
  OPTIONS=" -f $CONFIGFILE"
  SYSCONFIG="/etc/sysconfig/mongod"
  </code></pre>
  
  <p>And Here are some contetns from mongod.conf file : </p>
  
  <pre><code># mongod.conf
  # for documentation of all options, see:
  #   http://docs.mongodb.org/manual/reference/configuration-options/
  # where to write logging data.
  systemLog:
    destination: file
    logAppend: true
    path: /var/log/mongodb/mongod.log
  # Where and how to store data.
  storage:
    dbPath: /var/lib/mongo
    journal:
      enabled: false
  #  engine:
      mmapv1:
       smallFiles: true
  #  wiredTiger:
  </code></pre>
  
  <p>I am able to start mongod process by specifying --dbpath option in command itself as follows : </p>
  
  <pre><code> mongod --dbpath /var/lib/mongo
  </code></pre>
  
  <p>But I want know the reason, why it is not picking the dbpath from /etc/mongod.conf file.</p>
  
  <p>Thanks in advance.</p>