我mongod在我的mac终端上输入并收到以下错误:
2015-04-27T22:11:46.471-0400 W - [initandlisten] Detected unclean shutdown - /data/db/mongod.lock is not empty.
2015-04-27T22:11:46.479-0400 I STORAGE [initandlisten] **************
old lock file: /data/db/mongod.lock. probably means unclean shutdown,
but there are no journal files to recover.
this is likely human error or filesystem corruption.
please make sure that your journal directory is mounted.
found 4 dbs.
see: http://dochub.mongodb.org/core/repair for more information
Run Code Online (Sandbox Code Playgroud)
如何确保我的日志目录已挂载?那能解决问题吗?
sty*_*ane 19
你有一个不洁的关机.你应该选择启动mongod --repair.
mongod --repair
Run Code Online (Sandbox Code Playgroud)
请注意,修复后您需要重新启动mongod
1.删除mongo.lock
2. mongod --dbpath 路径 --repair
3. mongod --dbpath 路径
使用管理员权限运行命令。我曾在 Windows 机器上使用过。