Skip to content
/ viriumd Public

Viriumd is an API server that manages LVM and iSCSI-based volumes for use with Kubernetes CSI drivers. It exposes a RESTful API for volume creation, deletion, and snapshots.

License

Notifications You must be signed in to change notification settings

virer/viriumd

Repository files navigation

Virium

Viriumd is a lightweight storage API built on top of LVM (Logical Volume Manager) and iSCSI (Internet Small Computer Systems Interface) using targetcli-fb.

⚠️ Virium is not a scalable or highly available storage solution by default. It is designed for homelab, testing, or demo environments.

That said, a somewhat highly available setup could be achieved using tools like Linbit DRBD for replication and keepalived with VRRP for virtual IP failover.

✨ Motivation & Goals

I created Virium because I found most Kubernetes external storage drivers too complex or oddly implemented for my homelab needs. I wanted:

  • A simple solution
  • Built on solid, well-known tools (LVM + iSCSI via targetcli-fb)
  • An opportunity to learn and practice Golang from scratch

This project is not production-ready and is not intended to be, at least in its early stages.

🔧 Features (current or planned)

  • REST API for managing LVM volumes and exposing them via iSCSI
  • CSI driver support for Kubernetes integration
  • Snapshot support via LVM
  • Simple YAML-based configuration
  • Systemd + RPM packaging

🚫 Not Included (by design)

  • High-availability or failover (though possible with DRBD + keepalived)
  • Multi-node storage orchestration

🧪 Ideal Use Cases

  • Homelabs
  • Learning/experimentation
  • Demo environments
  • Lightweight Kubernetes clusters with external CSI driver

Requierements

Firewall:

  • open TCP port 8787 (default customizable port)

Packages:

  • lvm2
  • targetcli
  • target-restore

Installation

curl --output viriumd.tar.gz -L https://github.com/virer/viriumd/releases/download/v0.2.6/viriumd_0.2.6_linux_amd64.tar.gz
tar -vzxf viriumd.tar.gz

Usage

./viriumd -v=2

Manual build

./scripts/buid.sh

Example

Create volume

curl -X POST http://localhost:8787/api/volumes/create \
  -H "Content-Type: application/json" \
  -u "virium_api_username:virium_api_password" \
  -d '{"initiator_name":"iqn.2025-04.net.virer.virium.test","capacity":10737418240}' # 10 GiB

Delete volume

curl -X DELETE http://localhost:8787/api/volumes/delete \
    -H "Content-Type: application/json" \
    -u "virium_api_username:virium_api_password" \
    -d '{"volume_id":"47eb27cd-6824-4977-90fc-c62a21b11dfb"}'

About

Viriumd is an API server that manages LVM and iSCSI-based volumes for use with Kubernetes CSI drivers. It exposes a RESTful API for volume creation, deletion, and snapshots.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published