I use the sequence below to move a brick to a different peer. I assume it also
works for renaming a brick (just put peer01 = peer02 = whateveryourpeeris). I
used this on a distributed-only volume (no replication) running glusterfs 9.3.
Please note that I didn't to extensive tests and I didn't find any
documentation if this is officially supported.
# stop glusterfsd for brick:
gluster v reset-brick gvol peer01:/old/path start
# in your case, you probably want to do something here like
mv /old/path /new/path
# add the moved path as new brick:
gluster v add-brick gvol peer02:/new/path force
# Order is important!
# if brick is removed before other brick is added,
# will lead to duplicate files.
# remove old brick (which does not exist any longer)
gluster v remove-brick gvol peer01:/old/path force
# probably not necessary in your case:
gluster v rebalance gvol fix-layout start
> Hey All,
> Is there a way to rename a brick within an existing gluster volume?
> /bricks/0/gv01 -> /bricks/0/abc-gv01