mongod.exeが起動しない。”dbpath (/data/db) does not exist”のエラー

エラーログ

C:\data\mongodb-win32-i386-2.0.1\bin>mongod
mongod --help for help and startup options
Tue Nov 15 16:15:01
Tue Nov 15 16:15:01 warning: 32-bit servers don't have journaling enabled by def
ault. Please use --journal if you want durability.
Tue Nov 15 16:15:01
Tue Nov 15 16:15:01 [initandlisten] MongoDB starting : pid=40744 port=27017 dbpa
th=/data/db 32-bit host=LENOVO-941BDA57
Tue Nov 15 16:15:01 [initandlisten]
Tue Nov 15 16:15:01 [initandlisten] ** NOTE: when using MongoDB 32 bit, you are
limited to about 2 gigabytes of data
Tue Nov 15 16:15:01 [initandlisten] **       see http://blog.mongodb.org/post/13
7788967/32-bit-limitations
Tue Nov 15 16:15:02 [initandlisten] **       with --journal, the limit is lower
Tue Nov 15 16:15:02 [initandlisten]
Tue Nov 15 16:15:02 [initandlisten] db version v2.0.1, pdfile version 4.5
Tue Nov 15 16:15:02 [initandlisten] git version: 3a5cf0e2134a830d38d2d1aae7e88ca
c31bdd684
Tue Nov 15 16:15:02 [initandlisten] build info: windows (5, 1, 2600, 2, 'Service
 Pack 3') BOOST_LIB_VERSION=1_42
Tue Nov 15 16:15:02 [initandlisten] options: {}
Tue Nov 15 16:15:02 [initandlisten] exception in initAndListen: 10296 dbpath (/d
ata/db) does not exist, terminating
Tue Nov 15 16:15:02 dbexit:
Tue Nov 15 16:15:02 [initandlisten] shutdown: going to close listening sockets..
.
Tue Nov 15 16:15:02 [initandlisten] shutdown: going to flush diaglog...
Tue Nov 15 16:15:02 [initandlisten] shutdown: going to close sockets...
Tue Nov 15 16:15:02 [initandlisten] shutdown: waiting for fs preallocator...
Tue Nov 15 16:15:02 [initandlisten] shutdown: closing all files...
Tue Nov 15 16:15:02 [initandlisten] closeAllFiles() finished
Tue Nov 15 16:15:02 dbexit: really exiting now

解決方法

"dbpath (/data/db) does not exist"つまりdata\dbディレクトリがないのが原因なのでdata\dbの位置に空のディレクトリを作成すると解決する