1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MongoDBでmongod.lockが何度も生成されて困った上に/data/dbってどこよだった話

1
Last updated at Posted at 2018-01-05

mongod.lockがあって、それを消してもrestartするとmongod.lockがまたできてるって方に

mongod.lockですが、mongoのサービスを一回止めないとmongod.confとかをいじってる間にmongod.lockが何度も生成されます。(おそらく)
mongod.lockはエラーが起こると生成されるっぽい?
とりあえず自分はmongoのサービスを止めたらうまく行きました。
以下のURLがおすすめです。

あとなんかThe name org.freedesktop.PolicyKit1 was not provided by any .service files
が出た人には以下も。
http://m77.hatenablog.com/entry/2015/03/05/111930

あとmongod.confの権限をread and writeできるようにいじっておいた方がいいかと思われます。

それと上のsolaimuruganのページには任意のディレクトリにmongoのパスを繋げる、みたいなことが書いてあって、前使っていたデータを繋げられるように見えるのですが、自分の場合pathを/data/db以外にするとダメでした。
mongod.confの内容を
パスを/var/lib/mongodb/としてから、
mongoとやって起動してもmongoがfail to...という風に出ます。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?