Page 1 of 1

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

Posted: Wed Mar 26, 2014 12:51 pm
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 :)

Listing all extended file attributes of gluster brick

Posted: Thu Dec 04, 2014 7:00 pm
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==