G
G
goju2017-05-08 02:14:30
linux
goju, 2017-05-08 02:14:30

Why did the /data/db folder for Mongo disappear?

The last time I installed Mongu in an unusual way for myself. Namely, the command sudo apt-get install -y mongodb-organd the creation of a file for systemctl /etc/systemd/system/mongodb.service
Everything worked fine.
But today it won't start. Here is what it says on systemctl status mongodb

sudo systemctl status mongodb
● mongodb.service - High-performance, schema-free document-oriented database
   Loaded: loaded (/etc/systemd/system/mongodb.service; disabled; vendor preset:
   Active: failed (Result: exit-code) since Sun 2017-05-07 19:09:23 EDT; 4min 45
  Process: 2420 ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf (cod
 Main PID: 2420 (code=exited, status=14)

May 07 19:09:23 qman-laptop systemd[1]: Started High-performance, schema-free do
May 07 19:09:23 qman-laptop systemd[1]: mongodb.service: Main process exited, co
May 07 19:09:23 qman-laptop systemd[1]: mongodb.service: Unit entered failed sta
May 07 19:09:23 qman-laptop systemd[1]: mongodb.service: Failed with result 'exi
lines 1-10/10 (END)

And here is the output of the commandmongod
2017-05-07T19:15:08.875-0400 I CONTROL  [initandlisten] MongoDB starting : pid=3603 port=27017 dbpath=/data/db 64-bit host=qman-laptop
2017-05-07T19:15:08.875-0400 I CONTROL  [initandlisten] db version v3.2.13
2017-05-07T19:15:08.876-0400 I CONTROL  [initandlisten] git version: 23899209cad60aaafe114f6aea6cb83025ff51bc
2017-05-07T19:15:08.876-0400 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
2017-05-07T19:15:08.876-0400 I CONTROL  [initandlisten] allocator: tcmalloc
2017-05-07T19:15:08.876-0400 I CONTROL  [initandlisten] modules: none
2017-05-07T19:15:08.876-0400 I CONTROL  [initandlisten] build environment:
2017-05-07T19:15:08.876-0400 I CONTROL  [initandlisten]     distmod: ubuntu1604
2017-05-07T19:15:08.876-0400 I CONTROL  [initandlisten]     distarch: x86_64
2017-05-07T19:15:08.876-0400 I CONTROL  [initandlisten]     target_arch: x86_64
2017-05-07T19:15:08.876-0400 I CONTROL  [initandlisten] options: {}
2017-05-07T19:15:08.914-0400 I STORAGE  [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
2017-05-07T19:15:08.914-0400 I CONTROL  [initandlisten] dbexit:  rc: 100

What means
2017-05-07T19:15:08.914-0400 I STORAGE  [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating

Rather, what it means is clear, but yesterday everything worked. Where this directory could go is not clear.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chupasaurus, 2017-05-08
@chupasaurus

Psychics are on vacation, but I will assume that the package contains a directory with data /var/lib/mongodb/and it was with such a dbpath that the DBMS was launched, and after creating your service and launching it with its parameters, /data/db/there was no data in it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question