码迷,mamicode.com
首页 > 数据库 > 详细

mongoDB复制集修改 oplog 大小

时间:2020-07-24 13:28:22      阅读:99      评论:0      收藏:0      [点我收藏+]

标签:code   and   sig   fir   event   ash   bind   大小   ODB   

ctiy:PRIMARY> use local switched to db local ctiy:PRIMARY> db.oplog.rs.stats().maxSize //查看大小 NumberLong("53687091200") //这里为50G,单位为B ctiy:PRIMARY> use local switched to db local ctiy:PRIMARY> db.adminCommand({replSetResizeOplog:1,size:5120}) //修改为5G, { //修改 这里单位 为 M "ok" : 1, "operationTime" : Timestamp(1595321857, 1), "$clusterTime" : { "clusterTime" : Timestamp(1595321857, 1), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } } } ctiy:PRIMARY> db.oplog.rs.stats().maxSize NumberLong("5368709120") ctiy:SECONDARY> rs.printReplicationInfo() // 另一种查看方法 configured oplog size: 51200MB log length start to end: 2580359secs (716.77hrs) oplog first event time: Sun Jun 21 2020 20:01:51 GMT+0800 (CST) oplog last event time: Tue Jul 21 2020 16:47:50 GMT+0800 (CST) now: Tue Jul 21 2020 16:47:54 GMT+0800 (CST)

mongoDB复制集修改 oplog 大小

标签:code   and   sig   fir   event   ash   bind   大小   ODB   

原文地址:https://blog.51cto.com/13746824/2513014

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!