Introducing longhornctl: The Command-Line Interface for SUSE Storage

Share
Share

Why a CLI?

In the world of Kubernetes storage, reliability is essential — but flexibility and automation are what make a system shine.

SUSE Storage already provides a powerful UI and a CRD-driven control plane. Yet for routine operations like troubleshooting, installation prep, or maintenance, many users still find themselves editing YAMLs, navigating the UI, or writing ad-hoc scripts.

That’s where longhornctl comes in — a unified, purpose-built command-line interface designed to make SUSE Storage simpler to manage, easier to automate, and better integrated into your workflows.

The idea originated in issue#7927, which highlighted the need for a CLI to handle non-CRD tasks such as:

“install prerequisites, preflight check before installation/upgrade, runtime periodical check, headless support bundle download, check known issue mentioned in the knowledge pages, etc. are only partially operated through UI.”

This vision was later shaped into the Longhorn Command-Line Interface Enhancement Proposal (2024-04-03), laying the foundation for longhornctl.

A Strong Start

longhornctl may still be young, but its foundation is solid.

The core framework, architecture, and command workflow are already in place — setting the stage for expansion. Even in its early form, it brings real value to users managing installations, performing preflight validations, running tasks, or recovering data.

How It Works

At its core, longhornctl uses a dual-binary architecture designed for both local and cluster-wide operations.

  • longhornctl: The main CLI, typically run from your local machine. It orchestrates actions by deploying a DaemonSet inside your cluster.
  • longhornctl-local: Runs as part of that DaemonSet and handles node-level or host-specific operations.

This design makes longhornctl scalable, scriptable, and automation-friendly.

What You Can Do Today

If you are running SUSE Storage v1.7.0 or newer, longhornctl is ready to help you:

  • Validate cluster readiness before installation or upgrade
  • Automatically install prerequisites across all nodes
  • Recover data from replica exports during cluster issues
  • Automate maintenance tasks like volume trimming

While the feature set is still growing, longhornctl already saves time and reduces manual effort — especially for users managing large or automated environments.

Current Status

The core command framework and initial features are already available:

  • Prepare – Run preflight checks and installation validation
  • Operate – Perform tasks like volume trimming and replica export
  • Troubleshoot – Inspect replicas and collect diagnostic data
  • Develop – Generate CLI documentation automatically

Explore the full command reference here.

The Road Ahead

longhornctl is more than just a new tool – it’s the beginning of a more automated SUSE Storage experience.

Future versions will expand its scope, transforming it from a helpful utility into a central operational hub for SUSE Storage management, with upcoming features like system diagnostics.

The goal? To make managing and troubleshooting SUSE Storage easier and faster – whether you’re running a small cluster or managing storage at scale.

Get Involved

longhornctl is open source, and the community is at its heart. You can help shape what comes next:

  1. Download the latest build from the GitHub Releases page.
  2. Read the documentation at https://github.com/longhorn/cli.
  3. Report bugs or request features on the Longhorn issue tracker.
  4. Join the conversation in GitHub Discussions or on the Longhorn Slack.
  5. Contribute code, documentation, or ideas – every improvement matters.

longhornctl is just getting started — and with the support of the community, it’s paving the way for a simpler, more automated SUSE Storage experience.

Share
(Visited 1 times, 1 visits today)
Avatar photo
57 views
Chin-Ya Huang Staff Software Engineer at SUSE https://github.com/c3y1huang