[Lustre-discuss] detecting problematic files via mds/oss syslog messages

Andreas Dilger adilger at sun.com
Mon Jul 20 15:06:55 PDT 2009


On Jul 20, 2009  13:20 +0300, Ender G�ler wrote:
> Are there any ways of detecting the problematic file names from the mds/oss
> syslog messages? Or to be more definite, are there any ways to find a map of
> file name to inode number or file name to object id or inode number to
> object id? I'm trying to understand the insights of lustre and some times I
> wonder which files are affected from a lustre error? For example, when I see
> an object id in log messages, how can I understand which file is this? Is
> there any look up table, or map for these purposes?

If there are particularly bad error messages, you could file a bug with
details.

It is also possible to manually map an OST object ID to an MDS filename.
For example, objid 620032 on my filesystem:

ost# debugfs -c -R "stat /O/0/d$((620032 %32))/620032" /dev/vgmyth/lvmythost0
Inode: 31905   Type: regular    Mode:  0666   Flags: 0x80000
User:  1000   Group:  1000   Size: 461317
:
:
Extended attributes stored in inode body: 
  fid = "f8 3f 26 00 00 00 00 00 f1 0a 44 41 00 00 00 00 00 76 09 00 00 00 00 00 00 00 00 00 00 00 00 00 " (32)

The important part is the "Extended attributes", which map to

struct filter_fid {
        struct ll_fid {
                __u64 id;         /* holds object id */
                __u32 generation; /* holds object generation */
                __u32 f_type;     /* file stripe number */
        };
	__u64           ff_objid;
	__u64           ff_group;
};

So, this object maps to inode 0x00263ff8 on the MDS.  There:

mds# debugfs -c -R "ncheck 0x00263ff8" /dev/vgmyth/lvmythmds0
2506744 /ROOT/backup/Picture Archives/2003 Archives/2003-09-28/P1010034.JPG


It is of course possible to start directly from an inode number on the MDS,
or an inode number on the OST.

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




More information about the lustre-discuss mailing list