<p>I am playing with Kubespray and want to add GlusterFS persistent volumes. My inventory.ini looks like this:</p>

<pre><code>[all] 
k8s-master    ansible_host=x.x.x.x
k8s-node-1    ansible_host=y.y.y.y disk_volume_device_1=/media/125GB_HDD.img

[kube-master] 
k8s-master

[etcd] 
k8s-master

[kube-node] 
k8s-master 
k8s-node-1

[k8s-cluster:children] 
kube-node 
kube-master

[gfs-cluster] 
k8s-node-1

[network-storage:children] 
gfs-cluster
</code></pre>

<p>But I would like to add more devices than just <code>disk_volume_device_1</code>. I tried <code>disk_volume_device_2=/media/20GB_HDD.img</code> but it did not work.</p>

Mariyo
<p><a href="https://kubespray.io/#/" rel="nofollow noreferrer">Kubespray</a> is for deploying a cluster.</p>

<p>If you want to change the capacity of deployed <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes" rel="nofollow noreferrer"><code>Persistent Volumes</code></a>, you can edit (<code>kubectl edit pv &lt;name_of_pv&gt;</code>) the <code>PersistenVolume.spec</code> and change the <code>capacity.storage</code> value.</p>

<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: glusterfs 
spec:
  capacity:
      storage: "150Gi"
  accessModes:
    - ReadWriteMany
  glusterfs:
    endpoints: glusterfs
    path: gluster
    readOnly: false
  persistentVolumeReclaimPolicy: Retain
</code></pre>

<p>I recommend reading <a href="https://kubernetes.io/blog/2018/07/12/resizing-persistent-volumes-using-kubernetes/" rel="nofollow noreferrer">Resizing Persistent Volumes using Kubernetes</a>.</p>

<p>Also you can read these docs <a href="https://github.com/kubernetes-sigs/kubespray/tree/master/contrib/network-storage/glusterfs" rel="nofollow noreferrer">Deploying a Kubespray Kubernetes Cluster with GlusterFS</a>.</p>

<p>If you would be interested in using <a href="https://github.com/heketi/heketi" rel="nofollow noreferrer"><code>Heketi</code></a>, please check this guide <a href="https://medium.com/wescale/increase-glusterfs-volume-size-in-kubernetes-752e087bf065" rel="nofollow noreferrer">Increase GlusterFS volume size in Kubernetes</a>.</p>
