{"id":13582119,"url":"https://github.com/openebs/zfs-localpv","last_synced_at":"2025-04-13T13:11:50.459Z","repository":{"id":35682176,"uuid":"203545818","full_name":"openebs/zfs-localpv","owner":"openebs","description":"Dynamically provision Stateful Persistent Node-Local Volumes \u0026 Filesystems for Kubernetes that is integrated with a backend ZFS data storage stack.","archived":false,"fork":false,"pushed_at":"2025-03-25T07:28:51.000Z","size":32895,"stargazers_count":471,"open_issues_count":34,"forks_count":111,"subscribers_count":25,"default_branch":"develop","last_synced_at":"2025-04-05T03:03:22.862Z","etag":null,"topics":["csi","csi-driver","kubernetes","kubernetes-local-pv","kubernetes-local-storage","kubernetes-storage","openebs","openebs-storage","storage","storage-api","storage-engine","zfs","zfs-snapshots","zfsonlinux"],"latest_commit_sha":null,"homepage":"https://openebs.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openebs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":"GOVERNANCE.md","roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-21T08:57:13.000Z","updated_at":"2025-04-04T12:51:08.000Z","dependencies_parsed_at":"2022-07-13T15:59:45.670Z","dependency_job_id":"c8284032-0ce2-4104-bda2-3d2adc5fab5c","html_url":"https://github.com/openebs/zfs-localpv","commit_stats":{"total_commits":376,"total_committers":57,"mean_commits":"6.5964912280701755","dds":0.5478723404255319,"last_synced_commit":"51972c4a5502abeb12a78460a87162c9bb75073b"},"previous_names":[],"tags_count":112,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openebs%2Fzfs-localpv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openebs%2Fzfs-localpv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openebs%2Fzfs-localpv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openebs%2Fzfs-localpv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openebs","download_url":"https://codeload.github.com/openebs/zfs-localpv/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248717238,"owners_count":21150389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csi","csi-driver","kubernetes","kubernetes-local-pv","kubernetes-local-storage","kubernetes-storage","openebs","openebs-storage","storage","storage-api","storage-engine","zfs","zfs-snapshots","zfsonlinux"],"created_at":"2024-08-01T15:02:26.256Z","updated_at":"2025-04-13T13:11:50.438Z","avatar_url":"https://github.com/openebs.png","language":"Go","funding_links":[],"categories":["Go","kubernetes","How to Use OpenZFS with Kubernetes for Persistent Storage (ZFS on K8S)"],"sub_categories":["ZFS other tools"],"readme":"## OpenEBS Local PV ZFS\n\n[![CNCF Status](https://img.shields.io/badge/cncf%20status-sandbox-blue.svg)](https://www.cncf.io/projects/openebs/)\n[![LICENSE](https://img.shields.io/github/license/openebs/openebs.svg)](./LICENSE)\n[![Build Status](https://github.com/openebs/zfs-localpv/actions/workflows/build.yml/badge.svg)](https://github.com/openebs/zfs-localpv/actions/workflows/build.yml)\n[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fopenebs%2Fzfs-localpv.svg?type=shield\u0026issueType=license)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopenebs%2Fzfs-localpv?ref=badge_shield\u0026issueType=license)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/3523/badge)](https://www.bestpractices.dev/projects/3523)\n[![Slack](https://img.shields.io/badge/chat-slack-ff1493.svg?style=flat-square)](https://kubernetes.slack.com/messages/openebs/)\n[![Community Meetings](https://img.shields.io/badge/Community-Meetings-blue)](https://us05web.zoom.us/j/87535654586?pwd=CigbXigJPn38USc6Vuzt7qSVFoO79X.1)\n[![Go Report](https://goreportcard.com/badge/github.com/openebs/zfs-localpv)](https://goreportcard.com/report/github.com/openebs/zfs-localpv)\n[![CLOMonitor](https://img.shields.io/endpoint?url=https://clomonitor.io/api/projects/cncf/openebs/badge)](https://clomonitor.io/projects/cncf/openebs)\n[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/openebs)](https://artifacthub.io/packages/helm/openebs/openebs)\n\n## Overview\n\nOpenEBS Local PV ZFS is a [CSI](https://github.com/container-storage-interface/spec) plugin for implementation of [ZFS](https://en.wikipedia.org/wiki/ZFS) backed persistent volumes for Kubernetes. It is a local storage solution, which means the device, volume and the application are on the same host. It doesn't contain any dataplane, i.e only its simply a control-plane for the kernel zfs volumes. It mainly comprises of two components which are implemented in accordance to the CSI Specs:\n\n1. CSI Controller - Frontends the incoming requests and initiates the operation.\n2. CSI Node Plugin - Serves the requests by performing the operations and making the volume available for the initiator.\n\n## Why OpenEBS Local PV ZFS?\n\n1. Lightweight, easy to set up storage provisoner for host-local volumes in k8s ecosystem.\n2. Makes ZFS stack available to K8s, allowing end users to use the ZFS functionalites like snapshot, restore, clone, thin provisioning, resize, encryption, compression, dedup, etc for their Persistent Volumes.\n3. Cloud native, i.e based on CSI spec, so developed to run on K8s.\n\n## Architecture\n\nLocalPV refers to storage that is directly attached to a specific node in the Kubernetes cluster. It uses locally available disks (e.g., SSDs, HDDs) on the node.\n\n\u003cb\u003eUse Case\u003c/b\u003e: Ideal for workloads that require low-latency access to storage or when data locality is critical (e.g., databases, caching systems).\n\n#### Characteristics:\n\n- \u003cb\u003eNode-bound\u003c/b\u003e: The volume is tied to the node where the disk is physically located.\n- \u003cb\u003eNo replication\u003c/b\u003e: Data is not replicated across nodes, so if the node fails, the data may become inaccessible.\n- \u003cb\u003eHigh performance\u003c/b\u003e: Since the storage is local, it typically offers lower latency compared to network-attached storage.\n\nThe diagram below depicts the mapping to the host disks, the ZFS stack on top of the disks and the kubernetes persistent volumes to be consumed by the workload. Local PV ZFS CSI Controller upon creation of the Persistent Volume Claim, creates a ZFSVolume CR, which emits an event for Local PV ZFS CSI Node Plugin to create the zvol/dataset. When workloads are scheduled the Local PV ZFS CSI Node Plugin makes this zvol/dataset available via a mount point on the host.\n\n```mermaid\ngraph TD;\n  subgraph Node2[\"Node 2\"]\n    subgraph K8S_NODE1[\" \"]\n      N1_PV1[\"PV\"] --\u003e N1_APP1[\"APP\"]\n      N1_PV2[\"PV\"] --\u003e N1_APP2[\"APP\"]\n    end\n    subgraph LVM_Stack2[\"ZFS Stack\"]\n      V1_1 --\u003e L1_1[\"ZVOL\"]\n      V1_1 --\u003e L3_1[\"ZVOL\"]\n      L1_1 --\u003e N1_PV1 \n      L3_1 --\u003e N1_PV2\n    end\n    subgraph Blockdevices1[\" \"]\n      D1[\"/dev/sdc\"] --\u003e V1_1[\"ZPOOL\"]\n      D2[\"/dev/sdb\"] --\u003e V1_1[\"ZPOOL\"]\n    end\n  end\n\n  subgraph Node1[\"Node 1\"]\n    subgraph K8S_NODE2[\" \"]\n      N2_PV1[\"PV\"] --\u003e N2_APP1[\"APP\"]\n    end\n    subgraph LVM_Stack1[\"ZFS Stack\"]\n      V2_2 --\u003e Z2_2[\"ZVOL\"]\n      Z2_2 --\u003e N2_PV1 \n    end\n    subgraph Blockdevices2[\" \"]\n      D3[\"/dev/sdb\"] --\u003e V2_2[\"ZPOOL\"]\n    end\n  end\n\n  classDef pv fill:#FFCC00,stroke:#FF9900,color:#000;\n  classDef app fill:#99CC00,stroke:#66CC00,color:#000;\n  classDef disk fill:#FF6666,stroke:#FF3333,color:#000;\n  classDef zfs fill:#99CCFF,stroke:#6699FF,color:#000;\n\n  class N1_PV1,N1_PV2,N2_PV1 pv;\n  class N1_APP1,N1_APP2,N2_APP1 app;\n  class D1,D2,D3 disk;\n  class V1_1,V2_2 zfs;\n  class L1_1,L3_1,Z2_2 zfs;\n\n```\n\n## Supported System\n\n\u003e | Name | Version |\n\u003e | :--- | :--- |\n\u003e | K8S | 1.23+ |\n\u003e | Distro | Alpine, Arch, CentOS, Debian, Fedora, NixOS, SUSE, RHEL, Ubuntu |\n\u003e | Kenel | oldest supported kernel is 2.6.32 |\n\u003e | ZFS | 0.7, 0.8, 2.2.3 |\n\u003e | Memory | ECC Memory is highly recommended |\n\u003e | RAM | 8GiB for best perf with Dedup enabled. (Will work with 2GiB or less without Dedup) |\n\nCheck the [features](./docs/features.md) supported for each k8s version.\n\n## Documents\n\n- [Prerequisites](./docs/quickstart.md#prerequisites)\n- [Quickstart](./docs/quickstart.md#setup)\n- [Developer Setup](./docs/developer-setup.md#development-workflow)\n- [Testing](./docs/developer-setup.md#testing)\n- [Contibuting Guidelines](./CONTRIBUTING.md)\n- [Governance](./GOVERNANCE.md)\n- [Changelog](./CHANGELOG.md)\n- [Release Process](./RELEASE.md)\n\n## Features\n\n- [x] Access Modes\n    - [x] ReadWriteOnce\n    - ~~ReadOnlyMany~~\n    - ~~ReadWriteMany~~\n- [x] Volume modes\n    - [x] `Filesystem` mode\n    - [x] `Block` mode\n- [x] Supports fsTypes: `ext4`, `btrfs`, `xfs`, `zfs`\n- [x] Volume metrics\n- [x] Snapshot\n    - [x] [Create](docs/snapshot.md)\n    - [x] [Restore](docs/clone.md#create-clone-from-snapshot)\n- [x] [Clone](docs/clone.md#create-clone-from-volume)\n- [x] [Volume Resize](docs/resize.md)\n- [x] [Raw Block Volume](docs/raw-block-volume.md)\n- [x] [Backup/Restore](docs/backup-restore.md)\n- [ ] Ephemeral inline volume\n\n## Dev Activity dashboard\n\n![Alt](https://repobeats.axiom.co/api/embed/201b3c4bdd37f67c41fae1ea295d8a1887fba654.svg \"Repobeats analytics image\")\n\n## License compliance\n\n[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fopenebs%2Fzfs-localpv.svg?type=large\u0026issueType=license)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopenebs%2Fzfs-localpv?ref=badge_large\u0026issueType=license)\n\n## OpenEBS is a [CNCF Sandbox Project](https://www.cncf.io/projects/openebs)\n\n![OpenEBS is a CNCF Sandbox Project](https://github.com/cncf/artwork/blob/main/other/cncf/horizontal/color/cncf-color.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenebs%2Fzfs-localpv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenebs%2Fzfs-localpv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenebs%2Fzfs-localpv/lists"}