question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question on democratic-csi PVC inode counts / Prometheus

See original GitHub issue

I’m using a Grafana Dashboard / Prometheus (kube-stack-prometheus) to monitor my democratic-csi iSCSI volumes. The “Volume Space Usage” seems to be fine.

However, the “Volume Inodes Usages” shows zeros. I am using XFS instead of EXT4 but XFS still has inodes from what I remember.

I have democratic-csi iSCSI volumes in the namespace “monitoring”, queried via kubelet_volume_stats_inodes_used{namespace="monitoring"} and all of them report a value of zero for inodes used:

kubelet_volume_stats_inodes_used{endpoint="https-metrics", instance="192.168.10.215:10250", job="kubelet", metrics_path="/metrics", namespace="monitoring", node="k3s01", persistentvolumeclaim="kube-prometheus-stack-grafana", service="kube-prometheus-stack-kubelet"} | 0

kubelet_volume_stats_inodes_used{endpoint="https-metrics", instance="192.168.10.216:10250", job="kubelet", metrics_path="/metrics", namespace="monitoring", node="k3s02", persistentvolumeclaim="prometheus-kube-prometheus-stack-prometheus-db-prometheus-kube-prometheus-stack-prometheus-0", service="kube-prometheus-stack-kubelet"} | 0

kubelet_volume_stats_inodes_used{endpoint="https-metrics", instance="192.168.10.217:10250", job="kubelet", metrics_path="/metrics", namespace="monitoring", node="k3s03", persistentvolumeclaim="alertmanager-kube-prometheus-stack-alertmanager-db-alertmanager-kube-prometheus-stack-alertmanager-0", service="kube-prometheus-stack-kubelet"} | 0

I don’t understand how the data is pulled, but I assume democratic-csi is not providing the data??

If I point it to a Longhorn volume, it does return the number of inodes used:

kubelet_volume_stats_inodes_used{endpoint="https-metrics", instance="192.168.10.217:10250", job="kubelet", metrics_path="/metrics", namespace="unifi", node="k3s03", persistentvolumeclaim="unifi-longhorn-pvc", service="kube-prometheus-stack-kubelet"} | 3293

Prometheus itself is using a 50GB democratic-csi iSCSI PVC, if I go into the container, it reports inodes:

/prometheus $ df -h .
Filesystem                Size      Used Available Use% Mounted on
/dev/sda                 50.0G     19.5G     30.5G  39% /prometheus

/prometheus $ df -i .
Filesystem              Inodes      Used Available Use% Mounted on
/dev/sda              26214400       165  26214235   0% /prometheus

These also return zeros for each PVC: kubelet_volume_stats_inodes{namespace="monitoring"} kubelet_volume_stats_inodes_free{namespace="monitoring"}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
reeflandcommented, Jun 28, 2022

It’s ok if you sleep and eat once in a while too. 😃

Fantastic. Spun up a test VM using the next image. Looking good so far.

grafana_csi_inodes

And double-checked:

$ k exec -it prometheus-kube-prometheus-stack-prometheus-0 -n monitoring -c prometheus -- /bin/sh
/prometheus $ df -i .
Filesystem              Inodes      Used Available Use% Mounted on
/dev/sdf              26214400         9  26214391   0% /prometheus
1reaction
travisghansencommented, Jun 27, 2022

Good question. I’m guessing k8s invokes the GetVolumeStats method of the Node service. I’m currently only returning byte info but inode could also be added to the mix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A node in my cluster hit very high memory pressure, wedged ...
I opened the 'pre-built' dashboards in Grafana for keeping an eye on the Prometheus metrics for the cluster and i saw very high...
Read more >
Monitoring PVC Usage with Prometheus - Stack Overflow
For PVC, Kubernetes exposes these metrics to Prometheus, you can use them to monitor a persistent volume's usage:
Read more >
Storage: Huge number of files - Google Groups
Hi, we are using prometheus for ca. 40 machines with a retention period of two weeks (all other storage settings are defaults) and...
Read more >
Rancher RKE2 Setup - from democratic-csi. - Giter Site
Rancher RKE2 Setup - Cannot make this work yet about democratic-csi HOT 12 CLOSED ... HOT 10; Question on democratic-csi PVC inode counts...
Read more >
Democratic-csi democratic-csi Analysis & Statistics - Devscope.io
Democratic-csi Watcher Count History. Democratic-csi Repo Size History ... democratic-csi Question on democratic-csi PVC inode counts / Prometheus 8 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found