Restore a brick in a GlusterFS replicated volume | Just my blog

/dev/random

Restore a brick in a GlusterFS replicated volume

I did post a while ago on how to replace a failing brick in a replicated volume. This procedure worked quite well if the disk that is failing is still sort of ‘OK’… in the meanwhile I figured out a different approach which is even faster…

Step 1
Stop GlusterFS

Step 2
Unmount the faulty disk

Step 3
Partition the new disk, create a filesystem and mount it

Step 4
Run the following command (enure you set the variables vol and brick to your settings:

(vol=DataVolume; brick=/usr/glusterfs/brick_1; 
setfattr -n trusted.glusterfs.volume-id
-v 0x$(grep volume-id /var/lib/glusterd/vols/$vol/info |
cut -d= -f2 | sed 's/-//g') $brick)

Step 5
Start GlusterFS

Step 6
Start a heal on the archive using the following command:

# gluster volume heal DataVolume full

Step 7
The disk will be repopulated with the data


  • Social

  • By continuing to use the site, you agree to the use of cookies. more information

    The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible and enable advertising to provide you free content. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

    Close