[Gluster-devel] Idea: gluster volume "clear" command for xattrs?

Joe Julian joe at julianfamily.org
Thu Mar 28 21:58:45 UTC 2013

On 03/28/2013 02:22 PM, Robert Hajime Lanning wrote:
> On 03/27/13 22:26, Justin Clift wrote:
>> Had a quick thought.  Would a gluster volume command to
>> remove all of the xattr's from a brick be useful?
>> e.g. "sudo gluster volume clear /path/mybrick1"
>> It would remove all Gluster xattr's on the brick, letting it
>> be used in a new volume.
>> Pretty much exactly what we're giving people manual
>> directions for, with setfattr -x [xattrs here] /path/mybrick1.
>> Except people commonly have problems with the setfattr
>> approach, so we end up having to step them through it
>> manually on IRC until it works.
>> Worthwhile?  (note, "clear" was a first idea for a
>> reasonable name, can be anything. :>)
> I would expect this to be an option to the remove brick command.
> You would never do this, without removing the brick from the volume.
> If there is no volume, then I would expect it to be manual steps, as 
> it is today.
You might if you forgot to set the flag when you removed the brick from 
the volume.

My preference would be a flag on volume create that allows the override 
of the brick xattrs. GlusterFS takes the responsible approach to data 
integrity and leaves everything on the brick when it's removed. I think 
that's the correct move and should not be changed or optionally 
overridden. There are occasionally reasons to use a previously populated 
brick so allowing a way of forcing that on creation makes some sense.

There are a number of ways that using a previously used brick can also 
fail, so unless someone knows why they're reusing a brick, it's better 
for them not to and, instead, wipe that brick before use.

More information about the Gluster-devel mailing list