修改(Secondary,Primary set)Oplog文件大小
来源:互联网 发布:淘宝秒杀在哪? 编辑:程序博客网 时间:2024/06/16 12:10
1.Restart a Secondary in Standalone Mode on a Different Port db.shutdownServer() mongod --port 37017 --dbpath /data/standby2.Create a Backup of the Oplog (Optional) mongodump --db local --collection 'oplog.rs' --port 370173.Recreate the Oplog with a New Size and a Seed Entry use local db = db.getSiblingDB('local') db.temp.drop() db.temp.save( db.oplog.rs.find( { }, { ts: 1, h: 1 } ).sort( {$natural : -1} ).limit(1).next() ) db.temp.find()4.Remove the Existing Oplog Collection db = db.getSiblingDB('local') db.oplog.rs.drop()5.Create a New Oplog db.runCommand( { create: "oplog.rs", capped: true, size: (2 * 1024 * 1024) } ) //2MB 6.Insert the Last Entry of the Old Oplog into the New Oplog db.oplog.rs.save( db.temp.findOne() ) db.oplog.rs.find()7.Restart the Member db.shutdownServer() mongod --replSet "rs0" --dbpath /data/standby8.查看日志文件大小 rs0:SECONDARY> use local switched to db local rs0:SECONDARY> db.oplog.rs.totalSize() 2097152 //2MB8.Change the Size of the Oplog on the Primary To finish the rolling maintenance operation, step down the primary with the rs.stepDown() method and repeat the oplog resizing procedure above.
0 0
- 修改(Secondary,Primary set)Oplog文件大小
- Unity 通过 Secondary Maps + UV Set 动态修改UV
- MongoDB修改oplog size
- 修改mongodb oplog size
- 修改mongodb oplog size
- mongodb修改oplog大小
- 实验四 primary Vlan 和secondary Vlan
- MongoDB副本集Primary-Secondary切换实验
- What comes after primary, secondary, tertiary?
- Oplog
- oplog
- Mongodb Journaling and replica-set oplog
- MongoDB:Replica Set 之操作日志 Oplog
- 实验四 配置primary VLAN和secondary VLAN
- configure secondary IPs to overlap the primary ip
- Berkeley DB 以及 DB_SECONDARY_BAD: Secondary index inconsistent with primary 问题
- BW:What is meant by Primary Index and Secondary Index
- What is the difference between primary & secondary storage device?
- Android——Button的监听事件(自己动手 丰衣足食)
- POJ 1321 棋盘问题(暴力dfs or DP)
- 基于实现霍夫曼编码的无损压缩-C++实现
- 基于用户投票的排名算法(二):Reddit
- ESB企业服务总线
- 修改(Secondary,Primary set)Oplog文件大小
- QT release时 提示“无法找到“xxx.exe”的调试信息,或者调试信息不匹配
- POJ3233(矩阵二分再二分)
- leetcode Integer to Roman
- java编程JDK排序算法
- webservice学习心得
- vSphere复制虚拟机
- 字符串搜索算法 - 总结
- 用intellij idea 13创建一个Web项目