-
Notifications
You must be signed in to change notification settings - Fork 35
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
Issues with mongo with mounted volume for data #28
Comments
I should to clarify some important details about Docker volumes and shared folders:
So, if you set the volume path which is a child of |
Let's abstract away from the Compose use case, there is an easier way to reproduce the subject issue. And yes, seems like Parallels Shared Folders could not be used for Mongo DB storage at this moment: # We assume that Parallels Desktop VM is created and env is configured:
# eval "$(docker-machine env your-vm-name)"
$ docker run -v ~/test-docker-volume/data/db:/data/db -p 27017:27017 mongo --smallfiles
2015-12-13T08:50:55.589+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=6d735a8a9892
2015-12-13T08:50:55.590+0000 I CONTROL [initandlisten] db version v3.2.0
2015-12-13T08:50:55.590+0000 I CONTROL [initandlisten] git version: 45d947729a0315accb6d4f15a6b06be6d9c19fe7
2015-12-13T08:50:55.591+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013
2015-12-13T08:50:55.591+0000 I CONTROL [initandlisten] allocator: tcmalloc
2015-12-13T08:50:55.591+0000 I CONTROL [initandlisten] modules: none
2015-12-13T08:50:55.591+0000 I CONTROL [initandlisten] build environment:
2015-12-13T08:50:55.592+0000 I CONTROL [initandlisten] distmod: debian71
2015-12-13T08:50:55.592+0000 I CONTROL [initandlisten] distarch: x86_64
2015-12-13T08:50:55.592+0000 I CONTROL [initandlisten] target_arch: x86_64
2015-12-13T08:50:55.592+0000 I CONTROL [initandlisten] options: { storage: { mmapv1: { smallFiles: true } } }
2015-12-13T08:50:55.598+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2015-12-13T08:50:55.608+0000 E STORAGE [initandlisten] WiredTiger (1) [1449996655:608691][1:0x7f33ade64c80], connection: /data/db/WiredTiger.wt: Operation not permitted
2015-12-13T08:50:55.610+0000 I - [initandlisten] Assertion: 28595:1: Operation not permitted
2015-12-13T08:50:55.622+0000 I STORAGE [initandlisten] exception in initAndListen: 28595 1: Operation not permitted, terminating
2015-12-13T08:50:55.623+0000 I CONTROL [initandlisten] dbexit: rc: 100 Seems like our It works fine on the same VM, outside of Parallels Shared Folders:
|
@legal90, I do think this is the same problem. prl_fs supports mmap-ed files, but with significant restrictions. For example, opening mmap-ed files for read-write is prohibited. Seems we should consider this to be improved from our side. |
It needs to be checked against Parallels Desktop 14. |
The issue still persist on Parallels Desktop 15.1.3.
Although, it's pretty rear use case. I'm not sure how often people want to mount the db dir to the container from their Mac host 🤔 |
Investigating this. The thing is that WiredTiger starts successfully over SharedFolders on Ubuntu distro, but does fail in boot2docker. |
My +1 for this issue. Any updates on that? |
I've failed to debug the problem the previous year and postponed an attempt. If there's an interest in the problem I may try again. Any additional info and steps to reproduce are welcome. |
Hello @romankulikov, Thanks for the update! I've made a really trivial thing: launched Things I've noted:
I could gather more information including BTW. RO-volume is working perfectly so it looks like it's only about writes. Please let let me know if you need any further details. |
I've created container with MongoDB.
Dockerfile:
docker-compose.yml
I have two problems with it:
1. If I put in docker-compose.yml OS X folder
- ./db:/data/db
Container do not start with error:
Assertion: 13651:Couldn't fsync directory '/data/db': errno:22 Invalid argument
What I found on this topic is http://stackoverflow.com/questions/29570989/docker-mongodb-share-volume-with-mac-os-x:
2. If I put in docker-compose.yml folder from my docker-machine VM
- /data/db:/data/db
Container starts but do not finishes. In result I have to reboot docker-machine VM because nothing can kill mongod process.
The text was updated successfully, but these errors were encountered: