Я пытаюсь использовать официальное изображение докеры mongodb на mac os x 10.10.2 с помощью этой команды внутри mac terminal:
docker run -v /Users/john/data/db:/data/db -p 27017:27017 mongo --smallfiles
Но он выходит из этого журнала ошибок:
2015-04-11T10:53:19.709+0000 I JOURNAL [initandlisten] journal dir=/data/db/journal
2015-04-11T10:53:19.711+0000 I JOURNAL [initandlisten] recover begin
2015-04-11T10:53:19.711+0000 I STORAGE [initandlisten] In File::open(), ::open for '/data/db/journal/lsn' failed with errno:1 Operation not permitted
2015-04-11T10:53:19.711+0000 I - [initandlisten] Assertion failure f.is_open() src/mongo/db/storage/mmap_v1/dur_journal.cpp 597
2015-04-11T10:53:19.713+0000 I CONTROL [initandlisten]
0xf69069 0xf09861 0xeeed9e 0xd2b8f7 0xd36852 0xd37561 0xd37a90 0xd254b6 0xa9b9f9 0x824220 0x7f13c4 0x7f6dbae1bead 0x822459
----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"400000","o":"B69069"},{"b":"400000","o":"B09861"},{"b":"400000","o":"AEED9E"},{"b":"400000","o":"92B8F7"},{"b":"400000","o":"936852"},{"b":"400000","o":"937561"},{"b":"400000","o":"937A90"},{"b":"400000","o":"9254B6"},{"b":"400000","o":"69B9F9"},{"b":"400000","o":"424220"},{"b":"400000","o":"3F13C4"},{"b":"7F6DBADFD000","o":"1EEAD"},{"b":"400000","o":"422459"}],"processInfo":{ "mongodbVersion" : "3.0.1", "gitVersion" : "534b5a3f9d10f00cd27737fbcd951032248b5952", "uname" : { "sysname" : "Linux", "release" : "3.18.5-tinycore64", "version" : "#1 SMP Sun Feb 1 06:02:30 UTC 2015", "machine" : "x86_64" }, "somap" : [ { "elfType" : 2, "b" : "400000", "buildId" : "4AB5B4C24C9EE5C1743971702746CDB87DC92DCE" }, { "b" : "7FFFFE772000", "elfType" : 3, "buildId" : "C58213BB786BBA102C73C58D3FF0123C2006C7F4" }, { "b" : "7F6DBC38B000", "path" : "/lib/x86_64-linux-gnu/libpthread.so.0", "elfType" : 3, "buildId" : "FEF281218797AD6AE726DD5FCEDECADD9E9F51DC" }, { "b" : "7F6DBC12B000", "path" : "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0", "elfType" : 3, "buildId" : "AEE5F3A05E87AFA440FCF6352C568A0F08584119" }, { "b" : "7F6DBBD33000", "path" : "/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0", "elfType" : 3, "buildId" : "37084B8E55653C947BA6295814D850D6AA0C561D" }, { "b" : "7F6DBBB2B000", "path" : "/lib/x86_64-linux-gnu/librt.so.1", "elfType" : 3, "buildId" : "F58D5DE3E7A2989E915422BA4203FE53DBA449A0" }, { "b" : "7F6DBB927000", "path" : "/lib/x86_64-linux-gnu/libdl.so.2", "elfType" : 3, "buildId" : "5D1CA3A3D93ED5B6C6462FFA03E787FDBE4013A3" }, { "b" : "7F6DBB620000", "path" : "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", "elfType" : 3, "buildId" : "8711429397A5AF8B6269B867D830EDF6E0225B8D" }, { "b" : "7F6DBB39E000", "path" : "/lib/x86_64-linux-gnu/libm.so.6", "elfType" : 3, "buildId" : "7F58D6664571941C86B2D969701A572AD4D7BF1D" }, { "b" : "7F6DBB188000", "path" : "/lib/x86_64-linux-gnu/libgcc_s.so.1", "elfType" : 3, "buildId" : "F980B1188708F8D8B5C35D185444AF4CB939AA1E" }, { "b" : "7F6DBADFD000", "path" : "/lib/x86_64-linux-gnu/libc.so.6", "elfType" : 3, "buildId" : "A745EBA2C16BA80AE1EF1A7A7B70740C2CF1B363" }, { "b" : "7F6DBC5A7000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3, "buildId" : "9B23F2A44CC8CA6175CBD8D64584B1C7EA5FD18C" }, { "b" : "7F6DBABE6000", "path" : "/lib/x86_64-linux-gnu/libz.so.1", "elfType" : 3, "buildId" : "1EFEB71FD4999C2307570D673A724EA4E1D85267" } ] }}
mongod(_ZN5mongo15printStackTraceERSo+0x29) [0xf69069]
mongod(_ZN5mongo10logContextEPKc+0xE1) [0xf09861]
mongod(_ZN5mongo12verifyFailedEPKcS1_j+0xCE) [0xeeed9e]
mongod(_ZN5mongo3dur14journalReadLSNEv+0x1E7) [0xd2b8f7]
mongod(_ZN5mongo3dur11RecoveryJob2goERSt6vectorIN5boost11filesystem34pathESaIS5_EE+0xB2) [0xd36852]
mongod(_ZN5mongo3dur8_recoverEv+0x851) [0xd37561]
mongod(_ZN5mongo3dur27replayJournalFilesAtStartupEv+0x60) [0xd37a90]
mongod(_ZN5mongo3dur7startupEv+0x26) [0xd254b6]
mongod(_ZN5mongo23GlobalEnvironmentMongoD22setGlobalStorageEngineERKSs+0x319) [0xa9b9f9]
mongod(_ZN5mongo13initAndListenEi+0x2F0) [0x824220]
mongod(main+0x134) [0x7f13c4]
libc.so.6(__libc_start_main+0xFD) [0x7f6dbae1bead]
mongod(+0x422459) [0x822459]
----- END BACKTRACE -----
2015-04-11T10:53:19.716+0000 F JOURNAL [initandlisten] dbexception during recovery: 13611 can't read lsn file in journal directory : assertion src/mongo/db/storage/mmap_v1/dur_journal.cpp:597
2015-04-11T10:53:19.716+0000 I STORAGE [initandlisten] exception in initAndListen: 13611 can't read lsn file in journal directory : assertion src/mongo/db/storage/mmap_v1/dur_journal.cpp:597, terminating
2015-04-11T10:53:19.716+0000 I CONTROL [initandlisten] now exiting
2015-04-11T10:53:19.716+0000 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2015-04-11T10:53:19.716+0000 I NETWORK [initandlisten] shutdown: going to flush diaglog...
2015-04-11T10:53:19.716+0000 I NETWORK [initandlisten] shutdown: going to close sockets...
2015-04-11T10:53:19.716+0000 I STORAGE [initandlisten] shutdown: waiting for fs preallocator...
2015-04-11T10:53:19.716+0000 I STORAGE [initandlisten] shutdown: final commit...
2015-04-11T10:53:19.716+0000 I STORAGE [initandlisten] shutdown: closing all files...
2015-04-11T10:53:19.716+0000 I STORAGE [initandlisten] closeAllFiles() finished
2015-04-11T10:53:19.716+0000 I CONTROL [initandlisten] dbexit: rc: 100
Что я не понимаю, так это то, что если я выполню ту же самую команду внутри докер-машины, с теми же данными, которые находятся внутри папки док-машины, все работает нормально.
Я уже пробовал chmod -R 777 в папке, но это не устраняет проблему.
Может кто-нибудь объяснить, что я делаю неправильно здесь?
Можем ли мы поместить данные в папку "/Users", смонтированные на докер-машине, для совместного использования с контейнерами на mac os x?
Требуется ли mongodb что-то конкретное в файловой системе?