title: MongoDB, change db path, not working
body: <p>I upgraded from debian 6 to debian 8. After that I upgraded MongoDB from ~2.5 to 3.2.9. They seemed to have changed the db path since I could not see any of my databases. I upgraded the dbpath. Stil I can't see any of my databases.</p>
  
  <pre><code>seprst@SESTOWS011:/data/db$ ls
  graddays  graddays.0  graddays.ns  journal  local  local.0  local.ns  mongod.lock  mypdb  mypdb.0  mypdb.ns
  seprst@SESTOWS011:/data/db$ sudo service mongod stop
  seprst@SESTOWS011:/data/db$ mongod --dbpath /data/db
  2016-08-17T12:02:26.468+0200 I CONTROL  [initandlisten] MongoDB starting : pid=22283 port=27017 dbpath=/data/db 64-bit host=SESTOWS011
  2016-08-17T12:02:26.468+0200 I CONTROL  [initandlisten] db version v3.2.9
  2016-08-17T12:02:26.468+0200 I CONTROL  [initandlisten] git version: 22ec9e93b40c85fc7cae7d56e7d6a02fd811088c
  2016-08-17T12:02:26.468+0200 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1t  3 May 2016
  2016-08-17T12:02:26.469+0200 I CONTROL  [initandlisten] allocator: tcmalloc
  2016-08-17T12:02:26.469+0200 I CONTROL  [initandlisten] modules: none
  2016-08-17T12:02:26.469+0200 I CONTROL  [initandlisten] build environment:
  2016-08-17T12:02:26.469+0200 I CONTROL  [initandlisten]     distmod: debian71
  2016-08-17T12:02:26.469+0200 I CONTROL  [initandlisten]     distarch: x86_64
  2016-08-17T12:02:26.469+0200 I CONTROL  [initandlisten]     target_arch: x86_64
  2016-08-17T12:02:26.469+0200 I CONTROL  [initandlisten] options: { storage: { dbPath: "/data/db" } }
  2016-08-17T12:02:26.513+0200 I -        [initandlisten] Detected data files in /data/db created by the 'mmapv1' storage engine, so setting the ac                                               tive storage engine to 'mmapv1'.
  2016-08-17T12:02:26.530+0200 I JOURNAL  [initandlisten] journal dir=/data/db/journal
  2016-08-17T12:02:26.545+0200 I JOURNAL  [initandlisten] recover : no journal files present, no recovery needed
  2016-08-17T12:02:26.590+0200 I JOURNAL  [initandlisten] warning couldn't write to / rename file /data/db/journal/prealloc.0: couldn't open file /                                               data/db/journal/prealloc.0 for writing errno:9 Bad file descriptor
  2016-08-17T12:02:26.590+0200 I STORAGE  [initandlisten] exception in initAndListen: 13516 couldn't open file /data/db/journal/j._0 for writing er                                               rno:9 Bad file descriptor, terminating
  2016-08-17T12:02:26.590+0200 I CONTROL  [initandlisten] now exiting
  2016-08-17T12:02:26.590+0200 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
  2016-08-17T12:02:26.590+0200 I NETWORK  [initandlisten] removing socket file: /tmp/mongodb-27017.sock
  2016-08-17T12:02:26.590+0200 I NETWORK  [initandlisten] shutdown: going to flush diaglog...
  2016-08-17T12:02:26.590+0200 I NETWORK  [initandlisten] shutdown: going to close sockets...
  2016-08-17T12:02:26.591+0200 I STORAGE  [initandlisten] shutdown: waiting for fs preallocator...
  2016-08-17T12:02:26.591+0200 I STORAGE  [initandlisten] shutdown: final commit...
  2016-08-17T12:02:26.591+0200 I STORAGE  [initandlisten] shutdown: closing all files...
  2016-08-17T12:02:26.591+0200 I STORAGE  [initandlisten] closeAllFiles() finished
  2016-08-17T12:02:26.591+0200 I CONTROL  [initandlisten] dbexit:  rc: 100
  seprst@SESTOWS011:/data/db$ sudo service mongod start
  seprst@SESTOWS011:/data/db$ mongo
  MongoDB shell version: 3.2.9
  connecting to: test
  Server has startup warnings:
  2016-08-17T12:02:40.540+0200 I CONTROL  [initandlisten]
  2016-08-17T12:02:40.540+0200 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
  2016-08-17T12:02:40.540+0200 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
  2016-08-17T12:02:40.540+0200 I CONTROL  [initandlisten]
  &gt; show dbs
  local  0.000GB
  &gt;
  </code></pre>
  
  <p>Any suggestions?</p>