ctiy:PRIMARY> use local switched to db local ctiy:PRIMARY> db.oplog.rs.stats().maxSize //查看大小 NumberLong("53687091200
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 大小
原文地址:https://blog.51cto.com/13746824/2513014
--结束END--
本文标题: mongoDB复制集修改 oplog 大小
本文链接: https://lsjlt.com/news/7438.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0