Viewing Workloads that Use a Volume

Now users can identify current workloads or workload history for existing Longhorn persistent volumes (PVs) and their history of being bound to persistent volume claims (PVCs).

From the Longhorn UI, go to the Volume tab. Each Longhorn volume is listed on the page. The Attached To column displays the name of the workload using the volume. If you click the workload name, you will be able to see more details, including the workload type, pod name, and status.

Workload information is also available on the Longhorn volume detail page. To see the details, click the volume name:

  1. State: attached
  2. ...
  3. Namespace:default
  4. PVC Name:longhorn-volv-pvc
  5. PV Name:pvc-0edf00f3-1d67-4783-bbce-27d4458f6db7
  6. PV Status:Bound
  7. Pod Name:teststatefulset-0
  8. Pod Status:Running
  9. Workload Name:teststatefulset
  10. Workload Type:StatefulSet

History

After the workload is no longer using the Longhorn volume, the volume detail page shows the historical status of the most recent workload that used the volume:

  1. Last time used by Pod: a few seconds ago
  2. ...
  3. Last Pod Name: teststatefulset-0
  4. Last Workload Name: teststatefulset
  5. Last Workload Type: Statefulset

If these fields are set, they indicate that currently no workload is using this volume.

When a PVC is no longer bound to the volume, the following status is shown:

  1. Last time bound with PVC:a few seconds ago
  2. Last time used by Pod:32 minutes ago
  3. Last Namespace:default
  4. Last Bounded PVC Name:longhorn-volv-pvc

If the Last time bound with PVC field is set, it indicates currently there is no bound PVC for this volume. The related fields will show the most recent workload using this volume.


© 2019-2023 Longhorn Authors | Documentation Distributed under CC-BY-4.0

© 2023 The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.