Tag Archives: Etcd Error

Etcd Error: mvcc: database space exceeded

etcd report error: mvcc: database space exceeded

Main analysis: auto-compact (auto-compact)
etcd does not recognize automatic compact, require an initial parameter, or compact through an order, and if more frequently recommended installation, the cost and error of space and internally existing. etcd v3 honored backend quota 2GB, if not compact, boltdb document is larger than that limit, errors: ” Error: etcdserver: mvcc: database spaceexceeded”, resulting in the failure to write data.

processing process:
My master point here is 192.168.10.203, 192.168.10.204, 192.168.10.204, 192.168.10.205

1 View alarms
[root@ ~]# /opt/k8s/bin/etcdctl –endpoints=https://192.168.10.203:2379 –ca cert=/etc/kubernetes/ssl/ca.pem –cert=/etc/etcd/ssl/etcd.pem –key=/etc/etcd/ssl/etcd-key.pem alarm list
[root@~]#/opt/k8s/bin/etcdctl –endpoints=https://192.168.10.204:2379 –ca cert=/etc/kubernetes/ssl/ca.pem –cert=/etc/etcd/ssl/etcd.pem –key=/etc/etcd/ssl/etcd-key.pem alarm list
[root@~]#/opt/k8s/bin/etcdctl –endpoints=https://192.168.10.205:2379 –ca cert=/etc/kubernetes/ssl/ca.pem –cert=/etc/etcd/ssl/etcd.pem –key=/etc/etcd/ssl/etcd-key.pem alarm list

2 To get the old copy
[root@~]#rev=$(/opt/k8s/bin/etcdctl –ca cert=/etc/kubernetes/ssl/ca.pem –cert=/etc/etcd/ssl/etcd.pem –key=/etc/etcd/ssl/etcd-key.pem –endpoints=”https://127.0.0.1:2379
[root@~]#echo $rev
846418475

3 compression of old copy data
[root@~]#opt/k8s/bin/etcdctl –endpoints=https://192.168.10.203:2379 –ca cert=/etc/kubernetes/ssl/ca.pem –cert=/etc/etcd/ssl/etcd.pem –key=/etc/etcd/ssl/etcd-key.pem compact $rev
[root@]#/opt/k8s/bin/etcdctl –endpoints=https://192.168.10.204:2379 –ca cert=/etc/kubernetes/ssl/ca.pem –cert=/etc/etcd/ssl/etcd.pem –key=/etc/etcd/ssl/etcd-key.pem compact $rev
[root@]#/opt/k8s/bin/etcdctl –endpoints=https://192.168.10.205:2379 –ca cert=/etc/kubernetes/ssl/ca.pem –cert=/etc/etcd/ssl/etcd.pem –key=/etc/etcd/ssl/etcd-key.pem compact $rev

4 Executive debris integration
[root@~]#opt/k8s/bin/etcdctl –endpoints=https://192.168.10.203:2379 –cacert=/etc/kubernetes/ssl/ca.pem –cert=/etc/etcd/ssl/etcd.pem –key=/etc/etcd/ssl/etcd-key.pem defrag
[root@ ~]#/opt/k8s/bin/etcdctl –endpoints=https://192.168.10.204:2379 –ca cert=/etc/kubernetes/ssl/ca.pem –cert=/etc/etcd/ssl/etcd.pem –key=/etc/etcd/ssl/etcd-key.pem defrag
[root@~]#/opt/k8s/bin/etcdctl –endpoints=https://192.168.10.205:2379 –ca cert=/etc/kubernetes/ssl/ca.pem –cert=/etc/etcd/ssl/etcd.pem –key=/etc/etcd/ssl/etcd-key.pem defrag

5 dismissal of warning police
[root@~]#opt/k8s/bin/etcdctl –endpoints=https://192.168.10.203:2379 –ca cert=/etc/kubernetes/ssl/ca.pem –cert=/etc/etcd/ssl/etcd.pem –key=/etc/etcd/ssl/etcd-key.pem alarm disarm
[root@]#/opt/k8s/bin/etcdctl –endpoints=https://192.168.10.204:2379 –ca cert=/etc/kubernetes/ssl/ca.pem –cert=/etc/etcd/ssl/etcd.pem –key=/etc/etcd/ssl/etcd-key.pem alarm disarm
[root@]#/opt/k8s/bin/etcdctl –endpoints=https://192.168.10.205:2379 –ca cert=/etc/kubernetes/ssl/ca.pem –cert=/etc/etcd/ssl/etcd.pem –key=/etc/etcd/ssl/etcd-key.pem alarm disarm

6 equipment and identifying standby data information
ETCDCTL_API=3 etcdctl snapshot save backup.db
ETCDCTL_API=3 etcdctl snapshot status backup.db