DEV Community

Tohu Wabohu
Tohu Wabohu

Posted on

Add a new Gluster node to existing cluster

Ansible job for installing GlusterFS package on the new node (node4):

---
- name: Install dependencies for GlusterFS
  apt:
    name: software-properties-common
    update_cache: yes
    state: present

- name: Add GlusterFS repo
  apt_repository:
    repo: ppa:gluster/glusterfs-10
    state: present

- name: Install GlusterFS package
  apt:
    name: glusterfs-server
    update_cache: yes
    state: present
Enter fullscreen mode Exit fullscreen mode

Start glusterd service if not running:

sudo systemctl start glusterd.service
Enter fullscreen mode Exit fullscreen mode

Discover and register a remote node as a peer in the cluster (run on any existing node in a cluster):

sudo gluster peer probe node4
Enter fullscreen mode Exit fullscreen mode

Confirm peer status with:

sudo gluster peer status
Enter fullscreen mode Exit fullscreen mode

Confirm existing volume status:

gluster volume info
Enter fullscreen mode Exit fullscreen mode

Add a fourth brick to an existing volume my_gluste_vol:

sudo gluster volume add-brick my_gluste_vol replica 4 app01:/my-gluster_brick force
Enter fullscreen mode Exit fullscreen mode

You can check replication status with:

sudo gluster volume heal _my_gluste_vol_ info
Enter fullscreen mode Exit fullscreen mode

Top comments (0)