I have mongo version 3.4.2 and I have the following command:
mongos --configdb localhost:27016 --chunkSize 1 --port 27020
It doesn't work in my version of mongo. Could somebody help to solve it? I don't want to degrade to previous version of mongo by the way. It used to work under the previous versions (ex. 3.2).
You can't use the --chunkSize
option anymore.
From 3.4 release notes:
MongoDB 3.4 removes the following configuration options from the mongos: sharding.chunkSize configuration file setting and --chunkSize command-line option sharding.autoSplit configuration file setting and --noAutoSplit command line option
You will have to use the procedure described here in order to modify the chunk size:
use config
db.settings.save( { _id:"chunksize", value: 1 } )