<div dir="ltr"><div class="gmail_quote">I would think that the link count should be sufficient.  I&#39;ve attached a python module that we&#39;ve used to do some brick level indexing and cleanup on our system.  You could use it to generate a list of the .glusterfs links for the remaining good files on the disk.  Then you could check your candidates for removal against the list before removing them.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">On Aug 21, 2014 12:05 PM, &quot;Branden Timm&quot; &lt;<a href="mailto:btimm@energy.wisc.edu" target="_blank">btimm@energy.wisc.edu</a>&gt; wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
We have a distributed volume, and had a rather large (&gt; 50TB) folder that was no longer needed.  Naively, we removed the folder from the brick instead of through the Gluster client.<br>
<br>
You can probably see where this is going.  We didn’t actually reclaim the space because of the hard links to .glusterfs, and now we need to figure out how to clean up.<br>
<br>
Is it sufficient to simply check whether a file under .glusterfs has less than 2 hard links, something like:<br>
<br>
find .glusterfs -type f -links -2 -exec rm {} \;<br>
<br>
Or do we have to do something else?  Any help is much appreciated.<br>
<br>
—Branden<br>
<br>
_______________________________________________<br>
Gluster-users mailing list<br>
<a href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a><br>
<a href="http://supercolony.gluster.org/mailman/listinfo/gluster-users" target="_blank">http://supercolony.gluster.org/mailman/listinfo/gluster-users</a><br>
</blockquote></div>
</div>