<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>This sounds like something we need to post to community.gluster.org - Avati, can you do the honors?<br><br>-JM<br><br><br><hr id="zwchr"><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">The current behavior is intentional. There have been far too many instances where users delete a volume, but fail to understand that those brick directories still contain their data (and all the associated book-keeping metadata like self-heal pending changelogs, partial dht hash ranges etc.) -- and will not be happy when they find that the newly created volume using those stale brick directories start misbehaving. This typically happens when a user is trying out gluster for the first time (where volume creation and deletion is frequent, while trying to get a hang of things) and result in an ugly first experience.<div>
<br></div><div>For all you know, you yourself might have possibly ended in a situation where you could have created a new volume with all the staleness (like the hidden .glusterfs directory as well) from the previous volume silently carried over and cause unintended behavior. The way I see it, your email report is a positive result of the stale brick check having served its purpose :-)</div>
<div><br></div><div>Avati<br><br><div class="gmail_quote">On Tue, Sep 18, 2012 at 11:29 AM, Lonni J Friedman <span dir="ltr">&lt;<a href="mailto:netllama@gmail.com" target="_blank">netllama@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hrmm, ok. &nbsp;Shouldn't 'gluster volume delete ...' be smart enough to<br>
clean this up so that I don't have to do it manually? &nbsp;Or<br>
alternatively, 'gluster volume create ...' should be able to figure<br>
out whether the path to a brick is really in use?<br>
<br>
As things stand now, the process is rather hacky when I have to issue<br>
the 'gluster volume delete ...' command, then manually clean up<br>
afterwards. &nbsp;Hopefully this is something that will be addressed in a<br>
future release?<br>
<br>
thanks<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Sep 18, 2012 at 11:26 AM, Kaleb Keithley &lt;<a href="mailto:kkeithle@redhat.com" target="_blank">kkeithle@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt; There are xattrs on the top-level directory of the old brick volume that gluster is detecting causing this.<br>
&gt;<br>
&gt; I personally always create my bricks on a subdir. If you do that you can simply rmdir/mkdir the directory when you want to delete a gluster volume.<br>
&gt;<br>
&gt; You can clear the xattrs or "nuke it from orbit" with mkfs on the volume device.<br>
&gt;<br>
&gt;<br>
&gt; ----- Original Message -----<br>
&gt; From: "Lonni J Friedman" &lt;<a href="mailto:netllama@gmail.com" target="_blank">netllama@gmail.com</a>&gt;<br>
&gt; To: <a href="mailto:gluster-users@gluster.org" target="_blank">gluster-users@gluster.org</a><br>
&gt; Sent: Tuesday, September 18, 2012 2:03:35 PM<br>
&gt; Subject: [Gluster-users] cannot create a new volume with a brick that used to be part of a deleted volume?<br>
&gt;<br>
&gt; Greetings,<br>
&gt; I'm running v3.3.0 on Fedora16-x86_64. &nbsp;I used to have a replicated<br>
&gt; volume on two bricks. &nbsp;This morning I deleted it successfully:<br>
&gt; ########<br>
&gt; [root@farm-ljf0 ~]# gluster volume stop gv0<br>
&gt; Stopping volume will make its data inaccessible. Do you want to<br>
&gt; continue? (y/n) y<br>
&gt; Stopping volume gv0 has been successful<br>
&gt; [root@farm-ljf0 ~]# gluster volume delete gv0<br>
&gt; Deleting volume will erase all information about the volume. Do you<br>
&gt; want to continue? (y/n) y<br>
&gt; Deleting volume gv0 has been successful<br>
&gt; [root@farm-ljf0 ~]# gluster volume info all<br>
&gt; No volumes present<br>
&gt; ########<br>
&gt;<br>
&gt; I then attempted to create a new volume using the same bricks that<br>
&gt; used to be part of the (now) deleted volume, but it keeps refusing &amp;<br>
&gt; failing claiming that the brick is already part of a volume:<br>
&gt; ########<br>
&gt; [root@farm-ljf1 ~]# gluster volume create gv0 rep 2 transport tcp<br>
&gt; 10.31.99.165:/mnt/sdb1 10.31.99.166:/mnt/sdb1<br>
&gt; /mnt/sdb1 or a prefix of it is already part of a volume<br>
&gt; [root@farm-ljf1 ~]# gluster volume info all<br>
&gt; No volumes present<br>
&gt; ########<br>
&gt;<br>
&gt; Note farm-ljf0 is 10.31.99.165 and farm-ljf1 is 10.31.99.166. &nbsp;I also<br>
&gt; tried restarting glusterd (and glusterfsd) hoping that might clear<br>
&gt; things up, but it had no impact.<br>
&gt;<br>
&gt; How can /mnt/sdb1 be part of a volume when there are no volumes present?<br>
&gt; Is this a bug, or am I just missing something obvious?<br>
&gt;<br>
</div></div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Gluster-users mailing list<br>
<a href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a><br>
<a href="http://gluster.org/cgi-bin/mailman/listinfo/gluster-users" target="_blank">http://gluster.org/cgi-bin/mailman/listinfo/gluster-users</a><br>
</div></div></blockquote></div><br></div>
<br>_______________________________________________<br>Gluster-users mailing list<br>Gluster-users@gluster.org<br>http://gluster.org/cgi-bin/mailman/listinfo/gluster-users<br></blockquote><br></div></body></html>