-
Notifications
You must be signed in to change notification settings - Fork 649
can not use external volume #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have a similar problem with volumes running this on OS X via Kitematic: 2015-03-20T01:33:28.224+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=d392a5642411 |
Reproduces as well with docker 1.6.0 on OS X 10.10.3 (14D131) and Kitematic:
Launched without volume
Launched with volume (mapped /data/db to directory inside /Users/)
|
For those using Kitematic, the issue is identical to boot2docker/boot2docker#581. I would assume that there is a similar issue when sharing host directories into a vagrant VM. |
@yosifkit you are totally right. It's a file ownership/permission issue (not related to this docker image), either using boot2docker with VB or a vagrant box with VB. Nevertheless, I managed to hack the ownership, remounting the /Users shared volume inside boot2docker to uid 999 and gid 999 (which are what mongo docker image uses) and got it to start:
only to find that mongod crashes due to filesystem type not being supported (mmap not working on vboxsf). I will just store the data inside the boot2docker vm image for development. Thanks very much for your help. PS: I log the start crash on vboxsf just in case somebody finds it useful
|
Man I wish I had checked here first. I had these issues trying to use a data container with --volumes-from datacontainer. Only I had never done that before, or much of anything so I figured I was just doing it wrong. Well, now i know a lot more than I did. |
I have the same error trying to add a volume to the mongo container (I'm on OSX): 2015-05-22T10:13:34.375+0000 I STORAGE [initandlisten] exception in initAndListen: 98 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating Can you please provide a solution for this? |
So after 2 days, I'm almost giving up here hehe I'm on OSx with boot2docker and I tried all the workarounds I could find, namely:
In my container I see the folder being mounted all fine, I can touch files and see it syncs up great. The mongod.lock is created... seems like it should work! But: I'm stuck at: Which, unlike the message states, means that mongo will not fsync over vboxfs no matter how hard you try! I'm left with very few solutions here and I'd be happy to hear some more:
So much pain and time wasted with those things... |
Discussion: boot2docker/boot2docker#581
I'm hitting
And is probably because of vboxsf bug https://www.virtualbox.org/ticket/819 Conclusion: |
While changing the user id will not work for mongo because of the memory mapped files, we are looking into making each of the official image databases able to run as a different user id. I think the current idea is something like |
Greetings, hi is there a workaround for this already? I'm having this issue, I just upgraded to 1.8 using boot2docker
|
after |
@Hokutosei, yeah the mounting to OSX will not work for MongoDB because of the way that virtualbox shared folders work. |
@yosifkit should I give an issue to mongodb about this? and yeah, after upgrade on other machines, think we have to change about our workflow developing osx+docker1.8+mongodb |
@Hokutosei, It's not really a MongoDB problem; it is just that they require certain support from the file system in order to work properly and vboxsf does not give the required features.
|
@yosifkit Last night I was thinking it might be interesting to have some tooling to support easily adding data disks to |
Is there a solution to this yet? I am having issues with boot2docker on OSX and volumes. The error output from @cmoro-deusto is pretty much exactly what I am getting... |
No solution using the VirtualBox Shared Folders since they are not supported by mongodb. |
I have a glusterfs that works fine when i create a volume on Cent7 using docker volume create... and providing the type as nfs And here is the error log |
In Windows, one solution is to use a network folder, and map the data directory to the network drive folder. By default the system drives are network drives for the user. |
@ksachdev1: NFSv3 and NFSv4/v4.1 use different locking methods. I have seen the exact error message you mention |
Several people reported this problem on Docker mongo repo.
I experience the same issue. I am running in
vagrant
latest withdocker v1.5.0
, my system isLinux ubuntu-14 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
.I downloaded the latest mongo build v3.0.0 via
docker pull mongo
. Then I rundocker run -it -v ~/shared/mongodb/data:/data/db mongo:latest
, I got an error belowIf I do not run with volume, it works fine.
I have talked to the MongoDB support tech support. They said the issue is
You do not have the permission to write to volume "/data/db" inside container.
It is definitely a permission issue. How could I solve smartly??The text was updated successfully, but these errors were encountered: