私はmongo-dbを初めて使用しています。mongo-db Webサイトの手順に従ってシャーディングを設定しようとしましたが、いくつかのエラーが発生しています......私はのconfigureシャーディングのために続いている......私は......窓-OSでシャーディングを試してみましたSHAREDING CONFIGURATION HELP
ステップ1:
*)私は2つのフォルダ、すなわち作成された最初のマシンで次のパスc:/ data/db/a; c:/ data/db/config
*)これでコマンドプロンプトが開き、次のコマンドを使用してシャードサーバーを設定しました.......
C:/Program Files/mongodb-win32-i386-1.6.2/bin/mongod --shardsvr --dbpath c:/data/db/a --port 10000
ステップ2:
*)私は、次のパスCに2つのフォルダ、すなわち生成された第2のマシンでは:/データ/ DB/B; C:/データ/ DB /設定
*)もう一度コマンドプロンプトを開き、次のコマンドを使用してシャードサーバーを構成しました。...
*)これでコマンドプロンプトが開き、以下のコマンドを使ってshard-server .....を構成しました。 ..
C:/Program Files/mongodb-win32-i386-1.6.2/bin/mongod --shardsvr --dbpath c:/data/db/a --port 10001
ステップ3:
*)iは、コマンドプロンプトを開いて、私は設定サーバを設定するためのコマンドを次の使用最初のマシンでは....
C:/Program Files/mongodb-win32-i386-1.6.2/bin/mongod --configsvr --dbpath c:/data/db/config --port 20000
ステップ4:
*)において第二マシンは、私は、コマンドプロンプトを開いて、私はコンフィグ・サーバを設定するには、次のコマンドを使用し....
C:/Program Files/mongodb-win32-i386-1.6.2/bin/ mongod --configsvr --dbpath c:/data/db/config --port 20001
ステップ5:
を*)私は最初のマシン私は、コマンドプロンプトを開いて、私は*
C:/Program Files/mongodb-win32-i386-1.6.2/bin/ mongos --configdb first-machine-ip:20000
........最初のマシンのためにmongosサーバを設定するには、次のコマンドを使用)再び私は別のコマンドプロンプトを開き、私は........二マシンのmongosサーバを設定するには、次のコマンドを使用
C:/Program Files/mongodb-win32-i386-1.6.2/bin/ mongos --configdb Second-machine-ip:20001
ステップ6:
次のように今私はMongoのプロセスを実行*)..
C:/Program Files/mongodb-win32-i386-1.6.2/bin/ mongo.exe first-machine-ip:27017/admin
ステップ7:私は
*)は今:
*)&はシャーディングを有効に追加するには、私は.......
> use admin
switched to db admin
> db.runCommand({ addshard : "10.0.0.137:10000" })
{ "shardAdded" : "shard0000", "ok" : 1 }
> db.runCommand({ addshard : "10.0.0.180:10001" })
{ "shardAdded" : "shard0001", "ok" : 1 }
> db.runCommand({ enablesharding : "test" })
{ "ok" : 1 }
> db.runCommand({ shardcollection : "test.block_seek_pos", key : {file_GUID : 1} })
{ "collectionsharded" : "test.people", "ok" : 1 }
ステップ8次の手順に従っていました1つの通常のバックアップを構成しました。
*)バックアップが完了したら、コマンドプロンプトのすべての印刷を確認しました......
*)次のように私は、mongosプロセス端末に......エラーを得た....
>>mongos db version v1.6.2, pdfile version 4.5 starting (--help for usage)
>>git version: aef371ecf5d2a824f16ccdc3b745f3702165602f
>>sys info: windows (5, 1, 2600, 2, 'Service Pack 3') BOOST_LIB_VERSION=1_35
>>waiting for connections on port 27017
>>[websvr] web admin interface listening on port 28017
>>couldn't find database [sgserver] in config db
>>can't find a shard to put new db on
>>DBException in process: can't find a shard to put new db on
>>couldn't find database [sgserver] in config db
>>can't find a shard to put new db on
>>DBException in process: can't find a shard to put new db on
>>couldn't find database [sgserver] in config db
>>can't find a shard to put new db on
>>DBException in process: can't find a shard to put new db on
>>going to add shard: { _id: "shard0000", host: "first-machine-ip:10000" }
>>going to add shard: { _id: "shard0001", host: "second-machine-ip:10001" }
>>couldn't find database [test] in config db
>>put [test] on: shard0000:first-machine-ip:10000
>>enabling sharding on: test
>>CMD: shardcollection: { shardcollection: "test.people", key: { file_GUID: 1.0 } }
>>enable sharding on: test.people with shard key: { file_GUID: 1.0 }
>>no chunks for:test.people so creating first: ns:test.people at: shard0000:first-machine->>ip:10000 lastmod: 1|0 min: { file_GUID: MinKey } max: { file_GUID: MaxKey }
>>couldn't find database [sgserver] in config db
>>put [sgserver] on: shard0001:second-machine-ip:10001
>>creating WriteBackListener for: first-machine-ip:10000
>>creating WriteBackListener for: second-machine-ip:10001
誰もがこのシャーディングで私を助けることができる....... Iウル返事を待っています........
アドバンスのおかげで、 サンパスクマー...
こんにちは、ありがとうございました。私の設定に従ってmongoプロセスの設定を説明できますか。 – SampathKumar