[Lustre-discuss] The meaning of LOV code of a MDT file

thhsieh thhsieh at piano.rcas.sinica.edu.tw
Sun Jan 13 02:57:15 PST 2013


Dear All,

Our Lustre filesystem was crashed due to the electric power crashed
about one week ago. We are still struggling to rescue our data.

After some home works, we found a possible way to rescue our data.
But here I would like to ask how to do the mapping from the LOV code
of a MDT file to the OST object. Here is an example: We want to rescue
a file, say:

	/home/thhsieh/log

When mounting our MDT partition with the ldiskfs, we see that this file
is actually /ROOT/home/thhsieh/log in this partition. Then we use the
following command to obtain its LOV:

	debugfs -c -R "stat /ROOT/home/thhsieh/log" /dev/XXXX

and obtain:

===========================================================================
debugfs 1.40-WIP (14-Nov-2006)
/dev/sda2: catastrophic mode - not reading inode or group bitmaps
Inode: 4060620   Type: regular    Mode:  0644   Flags: 0x0   Generation: 5860141
29
User:  1000   Group:  1000   Size: 0
File ACL: 0    Directory ACL: 0
Links: 1   Blockcount: 0
Fragment:  Address: 0    Number: 0    Size: 0
ctime: 0x50b733c3 -- Thu Nov 29 18:06:59 2012
atime: 0x50b733b3 -- Thu Nov 29 18:06:43 2012
mtime: 0x50b733c3 -- Thu Nov 29 18:06:59 2012
Size of extra inode fields: 28
Extended attributes stored in inode body: 
  lov = "d0 0b d1 0b 01 00 00 00 cc f5 3d 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 10 00 01 00 00 00 05 ec 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
0 00 06 00 00 00 " (56)
BLOCKS:
===========================================================================

Now we want to know how to map the above "lov" code to the actual object
in OST. More precisely, which OST (foo_OST000?) and which file in that
OST (/O/0/dXX/YYYY).

We already know the mapping reversely, i.e., from the FID of an OST object
(obtained from the debugfs command listed similarly above) to the MDT
inode, as described in section 13.13 of:

http://wiki.lustre.org/manual/LustreManual20_HTML/LustreOperations.html#50438194_30872

This helps a lot for us to rescue a lot of data. But unfortunately one of
our OST was broken so seriously that even the xattr of its objects were
lost, too, and we cannot get their FID from the debugfs command.

Our Lustre filesystem was configured with all default options. So presumably
all the files are in single strip. That is, large files are not divided to
several strips and distributed to several OSTs.

We are very appriciated for your kindly help.

Thanks very much.


T.H.Hsieh



More information about the lustre-discuss mailing list