Currently, I have a existing mongo3.0 cluster(using
WiredTiger storage engine and
directoryPerDB is true) as below settings:
3 x shards(rs01, rs02, rs03) 2 x mongos 3 x mongo cfg
All the databases/collections in the 3 shards are
and for example, there are below databases in the 3 shards.
in rs01: db01, db03 in rs02: db02, db05 in rs03: db04
Now, I bought new hardware and want to setup a new cluster for better performance. According to the usage of all databases, I need to change the positions as below:
in new rs01: db02, db04 in new rs02: db01 in new rs03: db05, db03
All the databases data are several
TB size(about 25TB in total.). I tried to use mongo dump/export is slow. It may take several weeks to transfer all databases to new cluster?
Although in the old cluster, all nodes config
directoryPerDB: true, I tried to create an empty database named
db01 in new
rs02 and then insert a document in
db01.co01, then copy the local directory
/var/lib/mongodb/db01 in old
rs01 to new
rs02. But it doesn't work.
Is there any faster way to do this? Say, copying the local files to new cluster. If I can make the process fast, I'll announce the downtime of mongo service within 1 week and do it.
@Stennie mentioned about Migrate a Sharded Cluster to Different Hardware. However, this looks like node to node data path copy. In my case the position of all databases are redesigned for better performance, so I cannot do a node to node file copy.