---
title: "OpenEBS-backed local storage for Aerospike on Kubernetes"
description: "Configure OpenEBS with LVM local PV storage for Aerospike clusters running on Kubernetes."
---

# OpenEBS-backed local storage for Aerospike on Kubernetes

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

OpenEBS is an open-source platform that enables cloud-native local or distributed persistent volume (PV) storage for Kubernetes. It is a platform-agnostic alternative to Amazon Elastic Block Store.

For more about OpenEBS, see the [official OpenEBS documentation](https://openebs.io/docs/), particularly the [Prerequisites](https://openebs.io/docs/user-guides/prerequisites).

## Planning your deployment

OpenEBS supports several types of volumes. For Aerospike clusters, use Logical Volume Manager (LVM) local PV storage volumes. OpenEBS processes nodes with LVM set up on them to create storage pools, enabling dynamic storage allocation and aggregation across devices.

::: note
Aerospike strongly discourages using replicated volumes. Aerospike already implements replication at the application level, and the additional replication could severely impact performance and reliability.

OpenEBS removed support for Local PV (Device) volumes in version 3.5. See previous versions of this AKO documentation page for instructions on setting up these legacy volumes.
:::

With an LVM local PV, Aerospike can create any number of persistent volume claims (PVCs). The aggregate size should be less than the size of the volume group.

## Install OpenEBS with Helm

1.  Run the following commands to install OpenEBS on your Kubernetes cluster with default settings.
    
    Terminal window
    
    ```bash
    helm repo add openebs https://openebs.github.io/openebs \
    
    && helm repo update \
    
    && helm install openebs --namespace openebs openebs/openebs --set engines.replicated.mayastor.enabled=false --create-namespace
    ```
    
2.  Run `kubectl get pod` to verify that one `lvm-controller` pod and the `lvm-node` DaemonSet are running. You may see additional pods depending on your setup.
    
    Terminal window
    
    ```shell
    kubectl get pod -n openebs
    ```
    
    ```text
    NAME                                             READY   STATUS    RESTARTS     AGE
    
    openebs-localpv-provisioner-6bd66f8598-4zt77     1/1     Running   2 (8d ago)   26d
    
    openebs-lvm-localpv-controller-6bbd64786-pt2r7   5/5     Running   0            26d
    
    openebs-lvm-localpv-node-2bnd5                   2/2     Running   0            26d
    
    openebs-lvm-localpv-node-7d2mg                   2/2     Running   0            26d
    
    openebs-lvm-localpv-node-gz5wv                   2/2     Running   0            26d
    ```
    

[The OpenEBS installation documentation](https://openebs.io/docs/quickstart-guide/installation#installation-via-helm) includes information about customizing these settings.

## Set up an LVM local PV

The following steps guide you through a default setup process. See the [OpenEBS LVM Installation](https://openebs.io/docs/user-guides/local-storage-user-guide/local-pv-lvm/lvm-installation) documentation for a full list of options.

1.  Run `lvs` to list all volumes and verify that you have `lvm2` installed.
    
2.  Use `vgcreate` to set up the volume group that the LVM driver uses to provision volumes.
    
    Run the following commands as a privileged user. This example creates two physical volumes and adds them to the `lvmvg` volume group.
    
    Terminal window
    
    ```shell
    pvcreate /dev/sdb1
    
    pvcreate /dev/sdc1
    
    vgcreate lvmvg /dev/sdb1 /dev/sdc1
    ```
    
3.  Create a storage class with the `provisioner` field set to `local.csi.openebs.io`.
    
    ```yaml
    apiVersion: storage.k8s.io/v1
    
    kind: StorageClass
    
    metadata:
    
      name: openebs-lvmpv
    
    parameters:
    
      storage: "lvm"
    
      volgroup: "lvmvg"
    
    provisioner: local.csi.openebs.io
    
    volumeBindingMode: WaitForFirstConsumer
    ```
    
4.  Install an Aerospike cluster by setting `storageClass` to the storage class you created in the previous step so Kubernetes can provision a local volume PVC.
    
    ```yaml
    volumes:
    
          - name: workdir
    
            aerospike:
    
              path: /opt/aerospike
    
            source:
    
              persistentVolume:
    
                storageClass: ssd
    
                volumeMode: Filesystem
    
                size: 1Gi
    
          - name: ns1
    
            aerospike:
    
              path: /test/dev/xvdf1
    
            source:
    
              persistentVolume:
    
                storageClass: openebs-lvmpv # Storage class name
    
                volumeMode: Block
    
                size: 5Gi
    ```
    

You should now have a working Aerospike cluster with OpenEBS-backed local storage.