GlusterFS: Renaming a Brick
So you want to replace a GlustetFS brick? In other words, how do I rename a brick path in glusterfs?
NOTICE: Anytime there is any data manipulation on any environment, backups should always be taken. So please make a copy or a backup of your files prior to executing any of the commands. The steps expect the user has a backup.
Here's a few ways to do so:
gluster volume replace-brick <vol> <host>:/bricks/0/gv01 <host>:/bricks/0/abc-gv01 commit force
A detailed sequence of another way to rename the brick storage folder:
Command | Description |
gluster v reset-brick gvol peer01:/previous/path start | Stop glusterfs on node. |
mv /previous/path /latest/path | Move the old path to the new path. |
gluster v add-brick gvol peer02:/new/path force | Add new path as new brick. |
gluster v remove-brick gvol peer01:/previous/path force | Maintain sequence. Data duplication will occur if order is not maintained. |
gluster v rebalance gvol fix-layout start | Optional Command. Might not be needed. |
TKS
REF: https://docs.gluster.org/en/latest/Administrator-Guide/Managing-Volumes/#replace-brick