GlusterFS Error volume add-brick: failed: Pre Validation failed on BRICK is already part of a volume

GlusterFS Error volume add-brick: failed: Pre Validation failed on BRICK is already part of a volume

Category : How-to

Get Social!

I received the below error today after I tried to add a ‘new’ brick to a GlusterFS volume. I’ve put the word ‘new’ into quotes because although the brick was new to the GlusterFS volume, the disk being added had been used as a brick before. The disk had all data removed from it, however somehow GlusterFS knew that the disk held some remnants of the previous brick.

The following command failed, trying to add the new brick:

gluster v add-brick data-volume replica 3 gluster3:/mnt/brick1/data

The error received:

volume add-brick: failed: Pre Validation failed on gluster3. /mnt/brick1/data is already part of a volume

Solution!

The solution is to use setfattr to clear the hidden filesystem attributes containing GlusterFS information about the bricks previous life. Run the following commands on the server that has the drive that you’re trying to add as a new brick.

setfattr -x trusted.glusterfs.volume-id /mnt/brick1/data
setfattr -x trusted.gfid /mnt/brick1/data

Of course, you should also ensure that the filesystem you’re adding is cleared, especially the .glusterfs hidden directory.

rm -rf /mnt/brick1/data/.glusterfs

And that’s it! Try running the add-brick command again, and you should be in business.

gluster v add-brick data-volume replica 3 gluster3:/mnt/brick1/data


1 Comment

Frank

20-Aug-2020 at 9:46 am

You’re the man! This saved me so much time. Thank you!

Leave a Reply

Visit our advertisers

Quick Poll

What type of VPN protocol do you use?

Visit our advertisers