Longhorn Drive
You set up a longhorn drive by mounting a local disk on your cluster node. Next, you register that disk path inside the storage manager so pods can claim space. Most engineering teams automate this step when they add new servers to their cluster. Yet teams often give admins broad host roles to fix broken disks or check volumes. Those wide permissions let anyone on the team run risky commands across production storage nodes. How a longhorn drive works in your cluster A longhorn drive acts as t
Drive: the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
You set up a longhorn drive by mounting a local disk on your cluster node. Next, you register that disk path inside the storage manager so pods can claim space. Most engineering teams automate this step when they add new servers to their cluster. Yet teams often give admins broad host roles to fix broken disks or check volumes. Those wide permissions let anyone on the team run risky commands across production storage nodes.
How a longhorn drive works in your cluster
A longhorn drive acts as the physical storage pool for your Kubernetes volumes. Each node in your cluster can offer one or more folders or raw disks. The storage manager watches these paths and splits them into small data replicas. When a pod asks for storage, the system builds a volume from these replicas. It spreads copies across several nodes so one dead server will not lose data.
To add a disk, an admin formats and mounts a drive on the Linux host. Then the admin tells the cluster role to schedule replicas onto that new path. Kubernetes role rules decide who can create, resize, or delete these volume claims. Host login keys decide who can log into the Linux server to fix disk errors. Both layers must work together to keep pod data safe and online.
What native storage roles solve and what they miss
Native cluster roles and host keys do a good job at the front door. They decide which engineer or app can log in and view storage objects. You can limit a developer so they only see volumes in their own namespace. You can also restrict who can add or drain a disk on a node.
Still, login checks stop working once an engineer opens an active shell or database session. A role cannot tell a safe status check apart from a destructive delete command. If an admin mounts a volume to debug a database, they get full data access. The native setup does not mask card numbers, emails, or phone numbers in query results. It also fails to log the exact commands an engineer runs inside that live session.
Drive: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Reducing risk during storage maintenance
Teams need a safer way to handle day-to-day disk fixes and data checks. Instead of handing out permanent host keys, teams should control actions at the command level. Every query or shell command should pass through a review step before it runs. Sensitive fields like national IDs should get rewritten in results before reaching the screen. Detailed logs should record who ran which command and when they ran it. This approach keeps storage nodes stable while giving engineers the tools to fix bugs fast.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
Can I use the root disk as a longhorn drive?
Yes, the system uses a folder on the root disk by default during setup. For production apps, mount a separate dedicated disk so logs do not fill your storage.
How do I safely remove a disk from a node?
First, turn off scheduling for that disk and wait for replicas to move elsewhere. Once the replica count hits zero, you can remove the disk record and unmount it.
How can teams protect database data stored on cluster volumes?
Limit direct host shell logins and require engineers to query databases through controlled sessions. Use data masking rules to rewrite emails and card numbers in live query results.
Related guides
In this post