I've problem with enabling WiredTiger engine by setings in mongod.conf I'm using Centos 7, and this is my config
#/etc/mongod.conf storage: wiredTiger: engineConfig: cacheSizeGB: 2 collectionConfig: blockCompressor: snappy dbPath: "/var/lib/mongo" systemLog: destination: file path: "/var/log/mongodb/mongod.log" logAppend: true #timeStampFormat: iso8601-utc processManagement: fork: true pidFilePath: "/var/run/mongodb/mongod.pid" net: bindIp: 10.0.1.136,127.0.0.1 port: 27017 wireObjectCheck : true unixDomainSocket: enabled : true security: keyFile: "/etc/mongo.rs1.key" authorization: "enabled" replication: oplogSizeMB: 2048 replSetName: rs1
Mongo starts but the enginge is mmapv1 :( This is the output in mongo log
Detected configuration for non-active storage engine wiredTiger when current storage engine is mmapv1
I can enable wiredtiger only by manualy invoking command
mongod --storageEngine wiredTiger
Is it something wrong with my config file? I have the same problem on Centos 6.
EDIT: On Centos 7 I can enable WiredTiger by making systemd init script (Mongo3 comes by default with /etc/init.d script).
/lib/systemd/system/mongod.service
[Unit] Description=High-performance, schema-free document-oriented database After=syslog.target network.target [Service] Type=forking User=mongod Group=mongod PIDFile=/var/run/mongodb/mongod.pid EnvironmentFile=/etc/sysconfig/mongod ExecStart=/bin/mongod $OPTIONS run # Other directives omitted # (file size) LimitFSIZE=infinity # (cpu time) LimitCPU=infinity # (virtual memory size) LimitAS=infinity # (open files) LimitNOFILE=64000 # (processes/threads) LimitNPROC=64000 [Install] WantedBy=multi-user.target
And changing start options in file /etc/sysconfig/mongod
OPTIONS="--storageEngine wiredTiger -f /etc/mongod.conf"
So ok this way it works fine, but still why doesn't it work when it is configured in mongod.conf file?
If I remember correctly, you have to have this in your config:
Though I can't test it right now...
Edit: Found the same suggestion in How to migrate MongoDB 2.6 to 3.0 with WiredTiger