[Gluster-users] Removing orphaned hard links under .glusterfs

Branden Timm btimm at energy.wisc.edu
Thu Aug 21 17:32:11 UTC 2014


Thanks, I'll have a look at that.  Is there any way to divine the brick 
path that those gfid files under .glusterfs used to point to?

-Branden

On 08/21/2014 12:18 PM, Andrew Zenk wrote:
> I would think that the link count should be sufficient.  I've attached 
> a python module that we'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.
>
> On Aug 21, 2014 12:05 PM, "Branden Timm" <btimm at energy.wisc.edu 
> <mailto:btimm at energy.wisc.edu>> wrote:
>
>     We have a distributed volume, and had a rather large (> 50TB)
>     folder that was no longer needed.  Naively, we removed the folder
>     from the brick instead of through the Gluster client.
>
>     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.
>
>     Is it sufficient to simply check whether a file under .glusterfs
>     has less than 2 hard links, something like:
>
>     find .glusterfs -type f -links -2 -exec rm {} \;
>
>     Or do we have to do something else?  Any help is much appreciated.
>
>     —Branden
>
>     _______________________________________________
>     Gluster-users mailing list
>     Gluster-users at gluster.org <mailto:Gluster-users at gluster.org>
>     http://supercolony.gluster.org/mailman/listinfo/gluster-users
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-users/attachments/20140821/856f0576/attachment.html>


More information about the Gluster-users mailing list