TopoLVM is a CSI plugin using LVM for Kubernetes. It can be considered as a specific implementation of local persistent volumes using CSI and LVM.
The team presented the motivation and implementation of TopoLVM at KubeCon Europe 2020: https://kccnceu20.sched.com/event/ZerD
Join our community on Slack: Invitation link
- Project Status: Testing for production
- Conformed CSI version: 1.5.0
- Kubernetes: 1.23, 1.22, 1.21
- Node OS: Linux with LVM2 (*1)
- Filesystems: ext4, xfs
*1 The host's Linux Kernel must be v4.9 or later which supports rmapbt
and reflink
, if you use xfs filesystem with an official docker image.
- Dynamic provisioning: Volumes are created dynamically when
PersistentVolumeClaim
objects are created. - Raw block volume: Volumes are available as block devices inside containers.
- Ephemeral inline volume (deprecated): Volumes can be directly embedded in the Pod specification.
- Topology: TopoLVM uses CSI topology feature to schedule Pod to Node where LVM volume exists.
- Extended scheduler: TopoLVM extends the general Pod scheduler to prioritize Nodes having larger storage capacity.
- Volume metrics: Usage stats are exported as Prometheus metrics from
kubelet
. - Volume Expansion: Volumes can be expanded by editing
PersistentVolumeClaim
objects. - Storage capacity tracking: You can enable Storage Capacity Tracking mode instead of using topolvm-scheduler.
- Snapshot: When we want it.
A diagram of components is available in docs/design.md.
This repository contains these programs:
topolvm-controller
: CSI controller service.topolvm-scheduler
: A scheduler extender for TopoLVM.topolvm-node
: CSI node service.lvmd
: gRPC service to manage LVM volumes.
lvmd
is a standalone program that should be run on Node OS as a systemd service.
Other programs are packaged into a container image.
A demonstration of TopoLVM running on kind (Kubernetes IN Docker) is available at example directory.
For production deployments, see deploy/README.md.
User manual is at docs/user-manual.md.
Deprecated: If you want to use TopoLVM on Rancher/RKE, see docs/deprecated/rancher.md.
docs directory contains documents about designs and specifications.
Docker images are available on Quay.io
- TopoLVM currently supports Ephemeral inline volume, but it has a limitation that capacity tracking is not supported. As of kubernetes 1.21, Generic ephemeral volume is introduced and it has no such limitation. So we will replace CSI ephemeral volume with Generic ephemeral volume, and deprecate CSI ephemeral volume.
- TopoLVM currently uses Pod security policy, but it has been deprecated since Kubernetes 1.21, and will be deleted in Kubernetes 1.25. So it is also deprecated in TopoLVM.