mongoDB复制集修改 oplog 大小

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 大小

上一篇:MS-SQLSERVER 批量修改表中 某个字段可为NULL


下一篇:刷新数据库自己定义的视图