💡 小知识分享:VictoriaMetrics 磁盘空间不足了会如何?

Viewed 121

vmstorage nodes automatically switch to readonly mode when the directory pointed by -storageDataPath contains less than -storage.minFreeDiskSpaceBytes of free space. vminsert nodes stop sending data to such nodes and start re-routing the data to the remaining vmstorage nodes.

vmstorage sets vm_storage_is_read_only metric at http://vmstorage:8482/metrics to 1 when it enters read-only mode. The metric is set to 0 when the vmstorage isn't in read-only mode.

vmstorage 模块,有两个命令行参数需要关注一下:

  • -storageDataPath 指定存储数据的目录
  • -storage.minFreeDiskSpaceBytes 指定目录最小剩余空间

当存储数据的目录,剩余空间小于 -storage.minFreeDiskSpaceBytes 指定的值,这个 vmstorage 节点就会被设置为只读模式,不再接收新数据,vminsert 发现 vmstorage 是只读模式了,就不往这个 node 发数据了,嗯,这个特性挺好。

0 Answers