GlusterFS is a distributed filesystem mostly contributed by RedHat.
Anyway, for me not reading the manual first, I thought that deleting a volume will also delete everything with it, and I can create a new volume in the same place as the old one. Wrong! Glusterd is setting some extended attributes to folders in which he creates the distributed filesystem. For that, you’ll need to install a package called “attr”.
Anayway, lets say, in my case, that you created a distributed replicate volume across 2 servers: gluster1, gluster2, and the volume used on both was /glusterfs. The comand you use should be:
gluster volume create testvol replica 2 transport tcp gluster1:/glusterfs gluster2:/glusterfs
In the mean time, you delete it:
gluster volume stop testvol
gluster volume delete testvol
When you try to recreate the volume:
gluster volume create prodvol replica 2 transport tcp gluster1:/glusterfs gluster2:/glusterfs
..you get something like:
/glusterfs or a prefix of it is already part of a volume
That’s why you’ll need to do the following:
apt-get install attr
for i in `attr -lq .`; do setfattr -x trusted.$i .; done
attr -lq /glusterfs (for testing, the output should pe empty)