Последний раз устанавливал Монгу необычным для себя способом. А именно командой
sudo apt-get install -y mongodb-org
и созданием файла для systemctl /etc/systemd/system/mongodb.service
Все работало нормально.
Но сегодня не запускается. Вот что пишет на 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)
А вот вывод команды
mongod
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
Что значит
2017-05-07T19:15:08.914-0400 I STORAGE [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
Вернее, что значит понятно, но ведь вчера все работало. Куда эта директория могла подеватся непонятно.