gluster / gluster-kubernetes

GlusterFS Native Storage Service for Kubernetes
Apache License 2.0
875 stars 389 forks source link

Can glusterfs be installed on a single machine? #563

Closed booboothefool closed 5 years ago

booboothefool commented 5 years ago

Have been trying to use the following:

storage-glusterfs:
  nodes:
    - ip: 169.xx.xx.xx
      devices:
         - /dev/disk/gluster-disk-1
#      devices:
#        - /dev/disk/gluster-disk-1
#        - <link path>/<symlink of device bbb>
#    - ip: <storage_node_n_IP_address>
#      devices:
#        - <link path>/<symlink of device ccc>
#    - ip: <storage_node_o_IP_address>
#      devices:
#        - <link path>/<symlink of device ddd>
  storageClass:
    create: true
    name: glusterfs
    isDefault: true
    volumeType: replicate:1

However when trying to claim:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pv-claim
spec:
  storageClassName: glusterfs
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi

It fails saying "requires more than 1 replica".

I'd like to try out a one machine/one node setup for learning/evaluation purposes.

phlogistonjohn commented 5 years ago

I can't speak much to that helm chart but yes, glusterfs+heketi can be used to create volumes on a single node. You must set it to only request volumes without replication.

Since you're using ibm cloud stuff this should be close to what you need: https://www.ibm.com/support/knowledgecenter/SSBS6K_2.1.0.3/installing/storage_settings.html

I couldn't find a way to directly link to a subsection, search in there for the 'volumetype' option. You'll want to use "none" as that will create volumes with a single brick (and no ha/redundancy).

booboothefool commented 5 years ago

@phlogistonjohn It worked! I had thought replicate:1 was the same as none, but that seems to not be the case. Thank you!