longhorn-dashboard

The Longhorn Dashboard Explained

The Longhorn dashboard serves as monitoring for the Longhorn storage system, and in this article I will go into details to explain its features, as it can be confusing at times.

What is Longhorn

We are using Longhorn in many on-premise Kubernetes clusters as the default block storage system. Basically, it is that part which allows you to have a storage class and create PersistentVolumeClaims / PersistentVolumes in Kubernetes.

Longhorn has many advantages:

  • it's free and open source and it is now even a Cloud Native Computing Foundation project
  • it's a distributed system, with volumes replicated on 3 (by default) nodes
  • it can be upgraded without disrupting the persistent volumes
  • it has good backup options

It also has a web dashboard, the topic I will discuss here. I will assume you already know how to access it if you use Longhorn.

Longhorn Dashboard

This is a screenshot from one of our clusters:

lognhorn dashboard

It looks like we are in great shape, the circle in the middle shows we have more than half of the disk space schedulable, less than half used.

But the story is not complete, click on the Node tab and you see:

longhorn dashboard

In the column Allocated you see about 75% is used on every node. In the column Used, about 30-40% used on every node. Um, what? I'm confused, do we have enough storage or not?

The Longhorn Dashboard Explained

The dashboard is explained in the official documentation, but who has time for that...

longhorn meme

So, let me present a short version here.

The first dashboard page is useful as a general view and more oriented on the health of the system. Do not trust the green middle circle with storage schedulable.

Consult the Node page for disk space, read the columns from right to left:

Column Size - that is exactly what storage you have on the node (total disk space of the node minus reserved space). For details, click on column Operation on the three lines menu on each node to Edit node and disks.

Column Used X/Y - X is exactly how much storage is used inside volumes. For example, you may create a 10GB PVC/PV and store only 1GB files inside it. Second number in this column is total space on the node (reserved space included).

Column Allocated Z/T - Z is the sum of sum allocated disk space by volumes, the storage: part in PVC definition:

longhorn storage resources

The second number in Allocated is the max size for volume scheduling, or Size multiplied with Storage Over Provisioning Percentage.

Yeees, Longhorn can do over-provisioning. And this is exactly for the situation when you create big PVC/PV but use little disk space inside them.

All the Numbers Explained

So, let's see again the last screenshot and decipher all the numbers:

longhorn dashboard

  • column Size - 293GB available on each node
  • column Used (first node) - 93 GB really used from 294 GB total (the above size plus reserved)
  • column Allocated (first node) - 238GB allocated in PVC/PV, 322 available for allocation. this 322 is 293 (size available) * 110% (we have 110 over provisioning percentage).

So, in conclusion, we are at about 75% usage, not under 50% as you may be mislead by the first screeshot. Not great, not terrible!

That's all, HTH.

If you wish the read the original article, check it out on github.

You can also check out my speech at Big Data Week on on-premise k8s storage options here.

About the Author

viorel anghel esolutions

Viorel Anghel has 20+ years of experience as an IT Professional, taking on various roles, such as Systems Architect, Sysadmin, Network Engineer, SRE, DevOps, and Tech Lead. He has a background in Unix/Linux systems administration, high availability, scalability, change, and config management. Also, Viorel is a RedHat Certified Engineer and AWS Certified Solutions Architect, working with Docker, Kubernetes, Xen, AWS, GCP, Cassandra, Kafka, and many other technologies. He is the Head of Cloud and Infrastructure at eSolutions.