[Lustre-discuss] How to find a file by object id

Daniel Kobras kobras at linux.de
Wed Oct 21 06:12:58 PDT 2009


Hi!

On Wed, Oct 21, 2009 at 11:58:43AM +0100, Wojciech Turek wrote:
> I apologize if this question was answered earlier but I can not find it in
> the mailing list.
> I have an object ID and I would like to find file that this object is part
> of. I tried to use lfs find but I can not seem to find right combination of
> options.

On a Lustre client, I'm not aware of any better method than using a combination
of lfs find and lfs getstripe to look for matching object IDs.  On the servers,
Andreas Dilger has described a more efficient way using debugfs in 
http://lists.lustre.org/pipermail/lustre-discuss/2009-July/011080.html

> Also is there a simple way to list all the files and their object IDs?

I'm not sure whether it counts as "simple", but this is what I'm using:

lfs find . -type f -print0 | while IFS='' read -d '' i; do echo "$i"; lfs getstripe -q "$i"; done

Regards,

Daniel.




More information about the lustre-discuss mailing list