Expected behavior
When I run docker run --name mongo-multimedia -p "27017:27017" -d mongo:latest
, everything is good and mongo is up and running.
I need to run docker run --name mongo-multimedia -v $PWD/multimedia-mongo-data:/data/db -p "27017:27017" -d mongo:latest
to store mongo data in a host volume
Actual behavior
Mounting a host volume causes container crash
2016-05-26T09:19:16.397+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=f76dc9bee4d9
2016-05-26T09:19:16.398+0000 I CONTROL [initandlisten] db version v3.2.5
2016-05-26T09:19:16.398+0000 I CONTROL [initandlisten] git version: 34e65e5383f7ea1726332cb175b73077ec4a1b02
2016-05-26T09:19:16.398+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013
2016-05-26T09:19:16.398+0000 I CONTROL [initandlisten] allocator: tcmalloc
2016-05-26T09:19:16.398+0000 I CONTROL [initandlisten] modules: none
2016-05-26T09:19:16.398+0000 I CONTROL [initandlisten] build environment:
2016-05-26T09:19:16.398+0000 I CONTROL [initandlisten] distmod: debian71
2016-05-26T09:19:16.398+0000 I CONTROL [initandlisten] distarch: x86_64
2016-05-26T09:19:16.398+0000 I CONTROL [initandlisten] target_arch: x86_64
2016-05-26T09:19:16.399+0000 I CONTROL [initandlisten] options: {}
2016-05-26T09:19:16.404+0000 I - [initandlisten] Detected data files in /data/db created by the 'mmapv1' storage engine, so setting the active storage engine to 'mmapv1'.
2016-05-26T09:19:16.420+0000 I JOURNAL [initandlisten] journal dir=/data/db/journal
2016-05-26T09:19:16.421+0000 I JOURNAL [initandlisten] recover : no journal files present, no recovery needed
2016-05-26T09:19:16.421+0000 I STORAGE [initandlisten] In File::freeSpace(), statvfs for '/data/db/journal' failed with errno:38 Function not implemented
2016-05-26T09:19:16.459+0000 I JOURNAL [durability] Durability thread started
2016-05-26T09:19:16.460+0000 I CONTROL [initandlisten]
2016-05-26T09:19:16.460+0000 I CONTROL [initandlisten] ** WARNING: Insecure configuration, access control is not enabled and no --bind_ip has been specified.
2016-05-26T09:19:16.460+0000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted,
2016-05-26T09:19:16.460+0000 I CONTROL [initandlisten] ** and the server listens on all available network interfaces.
2016-05-26T09:19:16.460+0000 I CONTROL [initandlisten]
2016-05-26T09:19:16.460+0000 I CONTROL [initandlisten]
2016-05-26T09:19:16.460+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-05-26T09:19:16.460+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-05-26T09:19:16.460+0000 I CONTROL [initandlisten]
2016-05-26T09:19:16.460+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-05-26T09:19:16.460+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-05-26T09:19:16.461+0000 I CONTROL [initandlisten]
2016-05-26T09:19:16.461+0000 I JOURNAL [journal writer] Journal writer thread started
2016-05-26T09:19:16.470+0000 I STORAGE [FileAllocator] allocating new datafile /data/db/local.0, filling with zeroes...
2016-05-26T09:19:16.471+0000 I STORAGE [FileAllocator] creating directory /data/db/_tmp
2016-05-26T09:19:16.487+0000 I STORAGE [FileAllocator] error: failed to allocate new file: /data/db/local.0 size: 67108864 fstatfs failed: errno:38 Function not implemented. will try again in 10 seconds
2016-05-26T09:19:16.488+0000 I - [initandlisten] Assertion: 12520:new file allocation failure
2016-05-26T09:19:16.490+0000 W STORAGE [initandlisten] database /data/db local could not be opened due to DBException 12520: new file allocation failure
2016-05-26T09:19:16.492+0000 I STORAGE [initandlisten] exception in initAndListen: 12520 new file allocation failure, terminating
2016-05-26T09:19:16.492+0000 I CONTROL [initandlisten] now exiting
2016-05-26T09:19:16.492+0000 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2016-05-26T09:19:16.492+0000 I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2016-05-26T09:19:16.492+0000 I NETWORK [initandlisten] shutdown: going to flush diaglog...
2016-05-26T09:19:16.492+0000 I NETWORK [initandlisten] shutdown: going to close sockets...
2016-05-26T09:19:16.492+0000 I STORAGE [initandlisten] shutdown: waiting for fs preallocator...
2016-05-26T09:19:16.492+0000 I STORAGE [initandlisten] shutdown: final commit...
2016-05-26T09:19:16.493+0000 I JOURNAL [initandlisten] journalCleanup...
2016-05-26T09:19:16.493+0000 I JOURNAL [initandlisten] removeJournalFiles
2016-05-26T09:19:16.497+0000 I JOURNAL [initandlisten] Terminating durability thread ...
2016-05-26T09:19:16.600+0000 I JOURNAL [journal writer] Journal writer thread stopped
2016-05-26T09:19:16.601+0000 I JOURNAL [durability] Durability thread stopped
2016-05-26T09:19:16.601+0000 I STORAGE [initandlisten] shutdown: closing all files...
2016-05-26T09:19:16.601+0000 I STORAGE [initandlisten] closeAllFiles() finished
2016-05-26T09:19:16.601+0000 I STORAGE [initandlisten] shutdown: removing fs lock...
2016-05-26T09:19:16.603+0000 I CONTROL [initandlisten] dbexit: rc: 100
Information
$ pinata diagnose -u
OS X: version 10.11.5 (build: 15F34)
Docker.app: version v1.11.1-beta13
Running diagnostic tests:
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160526-112906.tar.gz
Most specific failure is: No error was detected
Your unique id is: 2B6AE3C7-F8DC-4377-B0E9-6EEBC845C48D
Please quote this in all correspondence.