← All changes
Longhorn UI · Developed by us

Show the shards of a sharded V2 volume

Longhorn's V2 data engine can now shard a volume. It splits the data into data and parity pieces (erasure coding) and puts each piece on a disk on a different node, so no node holds a full copy. The UI didn't know about this: a sharded volume's page showed an empty Replicas card and the list showed "0 / 1". We added a read-only view of the shards. As the Longhorn maintainers asked, sharded volumes are still set up outside the UI.

Built on a branch · no PR yet Issue 11689 ↗ Backend issue 1061 ↗ Branch ↗
What changes for the user
Needs a decision

The flow

1

The volume page shows the shards

The empty Replicas card becomes a Shards card, and Volume Details says how the data is split.

Volume page before and after: empty Replicas card becomes a Shards card with three tiles; four new rows in Volume Details
This volume has 2 data shards and 1 parity shard, each on a different node. Before, the page didn't say where its data was. Hovering a shard's title shows its full name, and hovering the disk shows the disk's ID.
2

Problems are easy to spot

The tiles use the same colours as replica tiles: blue when healthy, red when failed, yellow while rebuilding.

Shards card with one healthy, one failed and one rebuilding shard with a progress bar
Our test volume stayed healthy. To show these states we changed the shard data in the browser and didn't break a disk on the shared cluster. With one parity shard, this volume can lose one shard and keep working.
3

The volume list counts shards

In the optional Replicas column, a sharded volume shows its healthy shards out of the total.

Volume list before and after: 0 / 1 becomes 3 / 3 shards for the sharded volume
Before, "0 / 1" made a healthy sharded volume look like it had lost its only replica. The other volumes in the list don't change.

Video (optional)

0:00 Before · 0:19 After · 0:45 Failed and rebuilding shards (simulated) · 1:00 Volume list

Notes