Skip to main content

This section explains the prerequisites and installation requirements to set up OpenEBS Local Persistent Volumes (PV) backed by the ZFS Storage.

Prerequisites#

Before installing the ZFS driver, make sure your Kubernetes Cluster must meet the following prerequisites:

  1. All the nodes must have zfs utils installed.
  2. ZPOOL has been set up for provisioning the volume.

Setup#

All the nodes should have zfsutils-linux installed. We should go to each node of the cluster and install zfs utils:

$ apt-get install zfsutils-linux

Go to each node and create the ZFS Pool, which will be used for provisioning the volumes. You can create the Pool of your choice, it can be striped, mirrored or raidz pool.

If you have the disk (say /dev/sdb), then you can use the below command to create a striped pool:

$ zpool create zfspv-pool /dev/sdb

You can also create mirror or raidz pool as per your need. See here for more information.

If you do not have the disk, then you can create the zpool on the loopback device which is backed by a sparse file. Use this for testing purpose only.

$ truncate -s 100G /tmp/disk.img
$ zpool create zfspv-pool `losetup -f /tmp/disk.img --show`

Once the ZFS Pool is created, verify the pool via zpool status command, you should see the command similar as below:

$ zpool status
pool: zfspv-pool
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
zfspv-pool ONLINE 0 0 0
sdb ONLINE 0 0 0
errors: No known data errors

Configure the custom topology keys (if needed). This can be used for many purposes like if we want to create the PV on nodes in a particular zone or building. We can label the nodes accordingly and use that key in the storageclass for making the scheduling decision.

Installation#

For installation instructions, see here.

Support#

If you encounter issues or have a question, file a Github issue, or talk to us on the #openebs channel on the Kubernetes Slack server.

See Also#

Was this page helpful? We appreciate your feedback