Gluster:{path} or a prefix of it is already part of a volume

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
peter_b
Chatterbox
Posts: 383
Joined: Tue Nov 12, 2013 2:05 am

Gluster:{path} or a prefix of it is already part of a volume

Post by peter_b »

[PROBLEM]
I've set up a new glusterfs node and wanted to re-use disks which previously already contained a glusterfs volume.

When trying to create the gluster volume on the new setup, I was (of course) confronted with the following error message:
volume create: dlp-storage: failed: /exports/brick1/data or a prefix of it is already part of a volume
According to Joe Julian's blog, an existing gluster volume data folder can be "freed" to be reused, by removing some file attributes and the .glusterfs folder:

Code: Select all

setfattr -x trusted.glusterfs.volume-id $brick_path
setfattr -x trusted.gfid $brick_path
rm -rf $brick_path/.glusterfs
Now, the "volume create" command should complete successfully :)
User avatar
peter_b
Chatterbox
Posts: 383
Joined: Tue Nov 12, 2013 2:05 am

Listing all extended file attributes of gluster brick

Post by peter_b »

Here's how you can list all xattr of a gluster brick:

Code: Select all

$ getfattr --absolute-names -d -m - /path/of/brick/data
The output might look something like this (gluster v3.4.2 / Debian Wheezy):
# file: /path/of/brick/data
security.selinux="unconfined_u:object_r:file_t:s0"
trusted.gfid=0sAAAAAAAAAAAAAAAAAAAAAQ==
trusted.glusterfs.dht=0sAAAAAQAAAABVVVVVqqqqqQ==
trusted.glusterfs.volume-id=0s5ft0DFVETyGMtPcDi28gmQ==
Post Reply