MongoDB分布式操作――分片操作(三)
system
Mon Aug 12 13:43:10.569 [initandlisten] options: { dbpath: "/var/lib/mongo/dbs/shard1", nojournal: true, port: 10000 }
Mon Aug 12 13:43:10.626 [FileAllocator] allocating new datafile /var/lib/mongo/dbs/shard1/local.ns, filling with zeroes...
Mon Aug 12 13:43:10.628 [FileAllocator] creating directory /var/lib/mongo/dbs/shard1/_tmp
Mon Aug 12 13:43:11.547 [FileAllocator] done allocating datafile /var/lib/mongo/dbs/shard1/local.ns, size: 16MB, took 0.907 secs
Mon Aug 12 13:43:11.549 [FileAllocator] allocating new datafile /var/lib/mongo/dbs/shard1/local.0, filling with zeroes...
Mon Aug 12 13:43:13.339 [FileAllocator] done allocating datafile /var/lib/mongo/dbs/shard1/local.0, size: 16MB, took 1.787 secs
Mon Aug 12 13:43:13.427 [initandlisten] command local.$cmd command: { create: "startup_log", size: 10485760, capped: true } ntoreturn:1 keyUpdates:0 reslen:372801ms
Mon Aug 12 13:43:13.472 [initandlisten] waiting for connections on port 10000
Mon Aug 12 13:43:13.497 [websvr] admin web console waiting for connections on port 11000
(4)添加分片2:
[plain]
[root@h3 dbs]# cd /var/lib/mongo/dbs/
[root@h3 dbs]# mkdir shard2
[root@h3 dbs]# mongod --dbpath /var/lib/mongo/dbs/shard2 --port 10001 --nojournal
Mon Aug 12 13:48:25.549 [initandlisten] MongoDB starting : pid=23129 port=10001 dbpath=/var/lib/mongo/dbs/shard2 32-bit host=h3
Mon Aug 12 13:48:25.550 [initandlisten]
Mon Aug 12 13:48:25.550 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
Mon Aug 12 13:48:25.550 [initandlisten] ** 32 bit builds are limited to less than 2GB of data (or less with --journal).
Mon Aug 12 13:48:25.550 [initandlisten] ** Note that journaling defaults to off for 32 bit and is currently off.
Mon Aug 12 13:48:25.550 [initandlisten] ** See http://dochub.mongodb.org/core/32bit
Mon Aug 12 13:48:25.551 [initandlisten]
Mon Aug 12 13:48:25.551 [initandlisten] db version v2.4.5
Mon Aug 12 13:48:25.552 [initandlisten] git version: a2ddc68ba7c9cee17bfe69ed840383ec3506602b
Mon Aug 12 13:48:25.552 [initandlisten] build info: Linux bs-linux32.10gen.cc 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 BOOST_LIB_VERSION=1_49
Mon Aug 12 13:48:25.552 [initandlisten] allocator: system
Mon Aug 12 13:48:25.552 [initandlisten] options: { dbpath: "/var/lib/mongo/dbs/shard2", nojournal: true, port: 10001 }
Mon Aug 12 13:48:25.570 [FileAllocator] allocating new datafile /var/lib/mongo/dbs/shard2/local.ns, filling with zeroes...
Mon Aug 12 13:48:25.572 [FileAllocator] creating directory /var/lib/mongo/dbs/shard2/_tmp
Mon Aug 12 13:48:26.956 [FileAllocator] done allocating datafile /var/lib/mongo/dbs/shard2/local.ns, size: 16MB, took 1.378 secs
Mon Aug 12 13:48:26.957 [FileAllocator] allocating new datafile /var/lib/mongo/dbs/shard2/local.0, filling with zeroes...
Mon Aug 12 13:48:28.023 [FileAllocator] done allocating datafile /var/lib/mongo/dbs/shard2/local.0, size: 16MB, took 1.065 secs
Mon Aug 12 13:48:28.038 [initandlisten] command local.$cmd command: { create: "startup_log", size: 10485760, capped: true } ntoreturn:1 keyUpdates:0 reslen:37 2469ms
Mon Aug 12 13:48:28.041 [websvr] admin web console waiting for connections on port 11001
Mon Aug 12 13:48:28.042 [initandlisten] waiting for connections on p