This article is a mirror article of machine translation, please click here to jump to the original article.

View: 7711|Reply: 0

How to check if the current mongodb has WiredTiger storage engine enabled?

[Copy link]
Posted on 10/8/2016 11:14:08 AM | | | |
How to check if the current mongodb has WiredTiger storage engine enabled?

It can be verified by at least the following 2 methods:

1. Run the following command on Linux/OSX


If it returns 1, it means that a mongod with WiredTiger as the storage engine is running in the current system

2. Run the following command on Linux/OSX


If the return message contains wiredTiger, the mongo is connected to a mongod with the wiredTiger storage engine enabled.

Note forAlreadyWiredTiger's file path – dbpath is enabled and can no longer be opened using the default mmapv1 storage engineFor example:



ac:mongodata maclean$ mongod --storageEngine wiredTiger --dbpath  /Users/maclean/mongodata
2015-05-06T11:35:32.372+0800 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=4G,session_max=20000,eviction=(threads_max=4),statistics=(fast),log=( enabled=true,archive=true,path=journal,compressor=snappy),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2015-05-06T11:35:32.997+0800 I CONTROL  [initandlisten] MongoDB starting : pid=16590 port=27017 dbpath=/Users/maclean/mongodata 64-bit host=ac.local
2015-05-06T11:35:32.998+0800 I CONTROL  [initandlisten] db version v3.0.2
2015-05-06T11:35:32.998+0800 I CONTROL  [initandlisten] git version: nogitversion
2015-05-06T11:35:32.998+0800 I CONTROL  [initandlisten] build info: Darwin yosemitevm.local 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
2015-05-06T11:35:32.998+0800 I CONTROL  [initandlisten] allocator: system
2015-05-06T11:35:32.999+0800 I CONTROL  [initandlisten] options: { storage: { dbPath: "/Users/maclean/mongodata", engine: "wiredTiger" } }
2015-05-06T11:35:33.045+0800 I NETWORK  [initandlisten] waiting for connections on port 27017



If --storageEngine wiredTiger is enabled as above, it will work normally



If you use the mmapv1 engine, an error will be reported
ac:mongodata maclean$ mongod --storageEngine mmapv1 --dbpath  /Users/maclean/mongodata
2015-05-06T11:36:34.037+0800 I STORAGE  [initandlisten] exception in initAndListen: 28574 Cannot start server. Detected data files in /Users/maclean/mongodata created by storage engine 'wiredTiger'. The configured storage engine is 'mmapv1'., terminating
2015-05-06T11:36:34.037+0800 I CONTROL  [initandlisten] dbexit:  rc: 100







Previous:mongoVUE cannot display collection properly when connected to MongoDB3.2
Next:MongoVE connecting to MongoDB does not show data issues
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com