[Gluster-devel] How to resolve gfid (and .glusterfs symlink) for a deleted file

Nux! nux at li.nux.ro
Fri Nov 21 16:03:46 UTC 2014


Hi Ben,

I have thousands of entries under /your/brick/directory/.glusterfs .. find would return too many results.
How do I find the one I'm looking for? :-)

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro

----- Original Message -----
> From: "Ben England" <bengland at redhat.com>
> To: "Nux!" <nux at li.nux.ro>
> Cc: "Gluster Devel" <gluster-devel at gluster.org>
> Sent: Friday, 21 November, 2014 16:00:40
> Subject: Re: [Gluster-devel] How to resolve gfid (and .glusterfs symlink) for a	deleted file

> first of all, links in .glusterfs are HARD links not symlinks.   So the file is
> not actually deleted, since the local filesystem keeps a count of references to
> the inode and won't release the inode until the ref count reaches zero.   I
> tried this, it turns out you can find it with
> 
> # find /your/brick/directory/.glusterfs -links 1 -type f
> 
> You use "type f" because it's a hard link to a file, and you don't want to look
> at directories or "." or ".." .  Once you find the link, you can copy the file
> off somewhere, and then delete the link.  At that point, regular self-heal
> could repair it (i.e. just do "ls" on the file from a Gluster mountpoint).
> 
> ----- Original Message -----
>> From: "Nux!" <nux at li.nux.ro>
>> To: "Gluster Devel" <gluster-devel at gluster.org>
>> Sent: Friday, November 21, 2014 10:34:09 AM
>> Subject: [Gluster-devel] How to resolve gfid (and .glusterfs symlink) for a
>> 	deleted file
>> 
>> Hi,
>> 
>> I deleted a file by mistake in a brick. I never managed to find out its gfid
>> so now I have a rogue symlink in .glusterfs pointing to it (if I got how it
>> works).
>> Any way I can discover which is this file and get rid of it?
>> 
>> --
>> Sent from the Delta quadrant using Borg technology!
>> 
>> Nux!
>> www.nux.ro
>> _______________________________________________
>> Gluster-devel mailing list
>> Gluster-devel at gluster.org
>> http://supercolony.gluster.org/mailman/listinfo/gluster-devel


More information about the Gluster-devel mailing list