I have two nodes (running Armbian Bionic, based on Ubuntu 18.04) set up to create a distributed Gluster storage, provisioned via Ansible.

I think the relevant part of the Ansible playbook is this:

    - name: Configure gluster volume
        state: present
        name: "{{ gluster_volume_name }}"
        brick: "{{ gluster_brick_dir }}"
        cluster: "{{ groups.glustergroup | join(',') }}"
        host: "{{ inventory_hostname }}"
        force: yes
      run_once: true

Where glustergroup is the list of the two nodes in my Ansible inventory file.

On both nodes, when I run gluster volume info I see that the volume was created successfully, and it can be mounted via mount -t glusterfs. Here's the output of gluster volume info:

Volume Name: [my volume name]
Type: Distribute
Volume ID: edbc9b23-6252-4725-9652-e46c280dae2b
Status: Started
Snapshot Count: 0
Number of Bricks: 2
Transport-type: tcp
Brick1: [node 1]:/bricks/brick0
Brick2: [node 2]:/bricks/brick0
Options Reconfigured:
transport.address-family: inet
nfs.disable: on

I noticed that nfs.disable: on, but I want my clients to mount the volume via NFS. So, I ran gluster volume set [my volume name] nfs.disable off, then rebooted the nodes for good measure.

Now, I can see this from gluster volume status:

Status of volume: [my volume name]
Gluster process                             TCP Port  RDMA Port  Online  Pid
Brick [node 1]:/bricks/brick0            49152     0          Y       2338 
Brick [node 2]:/bricks/brick0              49152     0          Y       1526 
NFS Server on localhost                     N/A       N/A        N       N/A  
NFS Server on [node 2]                     N/A       N/A        N       N/A

Notice that the NFS Servers are still not online in either node.

What else do I need to do to turn on NFS support, so that clients can mount this volume via /etc/fstab? Is there anything I can/should modify in the Ansible playbook to enable this? Thank you.


Gluster NFS server is deprecated. See Configuring NFS-Ganesha over GlusterFS.There is no NFS-Ganesha module for Ansible AFAIK.

Ubuntu 18.04 GlusterFS + NFS-Ganesha seems to be prety strightforward.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.