Unable to create/open lock file: /data/mongod.lock errno:13 Permission denied

前端 未结 28 1621
执念已碎
执念已碎 2020-11-29 14:39

How to I get mongo to use a mounted drive on ec2? I really do not understand. I attached a volume on ec2 formatted the drive as root and start as root and yet as root I ca

28条回答
  •  鱼传尺愫
    2020-11-29 15:04

    I had similar issue, the actual reason was that there was mongod session running already from my previous attempt.

    I ran

    killall mongod
    

    and everything else ran just as expected.

    killall command would send a TERM signal to all processes with a real UID. So this kills all the running instances of mongod so that you could start your own.

提交回复
热议问题