通过docker和nfs存储使用mongo

我有一个glusterfs工作正常,当我在Cent7创build一个卷使用: docker volume create...并提供types为NFS,这里是我用来创build卷的完整命令:

docker volume create –name sv1_mongovol1 –opt type = nfs –opt device =:/ root / gluster / mounts –opt o = addr = 172.23.180.79

如果我使用“阿尔卑斯”容器或类似的装载它,我接触/创build的文件,写入删除存储,但是当我启动一个mongo容器时,它会失败。 这是我如何启动:

docker run –privileged –rm -it -p 27017:27017 -v sv1_mongovol1:/ data / db –name mongodb mongo

这里是错误日志

 017-02-26T02:31:00.391+0000 I STORAGE [initandlisten] exception in initAndListen: 98 Unable to lock file: /data/db/mongod.lock No locks available. Is a mongod instance already running?, terminating 2017-02-26T02:31:00.391+0000 I NETWORK [initandlisten] shutdown: going to close listening sockets... 2017-02-26T02:31:00.391+0000 I NETWORK [initandlisten] shutdown: going to flush diaglog... 2017-02-26T02:31:00.391+0000 I CONTROL [initandlisten] now exiting 2017-02-26T02:31:00.391+0000 I CONTROL [initandlisten] shutting down with code:100 

我也发布在这里: https : //github.com/docker-library/mongo/issues/30