Command Palette

Search for a command to run...

Назад к скиллам
скилл № 07378

longhorn

Use when the user asks about Longhorn on Kubernetes, Longhorn volumes and replicas, backup targets (S3 or NFS), recurring snapshots, disaster recovery…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить longhorn в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Longhorn Storage

Purpose

Define and enforce Longhorn distributed storage patterns for installation, volume management, backup, and DR.

Agent Protocol

Trigger

User request includes: longhorn, distributed storage, block storage, rancher longhorn, persistent volume, storageclass, backup target, disaster recovery, volume snapshot, longhorn replication.

Input Context

  • Kubernetes cluster version and size
  • Existing storage solution (if migrating)
  • Storage requirements (IOPS, capacity, replication factor)
  • Backup target (S3, NFS, SMB)
  • Network configuration (nodes, disks)

Output Artifact

A markdown document containing:

  • Longhorn installation method (Helm, Rancher Marketplace)
  • StorageClass configuration with parameters
  • Volume scheduling and replica strategy
  • Backup and disaster recovery setup
  • Performance tuning (disk selection, network, settings)
  • Monitoring and alerting configuration
  • Upgrade and maintenance procedures

Response Format

Produce the artifact directly. No preamble, no postamble, no explanations. No filler, no hedging, no transitions. Strip articles a/an/the where unambiguous. Compress output -- why use many token when few do trick.

Completion Criteria

  • Installation method selected with version
  • StorageClass defined with replica count and parameters
  • Backup target configured with schedule
  • DR volume strategy documented
  • Monitoring integration with Prometheus/Grafana

Max Response Length

4096 tokens

Workflow

Step 1: Install Longhorn via Helm

helm repo add longhorn https://charts.longhorn.io
helm repo update
helm install longhorn longhorn/longhorn \
  --namespace longhorn-system \
  --create-namespace \
  --set defaultSettings.replicaCount=3 \
  --set defaultSettings.defaultDataPath="/var/lib/longhorn" \
  --set persistence.defaultClassReplicaCount=3 \
  --version <tested-chart-version>   # pin the release you validated; check longhorn.io for supported versions

Pre-requisites:

Requirement Minimum Recommended
Kubernetes Per Longhorn release support matrix (recent 1.9/1.10 releases need ≥ 1.25) A currently supported Kubernetes minor
Nodes 3 (for HA) 3+
CPU per node 1 core 4 cores
RAM per node 2 GB 8 GB
Disk per node 40 GB (SSD) 200 GB (NVMe)
Network Node-to-node traffic for longhorn-manager (9500) and replica/engine data ports See Longhorn networking docs
iscsiadm Required --
open-iscsi Required --
nfs-client Required (for backup) --

Step 2: Configure StorageClasses

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: longhorn-fast
provisioner: driver.longhorn.io
allowVolumeExpansion: true
reclaimPolicy: Delete
volumeBindingMode: Immediate
parameters:
  numberOfReplicas: "3"
  staleReplicaTimeout: "30"
  fromBackup: ""
  fsType: ext4
  dataLocality: best-effort
  replicaAutoBalance: best-effort
  diskSelector: ""
  nodeSelector: ""
  recurringJobSelector: ""
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: longhorn-slow
provisioner: driver.longhorn.io
allowVolumeExpansion: true
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer
parameters:
  numberOfReplicas: "1"
  dataLocality: disabled
  replicaAutoBalance: disabled

Step 3: Apply Replica Strategy

Replicas Fault Tolerance Storage Cost Use Case
1 No tolerance 1x Dev/test, non-critical
2 1 node failure 2x Semi-critical (not recommended)
3 1 node failure 3x Production (default)
4+ 2+ node failures 4x+ Critical, multi-AZ

Step 4: Configure Backup

Backup Target Setup

# Settings -> Backup
backupTarget: "s3://my-backup-bucket@us-east-1/"
backupTargetCredentialSecret: longhorn-backup-secret
# Secret for S3 backup target
apiVersion: v1
kind: Secret
metadata:
  name: longhorn-backup-secret
  namespace: longhorn-system
stringData:
  AWS_ACCESS_KEY_ID: "AKIA..."
  AWS_SECRET_ACCESS_KEY: "..."
  AWS_ENDPOINTS: "https://s3.us-east-1.amazonaws.com"

Recurring Job

# Recurring backup schedule
apiVersion: longhorn.io/v1beta2
kind: RecurringJob
metadata:
  name: daily-backup
  namespace: longhorn-system
spec:
  cron: "0 2 * * *"
  task: backup
  retain: 7
  concurrency: 2
  labels:
    backup-type: daily

Step 5: Set Up Disaster Recovery

DR Volume

apiVersion: longhorn.io/v1beta2
kind: Volume
metadata:
  name: dr-volume-orders
  namespace: longhorn-system
spec:
  fromBackup: "s3://backup-bucket@us-east-1/backup/orders-v1"
  numberOfReplicas: 3
  staleReplicaTimeout: 30
  nodeSelector:
    region: dr-region

DR Process:

  1. Create DR volume from backup in DR cluster
  2. Activate DR volume when primary down
  3. Point applications to DR volume
  4. When primary recovered, reverse sync

Step 6: Tune Performance

| Parameter | Set

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/longhorn-advanced.md
  • references/longhorn-backup.md
  • references/longhorn-config.md
  • references/longhorn-disaster-recovery.md
  • references/longhorn-fundamentals.md
  • references/longhorn-manager.md
  • references/longhorn-perf.md
  • references/longhorn-performance-tuning.md

FAQ

Что делает скилл longhorn?

Use when the user asks about Longhorn on Kubernetes, Longhorn volumes and replicas, backup targets (S3 or NFS), recurring snapshots, disaster recovery volumes, the V2 data engine, Longhorn performance, or degraded volumes. Produces Longhorn install, StorageClass and backup configs. Not for Ceph or SAN design (use storage-infrastructure).

Как установить скилл longhorn?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл longhorn запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить longhorn с