MONGODB 回滚失败:
{
"_id" : 5,
"name" : "192.168.190.7:27018",
"health" : 1,
"state" : 4,
"stateStr" : "FATAL",
"uptime" : 63,
"optime" : Timestamp(1414132121, 1),
"optimeDate" : ISODate("2014-10-24T06:28:41Z"),
"lastHeartbeat" : ISODate("2014-06-08T12:10:55Z"),
"lastHeartbeatRecv" : ISODate("2014-06-08T12:10:56Z"),
"pingMs" : 0,
"lastHeartbeatMessage" : "rollback error: not willing to roll back more than 30 minutes of data"
}
],
查看资料:
In some cases, MongoDB decides that the rollback is too large to undertake. Rollback
can fail if there are more than 300 MB of data or about 30 minutes of operations to roll
back. In these cases, you must resync the node that is stuck in rollback
如下进行重新配置:
首先删除出错的节点
rs.remove("192.168.190.7:27018")
然后停止原出错节点,删除所有的数据文件。并且按照配置重启
[root@testora1 db]# rm -rf *
./mongod ~/.mongodb.conf
加入节点
rs.add({"_id":5,"host":"192.168.190.7:27018","priority":1})
这样及可以进行重新配置
查看状态
{
"_id" : 5,
"name" : "192.168.190.7:27018",
"health" : 1,
"state" : 5,
"stateStr" : "STARTUP2",
"uptime" : 602,
"optime" : Timestamp(1413699079, 2838693),
"optimeDate" : ISODate("2014-10-19T06:11:19Z"),
"self" : true
}
],
{
"_id" : 5,
"name" : "192.168.190.7:27018",
"health" : 1,
"state" : 4,
"stateStr" : "FATAL",
"uptime" : 63,
"optime" : Timestamp(1414132121, 1),
"optimeDate" : ISODate("2014-10-24T06:28:41Z"),
"lastHeartbeat" : ISODate("2014-06-08T12:10:55Z"),
"lastHeartbeatRecv" : ISODate("2014-06-08T12:10:56Z"),
"pingMs" : 0,
"lastHeartbeatMessage" : "rollback error: not willing to roll back more than 30 minutes of data"
}
],
查看资料:
In some cases, MongoDB decides that the rollback is too large to undertake. Rollback
can fail if there are more than 300 MB of data or about 30 minutes of operations to roll
back. In these cases, you must resync the node that is stuck in rollback
如下进行重新配置:
首先删除出错的节点
rs.remove("192.168.190.7:27018")
然后停止原出错节点,删除所有的数据文件。并且按照配置重启
[root@testora1 db]# rm -rf *
./mongod ~/.mongodb.conf
加入节点
rs.add({"_id":5,"host":"192.168.190.7:27018","priority":1})
这样及可以进行重新配置
查看状态
{
"_id" : 5,
"name" : "192.168.190.7:27018",
"health" : 1,
"state" : 5,
"stateStr" : "STARTUP2",
"uptime" : 602,
"optime" : Timestamp(1413699079, 2838693),
"optimeDate" : ISODate("2014-10-19T06:11:19Z"),
"self" : true
}
],