[Lustre-discuss] Extended Attributes

Andreas Dilger adilger at sun.com
Mon Aug 18 03:11:41 PDT 2008


On Aug 08, 2008  14:19 -0700, Herb Wartens wrote:
> We have a rudimentary tool that I developed here at LLNL that
> does what I think you want here.
> You asked for getting an OST inode from an ost object.  All you have
> to do is stat the file using debugfs to get at that information.
> What I think you want is something a bit more tricky.
> 
> We had an incident here where the fsck found some corruption and
> moved some OST objects into the lost+found.  One nice thing about
> Lustre is that it stores extended attributes about the file with
> the inode.
> 
> We have a tool here called eadump.ldiskfs that reads and decodes the
> extended attribute information for an ost object.  This tells you
> what the object id should be for the file as well as what the mds
> inode should be as well (This also answers youe #2 below)...=)
> 
> EG:
> | eadump.ldiskfs -d /dev/sdc -i 105906277
> Name: trusted.fid Value: MDSINO: 112108525 GEN: 1401146486 STRIPEIDX: 1 OBJID: 10942568 GROUP: 0

Note that there is also a new tool ll_recover_lost_found_objs in 1.6.6
(also in bugzilla) that will move objects from lost+found back into
place in O/0/d*, including rebuilding the directory structure there if
it was broken for some reason.  It will also (AFAIR) print out the
MDS inode number.

> | 2. derive MDS inode from OST inode?
> | use a tool that is nice uses OST inode and gives me the mds inode or
> | decode using source code the extended attributes
> | that are in some hex string that is in the output
> | from the debugfs step above at "fid =" line.
> |
> | 3.derive filename from MDS inode?
> | run debug.ldiskfs(ncheck) the MDS inode
> | that displays the filename.
> 
> Using ncheck in debugfs is the only way I know of to get at this information.
> This is a SLOW process since it has to rumble through the filesystem for it.
> You should also note that this filename may not be the only one pointing to
> that inode.

Right.  There is a discussion underway about storing the filename(s) in
the inode itself to allow this kind of operation to be done in O(path_parts)
instead of O(number_of_inodes * path_parts).  This is also needed for
things like changelog generation.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.




More information about the lustre-discuss mailing list