写在前面
这篇文章的前提是,mongo2.6.9升级mongo3.0.7的过程中,发现authSchema版本过低无法启动mongos。在这种情况下,有了这么一篇调研方案
知识准备
这两篇文章关于authSchema版本的关键信息整理如下:
To override this behavior, run the upgrade command with the additional parameter upgradeShards:false. If you choose to override, you must run the upgrade procedure on the mongos first, and then run the procedure on the primary members of each shard.
If your existing MongoDB deployment is already running with authentication and authorization, your user data model authSchema must be at least version 3.
If you upgrade to 3.0 and have run authSchemaUpgrade, you cannot downgrade to 2.6 without disabling –auth or restoring a pre-upgrade backup, as authSchemaUpgrade discards the MONGODB-CR credentials used in 2.6. See Upgrade Existing MONGODB-CR Users to Use SCRAM-SHA-1.