etcd常用参数
# 查看警告信息
$ etcdctl --endpoints=http://127.0.0.1:2379 alarm list
memberID:8630161756594109333 alarm:NOSPACE
# 获取当前版本
$ rev=$(etcdctl --endpoints=http://127.0.0.1:2379 endpoint status --write-out="json" | egrep -o '"revision":[0-9]*' | egrep -o '[0-9].*')
# 压缩旧版本
$ etcdctl --endpoints=http://127.0.0.1:2379 compact $rev
# 清理磁盘碎片
$ etcdctl --endpoints=http://127.0.0.1:2379 defrag
# 最后验证空间是否释放
$ etcdctl endpoint status # 惊人 G变成了M
# 最后清除警告
$ etcdctl --endpoints=http://127.0.0.1:2379 alarm disarm
————————————————
本文标题:etcd常用参数
本文链接:https://www.haomeiwen.com/subject/yjgtlltx.html
网友评论