4

I need to add more space to one of our gluster volumes. The volumes are replica 2 and sit on top of an LVM. The file system is XFS. The current size is 4TB and I want to resize to 6TB. The LVM has enough Free PEs on both replica servers.

  --- Physical volume ---
  PV Name               /dev/sdb
  VG Name               gluster
  PV Size               10,91 TiB / not usable 4,00 MiB
  Allocatable           yes
  PE Size               4,00 MiB
  Total PE              2861183
  Free PE               1633407
  Allocated PE          1227776
  PV UUID               F3CwNm-dceK-ezPY-7w12-OYT5-FLAH-U0a239

-

  --- Physical volume ---
  PV Name               /dev/sdb
  VG Name               gluster
  PV Size               10,91 TiB / not usable 4,00 MiB
  Allocatable           yes
  PE Size               4,00 MiB
  Total PE              2861183
  Free PE               1618047
  Allocated PE          1243136
  PV UUID               dWDEgF-0brq-9e6r-eqpO-jTeK-GJfb-c3MGbE

I've read somewhere, that it's enough to extend the LVM and to resize the FS on both hosts.

# lvextend -L +2T <lvm>
# xfs_growfs <lvm mountpoint>

I know that XFS has to be reseize while it's mounted. The LVM can also be resized during operations (although not recommended). And I've read somewhere that GlusterFS will automatically adapt to the new volume size as soon as both/all volumes have the new size.

Since the storage is used in an productive environment it's important to do this on the fly.

Has anyone any experience with this combination or can confirm that my approach is correct?

Thanks in advance.

raidlman
  • 355
  • 2
  • 14

2 Answers2

4

To answer my own question:

Eventually we had to increase Gluster storage without downtime.

After extending the logical volume of all Gluster bricks to the same size and growing the xfs filesystem to the maximum size of the volume, the Gluster volume automatically adjusted the new size.

I'm not sure if it's the recommended way, but it worked for us like a charm (both replica 2 and replica 3 volumes).

raidlman
  • 355
  • 2
  • 14
3

According to the https://access.redhat.com/solutions/1517993 if you want, you can grow a glusterfs volume by growing its bricks rather than adding new ones.

You can do it following a usual file system resizing method (the method will depend on the underlying block device).

Example : the brick is set on an XFS file system on the LV VGgluster/brick1. We want to add another 500MB to this brick.

Check that you have free space on the VG containing the brick :
~~~
# vgs VGgluster
~~~
Grow the file system :
~~~
# lvextend --resizefs -L+500M VGgluster/brick1
~~~
The size has been updated on the client :
~~~
# df /glusterfs/mountpoint

From my experience: if it's a replica volume, you have to resize all volume's bricks. Until all bricks have the same size, the actual size of particular gluster volume will be equal the size of the smallest brick at the moment.

nickvsh
  • 31
  • 1